Summary: | ASTERISK-18961: make fails on cross-compiling for ARM (armVFP) | ||
Reporter: | Zoltan Kovacs (kovzol) | Labels: | |
Date Opened: | 2011-12-03 12:43:48.000-0600 | Date Closed: | 2015-03-13 21:46:02 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Core/Portability |
Versions: | 1.8.7.1 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Ubuntu Linux 11.04 | Attachments: | |
Description: | I tried to cross-compile the newest stable Asterisk (1.8.7.1) for an armv6l. I used the following toolchain (from http://www.mikrocontroller.net/topic/240238):
{noformat} $ sudo mkdir /opt/eldk42 $ wget http://ftp.denx.de/pub/eldk/4.2/arm-linux-x86/iso/arm-2008-11-24.iso $ sudo mount -t iso9660 -o loop -o exec arm-2008-11-24.iso /mnt $ cd /mnt $ sudo ./install -d /opt/eldk42/ armVFP {noformat} I set the needed variables: {noformat} $ export ARCH=armVFP $ export CROSS_COMPILE=armVFP-linux- $ export CC=armVFP-linux-gcc $ export PATH=$PATH:/opt/eldk42/usr/bin:/opt/eldk42/bin $ export ROOT=/opt/eldk42/armVFP/ {noformat} I configured asterisk for compilation: {noformat} $ ./configure --host=arm --disable-xmldoc {noformat} Then I ran make: {noformat} $ make {noformat} Finally I got this error: {noformat} [...] ranlib libmxml.a make[2]: Leaving directory `/home/kovzol/tmp/arm/asterisk-1.8.7.1/menuselect/mxml' gcc -o menuselect menuselect.o strcompat.o menuselect_stub.o mxml/libmxml.a make[1]: Leaving directory `/home/kovzol/tmp/arm/asterisk-1.8.7.1/menuselect' Generating input for menuselect ... menuselect/menuselect --check-deps menuselect.makeopts menuselect/menuselect --check-deps menuselect.makeopts Generating embedded module rules ... [CC] astcanary.c -> astcanary.o [LD] astcanary.o -> astcanary /usr/bin/ld: astcanary.o: Relocations in generic ELF (EM: 40) /usr/bin/ld: astcanary.o: Relocations in generic ELF (EM: 40) /usr/bin/ld: astcanary.o: Relocations in generic ELF (EM: 40) /usr/bin/ld: astcanary.o: Relocations in generic ELF (EM: 40) /usr/bin/ld: astcanary.o: Relocations in generic ELF (EM: 40) /usr/bin/ld: astcanary.o: Relocations in generic ELF (EM: 40) astcanary.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[1]: *** [astcanary] Error 1 make: *** [utils] Error 2 {noformat} | ||
Comments: | By: Walter Doekes (wdoekes) 2011-12-05 02:49:48.568-0600 I'm not sure that cross compilation is actually supported by Digium. If you have the know-how to figure out what needs to be patched, then getting things fixed will be a lot easier. Any clues will help. By: Leif Madsen (lmadsen) 2011-12-07 11:55:55.731-0600 Thank you for taking the time to report this issue. Please note that your issue falls under the community supported heading and thus the support level may reflect that. More information about the various module support levels can be found at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States By: kalpesh sanghvi (kalpeshsanghvi13) 2012-02-23 01:26:23.915-0600 Even I am facing the same issue. I am using the linaro toolchain. Is there any patch or workaround to fix this issue. Regards, Kalpesh By: Matt Jordan (mjordan) 2015-03-13 21:46:02.692-0500 I'm closing this out as "Suspended." # Digium does not provide support for cross-compiling. # The community as a whole (including Digium) does not have a patch for this issue. If you're cross-compiling Asterisk, you're taking on a certain amount of responsibility. And if you have a problem compiling Asterisk in such an environment and run into a problem, providing a patch to fix the issues for that environment is the only way anyone will be able to fix these kinds of problems. The project is not able to obtain every toolchain ever created and reproduce or fix these kinds of bugs independently. |