[asterisk-bugs] [JIRA] (ASTERISK-18961) make fails on cross-compiling for ARM (armVFP)

Matt Jordan (JIRA) noreply at issues.asterisk.org
Fri Mar 13 21:40:34 CDT 2015


     [ https://issues.asterisk.org/jira/browse/ASTERISK-18961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan updated ASTERISK-18961:
-----------------------------------

    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}


  was:
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):

$ 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

I set the needed variables:

$ 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/

I configured asterisk for compilation:

$ ./configure --host=arm --disable-xmldoc

Then I ran make:

$ make

Finally I got this error:

[...]
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




> make fails on cross-compiling for ARM (armVFP)
> ----------------------------------------------
>
>                 Key: ASTERISK-18961
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-18961
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Portability
>    Affects Versions: 1.8.7.1
>         Environment: Ubuntu Linux 11.04
>            Reporter: Zoltan Kovacs
>
> 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}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list