[erlang-questions] reducing size of erlang

Anders Nygren anders.nygren@REDACTED
Wed Jul 16 02:37:12 CEST 2008

On Tue, Jul 15, 2008 at 6:48 PM, Andrew Harris <andrew.unit@REDACTED> wrote:
> Hi Matt,
>> Getting a basic, small Erlang down to 3MB is fairly straightforward.
>> Is 3MB "really big". I don't know, you didn't give me any clues about
>> what you were aiming for.
>>  1. Add the +compressed and +slim flags to the build
>>  2. Throw out all libraries you don't need.
>>  3. Throw out all binaries you don't need.
>>  4. Strip the remaining binaries.
>> #1 is easily done by applying the attached patch (for R11, but the idea
>> is the same) to a clean source tree. Clean means "before you run 'configure'".
> Thanks for the useful information.  I was able to save around 30MB,
> going from 70MB to around 40MB!  It fits on the gumstix now.  I am
> stuck now on a problem that I'm not sure about.  I'm wondering if I
> might not have cross compiled correctly?  I updated the directory path
> in bin/erl to point to the correct place.  Could it be that there are
> other symbolic links I should fix?
> root@REDACTED:~/cross-compiled/bin$ ./erl
> (no error logger present) error: beam/beam_load.c(1097): Error loading
> module error_handler:
>  use of opcode 124; this emulator supports only up to 115
> {"init terminating in do_boot",{'cannot load',error_handler,{error,badfile}}}
> Crash dump was written to: erl_crash.dump
> init terminating in do_boot ()
> root@REDACTED:~/cross-compiled/bin$

Looks like You have mixed files from different releases.
So error_handler.beam is compiled for a newer version of the emulator
than what You have installed.


> -andrew
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list