<div dir="ltr">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! :)<div>
<br></div><div>Guy<br><div><br><br><div class="gmail_quote">On Mon, Oct 3, 2011 at 3:34 PM, Gustav Simonsson <span dir="ltr"><<a href="mailto:gustav@erlang.org">gustav@erlang.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div text="#000000" bgcolor="#ffffff">
<br>
You can put a file named 'SKIP' in the application directories in
the lib directory, which will tell the build<br>
to exclude them.<br>
<br>
Other things you might be interested in doing to reach the bare
minimum in terms of disk size for your<br>
resulting build:<br>
<br>
* run arm-none-linux-gnueabi-strip (I think that's the right name
given your xcomp conf)<br>
on the resulting erts binaries to strip them of debug symbols.<br>
* Call <a href="http://www.erlang.org/doc/man/beam_lib.html#strip_release-1" target="_blank">http://www.erlang.org/doc/man/beam_lib.html#strip_release-1</a>
on the built beam files<br>
* Remove the following directories in the resulting erts directory,
and in all resulting application<br>
directories: src, include, doc, man, examples.<br>
* Compress the Erlang applications into .ez files. <br>
* Use fancy gcc options like the -Os optimisation flag<br>
<br>
Regards,<br><font color="#888888">
Gustav Simonsson</font><div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
On 03/10/11 14:53, Guy Wiener wrote:
<blockquote type="cite">
<div dir="ltr">Thanks a lot, Gustav and Matthias, now I see the
error of my ways :)
<div>After changing the built option to default, the
configuration proceeds, but get stuck on some missing
redundant library.</div>
<div>How do I configure the cross-compilation to build only the
bare minimum? I don't need auxiliary libs, just basic Erlang.</div>
<div><br>
</div>
<div>Thanks again,</div>
<div> Guy.<br>
<br>
<div class="gmail_quote">On Mon, Oct 3, 2011 at 2:46 PM,
Gustav Simonsson <span dir="ltr"><<a href="mailto:gustav.simonsson@erlang-solutions.com" target="_blank">gustav.simonsson@erlang-solutions.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><br>
Unless you are compiling on the ARM platform for the that
platform,<br>
your --build is most likely wrong, as Matt pointed out.<br>
<br>
You have erl_xcomp_build=arm-unknown-linux-gnu in your
xcomp file,<br>
try setting this value to 'guess' and see if that works,
that will<br>
run erts/autoconf/config.guess to grab the (most likely)
correct<br>
value for --build. It is also the default value for Erlang
xcomp<br>
conf files.<br>
<div><br>
Regards,<br>
Gustav Simonsson<br>
<br>
----- Ursprungligt meddelande -----<br>
</div>
Från: "Matthias Lang" <<a href="mailto:matthias@corelatus.se" target="_blank">matthias@corelatus.se</a>><br>
<div>Till: "Guy Wiener" <<a href="mailto:wiener.guy@gmail.com" target="_blank">wiener.guy@gmail.com</a>><br>
Kopia: "Erlang Questions" <<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>><br>
</div>
Skickat: måndag, 3 okt 2011 14:33:03<br>
<div>Ämne: Re: [erlang-questions] Erlang on
ARM9?<br>
<br>
</div>
<div>
<div>Hi,<br>
<br>
It's pretty odd that in your case --build is an ARM.
Are you typing those<br>
commands on an ARM system or on an x86?<br>
<br>
Or: I don't know what you're doing but it looks wrong.<br>
<br>
As a quick way to give you more information, I've put
a log which shows<br>
exactly what I do to build my ARM version in a clean
erlang source tree:<br>
<br>
<a href="http://www.corelatus.com/%7Ematthias/cross_arm.log.gz" target="_blank">http://www.corelatus.com/~matthias/cross_arm.log.gz</a><br>
<br>
The only non-comment difference between my ARM xconf
file and the MIPS<br>
one supplied with R14B03 is:<br>
<br>
erl_xcomp_host=arm-linux<br>
<br>
Matt<br>
<br>
----------------------------------------------------------------------<br>
<br>
On Monday, October 03, Guy Wiener wrote:<br>
<br>
> I've tried running the otp_build script with an
xcomp configuration file,<br>
> but encountered the following problem: the
configuration script tries to run<br>
> the file generated by the cross-compiler and
fails, although the --host flag<br>
> is given.<br>
><br>
> In details:<br>
> I run "./otp_build configure<br>
> --xcomp-conf=xcomp/erl-xcomp-arm-linux-gnu.conf"<br>
> The bootstrap build system is configured
properly. When configuring the<br>
> cross host system, it uses the following command:<br>
><br>
> ./configure --disable-dynamic-ssl-lib
--build=arm-unknown-linux-gnu<br>
> --host=arm-unknown-linux-gnu<br>
>
CC=/opt/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc<br>
> CFLAGS=-mcpu=arm926ej-s<br>
>
CXX=/opt/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-g++<br>
>
LD=/opt/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld
--disable-hipe<br>
> --cache-file=/dev/null<br>
><br>
> But then it causes the following error:<br>
><br>
> checking whether the C compiler works...
configure: error: cannot run C<br>
> compiled programs.<br>
> If you meant to cross compile, use `--host'.<br>
><br>
> But the configuration command is given a proper
--host option!<br>
><br>
> I attach the cross compilation configuration
file. Any advice is warmly<br>
> welcomed.<br>
><br>
> Thanks,<br>
> Guy Wiener.<br>
</div>
</div>
<div>
<div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
erlang-questions mailing list
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div></div></div>