[erlang-questions] reducing size of erlang

Anders Nygren <>
Wed Jul 16 06:17:44 CEST 2008


On Tue, Jul 15, 2008 at 10:06 PM, Andrew Harris <> wrote:
> Hi Anders,
>
> On Tue, Jul 15, 2008 at 8:37 PM, Anders Nygren <> wrote:
>>
>> 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.
>>
>
> Thanks for the suggestion.  It's odd.  I went ahead and compiled
> R10B-10 natively (not cross compiling) using the following three
> lines:
>
> ./configure --prefix=/tmp/cross-compiled --without-ssl --without-java
> --disable-hipe
> make noboot
> make install
>
> I did that as a test to just practice building the code.  It seems to
> have built fine, but I get the same error that I had emailed before...
> it seems cross compiling had nothing to do with it.
>
> :/tmp/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 ()
> :/tmp/cross-compiled/bin$
>
> I don't quite understand your statement that I'm building for a
> different version; I've just untarred the distribution into a fresh
> directory and done the configure and make instructions above.
>
> Could there be some interference between this build and the erlang
> I've already got installed?  I use Ubuntu and installed erlang from
> the package manager; I thought it was necessary.  Maybe that's causing
> the problem you refer to?

Hi
I have now tested building R10B-10 the same way as You did, and
I get a different error.

make fails with

( cd /usr/local/src/otp/otp_src_R10B-10/erts/start_scripts/tmp && \
        erlc -W   -I/usr/local/src/otp/otp_src_R10B-10/lib/kernel/ebin
-I/usr/local/src/otp/otp_src_R10B-10/lib/stdlib/ebin
-I/usr/local/src/otp/otp_src_R10B-10/lib/sasl/ebin -o
/usr/local/src/otp/otp_src_R10B-10/erts/start_scripts/start_clean.script
/usr/local/src/otp/otp_src_R10B-10/erts/start_scripts/start_clean.rel
)
stdlib: No valid version ("1.13.12") of .app file found. Found file
"/usr/local/lib/erlang/lib/stdlib-1.15.2/ebin/stdlib.app" with version
"1.15.2"

which shows that it only finds the stdlib from my R12B-2 installation.

Checking one of the newly compiled beam files in the R10B-10 tree
shows that it is compiled with the compiler from R12B-2. So it seems
like it is not possible to build, (at least R10B-10), when there is a newer
version also installed.

So try removing the ubuntu installed version of erlang and try builing again.

/Anders

>
> thanks,
> -andrew
>



More information about the erlang-questions mailing list