[erlang-questions] Erlang on ARM9?

Gustav Simonsson gustav@REDACTED
Mon Oct 3 15:34:18 CEST 2011


You can put a file named 'SKIP' in the application directories in the 
lib directory, which will tell the build
to exclude them.

Other things you might be interested in doing to reach the bare minimum 
in terms of disk size for your
resulting build:

  * run arm-none-linux-gnueabi-strip (I think that's the right name 
given your xcomp conf)
on the resulting erts binaries to strip them of debug symbols.
* Call http://www.erlang.org/doc/man/beam_lib.html#strip_release-1 on 
the built beam files
* Remove the following directories in the resulting erts directory, and 
in all resulting application
directories: src, include, doc, man, examples.
* Compress the Erlang applications into .ez files.
* Use fancy gcc options like the -Os optimisation flag

Regards,
Gustav Simonsson




On 03/10/11 14:53, Guy Wiener wrote:
> Thanks a lot, Gustav and Matthias, now I see the error of my ways :)
> After changing the built option to default, the configuration 
> proceeds, but get stuck on some missing redundant library.
> How do I configure the cross-compilation to build only the bare 
> minimum?  I don't need auxiliary libs, just basic Erlang.
>
> Thanks again,
>   Guy.
>
> On Mon, Oct 3, 2011 at 2:46 PM, Gustav Simonsson 
> <gustav.simonsson@REDACTED 
> <mailto:gustav.simonsson@REDACTED>> wrote:
>
>
>     Unless you are compiling on the ARM platform for the that platform,
>     your --build is most likely wrong, as Matt pointed out.
>
>     You have erl_xcomp_build=arm-unknown-linux-gnu in your xcomp file,
>     try setting this value to 'guess' and see if that works, that will
>     run erts/autoconf/config.guess to grab the (most likely) correct
>     value for --build. It is also the default value for Erlang xcomp
>     conf files.
>
>     Regards,
>     Gustav Simonsson
>
>     ----- Ursprungligt meddelande -----
>     Från: "Matthias Lang" <matthias@REDACTED
>     <mailto:matthias@REDACTED>>
>     Till: "Guy Wiener" <wiener.guy@REDACTED
>     <mailto:wiener.guy@REDACTED>>
>     Kopia: "Erlang Questions" <erlang-questions@REDACTED
>     <mailto:erlang-questions@REDACTED>>
>     Skickat: måndag, 3 okt 2011 14:33:03
>     Ämne: Re: [erlang-questions] Erlang on ARM9?
>
>     Hi,
>
>     It's pretty odd that in your case --build is an ARM. Are you
>     typing those
>     commands on an ARM system or on an x86?
>
>     Or: I don't know what you're doing but it looks wrong.
>
>     As a quick way to give you more information, I've put a log which
>     shows
>     exactly what I do to build my ARM version in a clean erlang source
>     tree:
>
>     http://www.corelatus.com/~matthias/cross_arm.log.gz
>     <http://www.corelatus.com/%7Ematthias/cross_arm.log.gz>
>
>     The only non-comment difference between my ARM xconf file and the MIPS
>     one supplied with R14B03 is:
>
>       erl_xcomp_host=arm-linux
>
>     Matt
>
>     ----------------------------------------------------------------------
>
>     On Monday, October 03, Guy Wiener wrote:
>
>     > I've tried running the otp_build script with an xcomp
>     configuration file,
>     > but encountered the following problem: the configuration script
>     tries to run
>     > the file generated by the cross-compiler and fails, although the
>     --host flag
>     > is given.
>     >
>     > In details:
>     > I run "./otp_build configure
>     > --xcomp-conf=xcomp/erl-xcomp-arm-linux-gnu.conf"
>     > The bootstrap build system is configured properly.  When
>     configuring the
>     > cross host system, it uses the following command:
>     >
>     > ./configure --disable-dynamic-ssl-lib --build=arm-unknown-linux-gnu
>     > --host=arm-unknown-linux-gnu
>     > CC=/opt/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc
>     > CFLAGS=-mcpu=arm926ej-s
>     > CXX=/opt/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-g++
>     > LD=/opt/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld
>     --disable-hipe
>     > --cache-file=/dev/null
>     >
>     > But then it causes the following error:
>     >
>     > checking whether the C compiler works... configure: error:
>     cannot run C
>     > compiled programs.
>     > If you meant to cross compile, use `--host'.
>     >
>     > But the configuration command is given a proper --host option!
>     >
>     > I attach the cross compilation configuration file.  Any advice
>     is warmly
>     > welcomed.
>     >
>     > Thanks,
>     >   Guy Wiener.
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111003/c8788d1e/attachment.htm>


More information about the erlang-questions mailing list