开发者

Failure when trying to cross-compile Erlang R13B04 for ARM

I am trying to cross-compile Erlang and running into a weird bug. The commands used are

make clean

./otp_build configure --host=arm-none-linux-gnueabi --build=i686-pc-linux-gnu 
--prefix=/opt/erlang erl_xcomp_sysroot=~/sbctools/arm-2007q3 --disable-hipe 
--disable-threads --disable-smp --disable-megaco-flex-scanner-lineno 
--disable-megaco-reentrant-flex-scanner --disable-dynamic-ssl-lib 
--without-termcap --without-javac --without-ssl

./otp_build boot

Their output can be seen at http://gist.github.com/576199 (it's too big to paste here), but th开发者_JAVA百科e error which ends the process is

/home/aromanov/sbctools/arm-2007q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: /home/aromanov/otp_src/erts/emulator/zlib/obj/arm-none-linux-gnueabi/opt/libz.a(adler32.o): Relocations in generic ELF (EM: 3)
/home/aromanov/sbctools/arm-2007q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: /home/aromanov/otp_src/erts/emulator/zlib/obj/arm-none-linux-gnueabi/opt/libz.a(adler32.o): Relocations in generic ELF (EM: 3)
/home/aromanov/sbctools/arm-2007q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: /home/aromanov/otp_src/erts/emulator/zlib/obj/arm-none-linux-gnueabi/opt/libz.a(adler32.o): Relocations in generic ELF (EM: 3)
/home/aromanov/sbctools/arm-2007q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: /home/aromanov/otp_src/erts/emulator/zlib/obj/arm-none-linux-gnueabi/opt/libz.a(adler32.o): Relocations in generic ELF (EM: 3)
/home/aromanov/sbctools/arm-2007q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: /home/aromanov/otp_src/erts/emulator/zlib/obj/arm-none-linux-gnueabi/opt/libz.a(adler32.o): Relocations in generic ELF (EM: 3)
/home/aromanov/otp_src/erts/emulator/zlib/obj/arm-none-linux-gnueabi/opt/libz.a: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[3]: *** [/home/aromanov/otp_src/bin/arm-none-linux-gnueabi/beam] Error 1
make[3]: Leaving directory `/home/aromanov/otp_src/erts/emulator'
make[2]: *** [opt] Error 2
make[2]: Leaving directory `/home/aromanov/otp_src/erts/emulator'
make[1]: *** [opt] Error 2
make[1]: Leaving directory `/home/aromanov/otp_src/erts'
make: *** [emulator] Error 2

Indeed, viewing ~/otp_src/erts/emulator/zlib/obj/arm-none-linux-gnueabi/opt/libz.a shows it's compiled for Intel 30386. But why? And how can I avoid it?

EDIT: ~/sbctools/arm-2007q3/bin is the first directory in the PATH. Do I perhaps need to add other toolchain directories as well?


make[4]: Entering directory /home/aromanov/otp_src/erts/emulator/zlib'
make -f arm-none-linux-gnueabi/Makefile TYPE=opt
make[5]: Entering directory/home/aromanov/otp_src/erts/emulator/zlib'
make[5]: Nothing to be done for all'.
make[5]: Leaving directory/home/aromanov/otp_src/erts/emulator/zlib'
make[4]: Leaving directory `/home/aromanov/otp_src/erts/emulator/zlib'

Looks like you've built zlib part before... when it was not correctly configured. Try make clean or make distclean and then recompile.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜