[erlang-questions] How to best debug init.erl?

Peer Stritzinger <>
Thu Apr 19 22:23:53 CEST 2012


2012/4/19 Lukas Larsson <>:
> If you are cross compiling you probably want to set your bootstrap
> emulator in the path instead. It should be under
> $ERL_TOP/bootstrap/bin

Got it working with this.

However "./otp_build boot -a" doesn't work after this I can only build with:

  $ gmake TARGET=powerpc-unknown-rtems4.11 all

After changing any preloaded beams.

Cheers,
-- Peer



>
> Lukas
>
> On Thu, Apr 19, 2012 at 9:11 PM, Björn-Egil Dahlberg
> <> wrote:
>> Do it like this instead:
>>
>> Hop down to erts/preloaded,
>> 1. PATH=$ERL_TOP/bin:$PATH gmake
>> 2. copy file from src to ebin
>> 3. Hop to erts, remake beam, i.e make (check for preload.o to link)
>>
>> // Björn-Egil
>>
>> Den 19 april 2012 21:06 skrev Peer Stritzinger <>:
>>
>>> On Thu, Apr 19, 2012 at 8:37 PM, Peer Stritzinger <>
>>> wrote:
>>> > What do I have to do to rebuild with changes in init.erl ...
>>> > especially for cross building.
>>>
>>> Small update to this part: I found
>>>
>>>  $ ./otp_build update_preloaded
>>>
>>> Which rebuilds the preloaded files but then I get in trouble when I
>>> want to rebuild with
>>>
>>>  $ ./otp_build boot -a
>>>
>>> I get errors like:
>>>
>>> ...
>>> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>>> * * *
>>> * ERROR:   Trying to cross compile an Erlang/OTP-R15B system with a
>>> different
>>> *          Erlang/{"load_mod",error_handler,"error_handler.beam"}
>>> ...
>>>
>>> Somehow update_preloaded seems to use the wrong Erlang version (my
>>> installed one?)
>>> _______________________________________________
>>> erlang-questions mailing list
>>> 
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>



More information about the erlang-questions mailing list