Erlang/OTP Forums

Author Message

<  Erlang questions mailing list  ~  Erlang on ARM9?

Guest
Posted: Mon Sep 19, 2011 8:14 am Reply with quote
Guest
Hello Erlangers,I am checking an option to use Erlang to control a Linux-based device (a programmable helicopter).  Is there an efficient port of Erlang that works on top of an ARM9 processor?  If so, the usage scenario will be many processes running on a single node, with frequent message-passing, some access to binary files, and no shared data (no ETS, DETS or Mnesia).  Is this scenario likely to perform well on an embedded Erlang?


Thanks,
  Guy Wiener,
  Dept. of Computer Science and Applied Math,
  Weizmann Institute for Science.


Post received from mailinglist
falcon74
Posted: Mon Sep 19, 2011 8:17 am Reply with quote
Joined: 01 Oct 2010 Posts: 6
On Mon, Sep 19, 2011 at 1:44 PM, Guy Wiener <wiener.guy@gmail.com (wiener.guy@gmail.com)> wrote:
Quote:
I am checking an option to use Erlang to control a Linux-based device (a programmable helicopter).
View user's profile Send private message
Guest
Posted: Tue Sep 20, 2011 2:16 pm Reply with quote
Guest
On 2011/09/19, at 09:14, Guy Wiener wrote:

> Hello Erlangers,
> I am checking an option to use Erlang to control a Linux-based device (a programmable helicopter). Is there an efficient port of Erlang that works on top of an ARM9 processor? If so, the usage scenario will be many processes running on a single node, with frequent message-passing, some access to binary files, and no shared data (no ETS, DETS or Mnesia). Is this scenario likely to perform well on an embedded Erlang?
>
> Thanks,
> Guy Wiener,
> Dept. of Computer Science and Applied Math,
> Weizmann Institute for Science.


Well, just it just compiles from source well.

I have experience using a S3C2440 board at 400 Mhz and on some informal benchmarks ( ring ) it is just 7 times slower than a 2,2 Ghz core 2 Duo Mac book.

From other erlang embedded experiences:

How do you control the hardware in C? Linux device drivers are very slow, when compared to direct memory access.
Doing NIFs and dynamic libs may be hard.
ARM processors are usually supported by the latest gcc version, and that is VERY good for Erlang porting.
If you try to compile Erlang with an older gcc version, you may get all the kind of "strange and wonderful" errors.
Check the gcc version of your toolchain!


My best regards

Paulo Ferreira

P.S.: Please replace "strange and wonderful" by the suitable words in your native language....


_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist
Guest
Posted: Mon Sep 26, 2011 11:38 am Reply with quote
Guest
Looks like I'll have to compile from source - Embedded Erlang is not what I need because it includes its-own embedded Linux, and I need to install on an existing Linux.

Can someone who has done this before be as kind as writing a minimal how-to for cross-compiling Erlang to ARM?


Thanks again,
  Guy

On Tue, Sep 20, 2011 at 5:16 PM, Paulo Ferreira <pdf@isep.ipp.pt (pdf@isep.ipp.pt)> wrote:
Quote:


On 2011/09/19, at 09:14, Guy Wiener wrote:

> Hello Erlangers,
> I am checking an option to use Erlang to control a Linux-based device (a programmable helicopter).  Is there an efficient port of Erlang that works on top of an ARM9 processor?  If so, the usage scenario will be many processes running on a single node, with frequent message-passing, some access to binary files, and no shared data (no ETS, DETS or Mnesia).  Is this scenario likely to perform well on an embedded Erlang?
>
> Thanks,
>   Guy Wiener,
>   Dept. of Computer Science and Applied Math,
>   Weizmann Institute for Science.




Well, just it just compiles from source well.

I have experience using a S3C2440 board at 400 Mhz and on some informal benchmarks ( ring ) it is just 7 times slower than a 2,2 Ghz core 2 Duo Mac book.

From other erlang embedded experiences:

       How do you control the hardware in C?  Linux device drivers are very slow, when compared to direct memory access.
       Doing NIFs and dynamic libs may be hard.
       ARM processors are usually supported by the latest gcc version, and that is VERY good for Erlang porting.
       If you try to compile Erlang with an older gcc version, you may get all the kind of "strange and wonderful"  errors.
       Check the gcc version of your toolchain!


My best regards

Paulo Ferreira

P.S.: Please replace "strange and wonderful" by the suitable words in your native language....

       





Post received from mailinglist
tonyrog
Posted: Mon Sep 26, 2011 11:48 am Reply with quote
User Joined: 12 Sep 2009 Posts: 43
On 26 sep 2011, at 13:38, Guy Wiener wrote:
Quote:
Looks like I'll have to compile from source - Embedded Erlang is not what I need because it includes its-own embedded Linux, and I need to install on an existing Linux.

Can someone who has done this before be as kind as writing a minimal how-to for cross-compiling Erlang to ARM?





I guess you found this link?:


http://www.trapexit.org/Cross_compiling


/Tony



Quote:
Thanks again,
View user's profile Send private message
falcon74
Posted: Mon Sep 26, 2011 12:22 pm Reply with quote
Joined: 01 Oct 2010 Posts: 6
This ARM9 in question would have some kind of a cross compile environment. For example, there's a rather popular (& cheap) ARM9 board called mini2440, and there are 2-3 different cross compilers... there's one from FriendlyARM, there's one from a co. called Pengutronix, then there's an old one from ARM itself, and some folks have rolled their own.

On Mon, Sep 26, 2011 at 5:08 PM, Guy Wiener <wiener.guy@gmail.com (wiener.guy@gmail.com)> wrote:
Quote:
Looks like I'll have to compile from source - Embedded Erlang is not what I need because it includes its-own embedded Linux, and I need to install on an existing Linux.

Can someone who has done this before be as kind as writing a minimal how-to for cross-compiling Erlang to ARM?


Thanks again,
View user's profile Send private message
Guest
Posted: Mon Sep 26, 2011 12:40 pm Reply with quote
Guest
The trapexit guide assumes you have a proper cross compilation toolchain.
You can generate a ARM9 toolchain using OpenEmbedded either by following
one of the guides online for creating a OE toolchain or by configuring OE
for a ARM9 machine and building some app or system image with it, as that
will also generate a ARM9 toolchain.

Regards,
Gustav Simonsson

----- Ursprungligt meddelande -----
Från: "Tony Rogvall" <tony@rogvall.se>
Till: "Guy Wiener" <wiener.guy@gmail.com>
Kopia: "Erlang Questions" <erlang-questions@erlang.org>
Skickat: måndag, 26 sep 2011 13:48:05
Ämne: Re: [erlang-questions] Erlang on ARM9?





On 26 sep 2011, at 13:38, Guy Wiener wrote:



Looks like I'll have to compile from source - Embedded Erlang is not what I need because it includes its-own embedded Linux, and I need to install on an existing Linux.


Can someone who has done this before be as kind as writing a minimal how-to for cross-compiling Erlang to ARM?



I guess you found this link?:


http://www.trapexit.org/Cross_compiling


/Tony







Thanks again,
Guy


On Tue, Sep 20, 2011 at 5:16 PM, Paulo Ferreira < pdf@isep.ipp.pt > wrote:






On 2011/09/19, at 09:14, Guy Wiener wrote:

> Hello Erlangers,
> I am checking an option to use Erlang to control a Linux-based device (a programmable helicopter). Is there an efficient port of Erlang that works on top of an ARM9 processor? If so, the usage scenario will be many processes running on a single node, with frequent message-passing, some access to binary files, and no shared data (no ETS, DETS or Mnesia). Is this scenario likely to perform well on an embedded Erlang?
>
> Thanks,
> Guy Wiener,
> Dept. of Computer Science and Applied Math,
> Weizmann Institute for Science.


Well, just it just compiles from source well.

I have experience using a S3C2440 board at 400 Mhz and on some informal benchmarks ( ring ) it is just 7 times slower than a 2,2 Ghz core 2 Duo Mac book.

>From other erlang embedded experiences:

How do you control the hardware in C? Linux device drivers are very slow, when compared to direct memory access.
Doing NIFs and dynamic libs may be hard.
ARM processors are usually supported by the latest gcc version, and that is VERY good for Erlang porting.
If you try to compile Erlang with an older gcc version, you may get all the kind of "strange and wonderful" errors.
Check the gcc version of your toolchain!


My best regards

Paulo Ferreira

P.S.: Please replace "strange and wonderful" by the suitable words in your native language....


_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions



"Installing applications can lead to corruption over time. Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"




_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Post received from mailinglist
Guest
Posted: Tue Sep 27, 2011 5:03 pm Reply with quote
Guest
On Monday, September 26, Gustav Simonsson wrote:

> The trapexit guide assumes you have a proper cross compilation toolchain.

Yes. And, if you want to compile R14B (i.e. the current Erlang
version), it's best to ignore the trap exit guide, it's intended
for R13B03 and earlier.

(I wrote the trap exit guide for R10B, based on things I'd picked up
since R7 or something. A bit after R13B04 came out, I changed the wiki
page to say "don't bother reading this if you're using R13B04 or
later" near the top. Maybe it's time for me to retire the whole page,
R14B is firmly established.)

> You can generate a ARM9 toolchain using OpenEmbedded either by following
> one of the guides online for creating a OE toolchain or by configuring OE
> for a ARM9 machine and building some app or system image with it, as that
> will also generate a ARM9 toolchain.

Another popular (free) toolchain is DENX ELDK

http://www.denx.de/wiki/DULG/ELDK

I haven't used OpenEmbedded, so I don't know if it's better or worse;
just mentioning it as another alternative.

Matt
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist
Guest
Posted: Mon Oct 03, 2011 10:26 am Reply with quote
Guest
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.

On Tue, Sep 27, 2011 at 8:03 PM, Matthias Lang <matthias@corelatus.se (matthias@corelatus.se)> wrote:
Quote:
On Monday, September 26, Gustav Simonsson wrote:

> The trapexit guide assumes you have a proper cross compilation toolchain.


Yes. And, if you want to compile R14B (i.e. the current Erlang
version), it's best to ignore the trap exit guide, it's intended
for R13B03 and earlier.

(I wrote the trap exit guide for R10B, based on things I'd picked up
since R7 or something. A bit after R13B04 came out, I changed the wiki
page to say "don't bother reading this if you're using R13B04 or
later" near the top. Maybe it's time for me to retire the whole page,
R14B is firmly established.)

> You can generate a ARM9 toolchain using OpenEmbedded either by following
> one of the guides online for creating a OE toolchain or by configuring OE
> for a ARM9 machine and building some app or system image with it, as that
> will also generate a ARM9 toolchain.


Another popular (free) toolchain is DENX ELDK

  http://www.denx.de/wiki/DULG/ELDK

I haven't used OpenEmbedded, so I don't know if it's better or worse;
just mentioning it as another alternative.

Matt

_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org (erlang-questions@erlang.org)
http://erlang.org/mailman/listinfo/erlang-questions







Post received from mailinglist
Guest
Posted: Mon Oct 03, 2011 12:33 pm Reply with quote
Guest
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

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@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist
Guest
Posted: Mon Oct 03, 2011 12:46 pm Reply with quote
Guest
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@corelatus.se>
Till: "Guy Wiener" <wiener.guy@gmail.com>
Kopia: "Erlang Questions" <erlang-questions@erlang.org>
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

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@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Post received from mailinglist
Guest
Posted: Mon Oct 03, 2011 12:53 pm Reply with quote
Guest
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@erlang-solutions.com (gustav.simonsson@erlang-solutions.com)> wrote:
Quote:

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@corelatus.se (matthias@corelatus.se)>
Till: "Guy Wiener" <wiener.guy@gmail.com (wiener.guy@gmail.com)>
Kopia: "Erlang Questions" <erlang-questions@erlang.org (erlang-questions@erlang.org)>

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

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@erlang.org (erlang-questions@erlang.org)
http://erlang.org/mailman/listinfo/erlang-questions







Post received from mailinglist
Guest
Posted: Mon Oct 03, 2011 1:35 pm Reply with quote
Guest
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:
Quote:
Thanks a lot, Gustav and Matthias, now I see the error of my ways Smile 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@erlang-solutions.com (gustav.simonsson@erlang-solutions.com)> wrote:
Quote:

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@corelatus.se (matthias@corelatus.se)>
Till: "Guy Wiener" <wiener.guy@gmail.com (wiener.guy@gmail.com)>
Kopia: "Erlang Questions" <erlang-questions@erlang.org (erlang-questions@erlang.org)>

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

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@erlang.org (erlang-questions@erlang.org)
http://erlang.org/mailman/listinfo/erlang-questions






_______________________________________________ erlang-questions mailing list erlang-questions@erlang.org (erlang-questions@erlang.org) http://erlang.org/mailman/listinfo/erlang-questions [/code]


Post received from mailinglist
Guest
Posted: Mon Oct 03, 2011 2:50 pm Reply with quote
Guest
My mistake: The build did not get stuck on some library, but erts is dependent on libcurses, which is not a part of the toolchain that I use (Sourcery lite).  Can I compile Erlang somehow without this lib? Curses! Smile

Guy


On Mon, Oct 3, 2011 at 3:34 PM, Gustav Simonsson <gustav@erlang.org (gustav@erlang.org)> wrote:
Quote:

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:
Quote:
Thanks a lot, Gustav and Matthias, now I see the error of my ways Smile 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@erlang-solutions.com (gustav.simonsson@erlang-solutions.com)> wrote:
Quote:

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@corelatus.se (matthias@corelatus.se)>
Till: "Guy Wiener" <wiener.guy@gmail.com (wiener.guy@gmail.com)>
Kopia: "Erlang Questions" <erlang-questions@erlang.org (erlang-questions@erlang.org)>

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

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@erlang.org (erlang-questions@erlang.org)
http://erlang.org/mailman/listinfo/erlang-questions






Code:

_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org ([email]erlang-questions@erlang.org[/email])
[url=http://erlang.org/mailman/listinfo/erlang-questions]http://erlang.org/mailman/listinfo/erlang-questions[/url]





_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org (erlang-questions@erlang.org)
http://erlang.org/mailman/listinfo/erlang-questions







Post received from mailinglist
Guest
Posted: Mon Oct 03, 2011 7:04 pm Reply with quote
Guest
On Monday, October 03, Guy Wiener wrote:

> My mistake: The build did not get stuck on some library, but erts is
> dependent on libcurses, which is not a part of the toolchain that I use
> (Sourcery lite). Can I compile Erlang somehow without this lib? Curses! Smile

Have you tried passing

--without-termcap

when you run configure?

Matt
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 2
Goto page 1, 2  Next
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum