[erlang-questions] Problems cross compiling: eheap_alloc: Cannot reallocate 3480006320 bytes of memory
Rickard Green
rickard@REDACTED
Mon Feb 8 15:55:45 CET 2010
The fix is now available in the ccase/r13b04_dev branch at github. If
the fix doesn't solve your problem, please send me the
$ERL_TOP/erts/config.log file and the complete printout (stdout) from
your configure run.
Some changes has been made in xcomp/README, so it might be worth having
a look at the diff. The bug was that configure checked for large file
support using `getconf' for the build machine. This can cause 8 byte
off_t for the target machine when 4 byte off_t should be used. The fix
tries to figure out how to enable large file support using a `getconf'
for the target machine (or by user input). That is, if you get an 8 byte
off_t it isn't necessarily wrong. It then probably succeeded in figuring
out how to enable large file support.
Regards,
Rickard
Rickard Green wrote:
> I found a bug that can cause `configure' to detect wrong size of `off_t'
> when cross compiling. I'll fix it and inform you when the fix has
> appeared in r13b04_dev (probably monday next week).
>
> I'm not to fond of adding ac_cv_sizeof_* to the xcomp-conf files.
> `configure' should be able to figure these things out. If `configure'
> doesn't, it is a bug that should be fixed (and you can always pass the
> value on the command line, or in the environment as a workaround until
> the bug has been fixed).
>
> Regards,
> Rickard
>
> Winston Smith wrote:
>> This is *exactly* what I did, and with what's in r13b04_dev I got it
>> working on the avr32-linux platform (NGW100) pretty easily. I'm just
>> in the process of preparing a patch that includes a xcomp/.conf file
>> for avr32-linux for submission to erlang-patches.
>>
>> The new system works really well, the only thing I had to do was set
>> the environment variable ac_cv_sizeof_off_t to 4 as configure can't
>> figure it out and picks 8 (incorrectly).
>>
>> I noticed in the xcomp/README that you suggest updating otp_build to
>> include new settings such as this, so I'm adding new settings for
>> ac_cv_sizeof_off_t and also ac_cv_sizeof_size_t so they can more
>> easily be customized in the .conf file.
>>
>> Many thanks and a great job on significantly improving the cross
>> compilation support for Erlang!
>>
>>
>> Winston.
>>
>> On Wed, Feb 3, 2010 at 9:27 PM, Rickard Green <rickard@REDACTED> wrote:
>>> Current cross compiling support has lots of issues. I'd recommend that
>>> you wait for the R13B04 release if you want to cross compile
>>> Erlang/OTP.
>>>
>>> The upcoming R13B04 release will have much better support for cross
>>> compiling. I've just committed a bunch of cross fixes in the r13b04
>>> development branch which are available at
>>> <http://github.com/erlang/otp> (ccase/r13b04_dev branch). If you want
>>> to try it out, have a look at the xcomp/README
>>> <http://github.com/erlang/otp/blob/ccase/r13b04_dev/xcomp/README>
>>> since lots of things have changed regarding cross compiling since
>>> R13B03.
>>>
>>> If you get it working with r13b04_dev, the configure results from
>>> r13b04_dev may give you a hint about what is wrong with the R13B03
>>> configuration. However, I'd still recommend that you wait for the
>>> R13B04 release.
>>>
>>> Regards,
>>> Rickard Green, Erlang/OTP, Ericsson AB.
>>>
>>> 2010/1/29 Winston Smith <smith.winston.101@REDACTED>:
>>>> Trying to run a cross compiled version of R13B03 on an AVR32-Linux
>>>> system (NGW100/buildroot-2.3.0) I get the following:
>>>>
>>>> /home/avr32 # erl
>>>>
>>>> Crash dump was written to: erl_crash.dump
>>>> eheap_alloc: Cannot reallocate 3480006320 bytes of memory (of type
>>>> "heap").
>>>> Aborted
>>>>
>>>>
>>>> I've had this working before (I think with R13B01) but I've since
>>>> upgraded my build host from Ubuntu 9.04 to 9.10. I actually had this
>>>> same issue originally, and I somehow solved it, but I can't for the
>>>> life of me remember what I did. I am setting up an xconf file with
>>>> the proper values for size_t, off_t, big endian etc; in fact I based
>>>> my build script on Brian Zhou's script for building Erlang on NSLU2
>>>> Linux:
>>>>
>>>> http://svn.nslu2-linux.org/svnroot/optware/trunk/make/erlang.mk
>>>>
>>>> Any thoughts on where to start debugging/diagnosing this? (the
>>>> embedded gdb doesn't work) Is the erl_crash.dump useful (and how do I
>>>> interpret it!)?
>>>>
>>>> Many thanks in advance!
>>>>
>>>> ________________________________________________________________
>>>> erlang-questions mailing list. See http://www.erlang.org/faq.html
>>>> erlang-questions (at) erlang.org
>>>>
>>>>
>>> ________________________________________________________________
>>> erlang-questions (at) erlang.org mailing list.
>>> See http://www.erlang.org/faq.html
>>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>>>
>>>
>>
>
>
--
Rickard Green, Erlang/OTP, Ericsson AB.
More information about the erlang-questions
mailing list