cross compile failed for big endian ixp425

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

cross compile failed for big endian ixp425

saravanan chanemouganandam-3
Hi,

I am getting problem while cross compiling madwifi-ng for the target
arm-linux big-endian system IXP425 running snapgear linux built
against uClibc. I am using snapgear's binary version of
arm-linux-tools-20061213.tar.gz cross tool chain installed as
/usr/local/arm-linux to build linux kernel and other package as well
from within snapgear source tree.

On cross compiling latest madwifi outside the snapgear source tree, it
throws errors as
sarac:/home/saravanan/madwifi-ng/madwifi#make
CROSS_COMPILE=/usr/local/bin/arm-linux-
KERNELPATH=/home/saravanan/adi/devel/ADI/linux-2.6.x
TOOLPREFIX=/usr/local/bin/arm-linux- TARGET=xscale-be-elf
......
.....
make[2]: Entering directory `/home/saravanan/madwifi-ng/madwifi/tools/ath_info'
/usr/local/bin/arm-linux-gcc -g -O2 -W -Wall -mbig-endian  -c ath_info.c
/usr/local/bin/arm-linux-gcc  -o ath_info ath_info.o
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld.real:
ath_info.o: compiled for a big endian system and target is little
endian
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld.real:
failed to merge target specific data of file ath_info.o
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld.real:
ath_info.o(.text+0x70): warning: unresolvable relocation 1 against
symbol `usleep@@GLIBC_2.0'
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld.real:
final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[2]: *** [ath_info] Error 1
make[2]: Leaving directory `/home/saravanan/madwifi-ng/madwifi/tools/ath_info'
make[1]: *** [all-subdirs] Error 1
make[1]: Leaving directory `/home/saravanan/madwifi-ng/madwifi/tools'
make: *** [tools] Erreur 1

Can anybody precise me why madwifi is getting built against GLIBC and
not against uClibc.? Is that any other options are missing ?

Thanks
Sara

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Madwifi-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/madwifi-users
Reply | Threaded
Open this post in threaded view
|

Re: cross compile failed for big endian ixp425

Pavel Roskin
On Tue, 2008-07-15 at 12:36 +0200, saravanan chanemouganandam wrote:

> Hi,
>
> I am getting problem while cross compiling madwifi-ng for the target
> arm-linux big-endian system IXP425 running snapgear linux built
> against uClibc. I am using snapgear's binary version of
> arm-linux-tools-20061213.tar.gz cross tool chain installed as
> /usr/local/arm-linux to build linux kernel and other package as well
> from within snapgear source tree.
>
> On cross compiling latest madwifi outside the snapgear source tree, it
> throws errors as
> sarac:/home/saravanan/madwifi-ng/madwifi#make
> CROSS_COMPILE=/usr/local/bin/arm-linux-
> KERNELPATH=/home/saravanan/adi/devel/ADI/linux-2.6.x
> TOOLPREFIX=/usr/local/bin/arm-linux- TARGET=xscale-be-elf
> ......
> .....
> make[2]: Entering directory `/home/saravanan/madwifi-ng/madwifi/tools/ath_info'
> /usr/local/bin/arm-linux-gcc -g -O2 -W -Wall -mbig-endian  -c ath_info.c
> /usr/local/bin/arm-linux-gcc  -o ath_info ath_info.o
> /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld.real:
> ath_info.o: compiled for a big endian system and target is little
> endian

I see.  "-mbig-endian" must come from CFLAGS, but it's not used when
linking.  I've committed the fix (it's revision 3773).

--
Regards,
Pavel Roskin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Madwifi-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/madwifi-users
Reply | Threaded
Open this post in threaded view
|

Re: cross compile failed for big endian ixp425

saravanan chanemouganandam-3
Hi Pavel,

I have applied your fix ( revision r3773) and now it gets compiled for
the big endian
#file ath_info/ath_info
ath_info/ath_info: ELF 32-bit MSB executable, ARM, version 1 (ARM),
for GNU/Linux 2.0.0, dynamically linked (uses shared libs), for
GNU/Linux 2.0.0, not stripped.

When I tried to execute wlanconfig on my target IXP425 it throws an error
#wlanconfig
libc.so.6: aborted attempt to load wlanconfig!

The target IXP425 is running snapgear's linux 2.6.17 built against
uClibc whereas  madwifi is getting built against GLIBC and throws the
above error.

I use   sarac:/home/saravanan/madwifi-ng/madwifi# make
CROSS_COMPILE=/usr/local/bin/arm-linux-
KERNELPATH=/home/saravanan/adi/devel/ADI/linux-2.6.x
TARGET=xscale-be-elf TOOLPREFIX=/usr/local/bin/arm-linux- V=1
KMODPATH=/home/saravanan/madwifi-ng/net for cross compile and  make
info shows

The following settings will be used for compilation:
TARGET       : xscale-be-elf
ARCH         : arm
BUS          : PCI
KERNELRELEASE: 2.6.17-uc1-adi4
KERNELPATH   : /home/saravanan/adi/devel/ADI/linux-2.6.x
KERNELCONF   : /home/saravanan/adi/devel/ADI/linux-2.6.x/.config
KMODPATH     : /home/saravanan/madwifi-ng/net
KMODSUF      : ko

Is that  I am missing any other options to tell the compiler (
/usr/local/arm-linux/bin)to built against uClibc ?

Thanks
Sara

On 7/16/08, Pavel Roskin <[hidden email]> wrote:

> On Tue, 2008-07-15 at 12:36 +0200, saravanan chanemouganandam wrote:
>> Hi,
>>
>> I am getting problem while cross compiling madwifi-ng for the target
>> arm-linux big-endian system IXP425 running snapgear linux built
>> against uClibc. I am using snapgear's binary version of
>> arm-linux-tools-20061213.tar.gz cross tool chain installed as
>> /usr/local/arm-linux to build linux kernel and other package as well
>> from within snapgear source tree.
>>
>> On cross compiling latest madwifi outside the snapgear source tree, it
>> throws errors as
>> sarac:/home/saravanan/madwifi-ng/madwifi#make
>> CROSS_COMPILE=/usr/local/bin/arm-linux-
>> KERNELPATH=/home/saravanan/adi/devel/ADI/linux-2.6.x
>> TOOLPREFIX=/usr/local/bin/arm-linux- TARGET=xscale-be-elf
>> ......
>> .....
>> make[2]: Entering directory
>> `/home/saravanan/madwifi-ng/madwifi/tools/ath_info'
>> /usr/local/bin/arm-linux-gcc -g -O2 -W -Wall -mbig-endian  -c ath_info.c
>> /usr/local/bin/arm-linux-gcc  -o ath_info ath_info.o
>> /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld.real:
>> ath_info.o: compiled for a big endian system and target is little
>> endian
>
> I see.  "-mbig-endian" must come from CFLAGS, but it's not used when
> linking.  I've committed the fix (it's revision 3773).
>
> --
> Regards,
> Pavel Roskin
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Madwifi-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/madwifi-users
Reply | Threaded
Open this post in threaded view
|

Re: cross compile failed for big endian ixp425

Imre Kaloz
Hello Sara,

Your toolchain seems to be configured to compile for glibc, you'll have to change
your toolchain if you want to build against uclibc. It doesn't matter for the kernel
modules, but does for the madwifi tools like wlanconfig.


Cheers,
Imre


P.S:
May I ask which board are you trying to use? We support the Pronghorn series and the
Sidewinder in OpenWrt SVN trunk, and the build system takes care about the
cross-compile issues.


On 2008.07.16. 10:33:45 saravanan chanemouganandam <[hidden email]> wrote:

> Hi Pavel,
>
> I have applied your fix ( revision r3773) and now it gets compiled for
> the big endian
> #file ath_info/ath_info
> ath_info/ath_info: ELF 32-bit MSB executable, ARM, version 1 (ARM),
> for GNU/Linux 2.0.0, dynamically linked (uses shared libs), for
> GNU/Linux 2.0.0, not stripped.
>
> When I tried to execute wlanconfig on my target IXP425 it throws an error
> #wlanconfig
> libc.so.6: aborted attempt to load wlanconfig!
>
> The target IXP425 is running snapgear's linux 2.6.17 built against
> uClibc whereas  madwifi is getting built against GLIBC and throws the
> above error.
>
> I use   sarac:/home/saravanan/madwifi-ng/madwifi# make
> CROSS_COMPILE=/usr/local/bin/arm-linux-
> KERNELPATH=/home/saravanan/adi/devel/ADI/linux-2.6.x
> TARGET=xscale-be-elf TOOLPREFIX=/usr/local/bin/arm-linux- V=1
> KMODPATH=/home/saravanan/madwifi-ng/net for cross compile and  make
> info shows
>
> The following settings will be used for compilation:
> TARGET       : xscale-be-elf
> ARCH         : arm
> BUS          : PCI
> KERNELRELEASE: 2.6.17-uc1-adi4
> KERNELPATH   : /home/saravanan/adi/devel/ADI/linux-2.6.x
> KERNELCONF   : /home/saravanan/adi/devel/ADI/linux-2.6.x/.config
> KMODPATH     : /home/saravanan/madwifi-ng/net
> KMODSUF      : ko
>
> Is that  I am missing any other options to tell the compiler (
> /usr/local/arm-linux/bin)to built against uClibc ?
>
> Thanks
> Sara
>
> On 7/16/08, Pavel Roskin <[hidden email]> wrote:
>> On Tue, 2008-07-15 at 12:36 +0200, saravanan chanemouganandam wrote:
>>> Hi,
>>>
>>> I am getting problem while cross compiling madwifi-ng for the target
>>> arm-linux big-endian system IXP425 running snapgear linux built
>>> against uClibc. I am using snapgear's binary version of
>>> arm-linux-tools-20061213.tar.gz cross tool chain installed as
>>> /usr/local/arm-linux to build linux kernel and other package as well
>>> from within snapgear source tree.
>>>
>>> On cross compiling latest madwifi outside the snapgear source tree, it
>>> throws errors as
>>> sarac:/home/saravanan/madwifi-ng/madwifi#make
>>> CROSS_COMPILE=/usr/local/bin/arm-linux-
>>> KERNELPATH=/home/saravanan/adi/devel/ADI/linux-2.6.x
>>> TOOLPREFIX=/usr/local/bin/arm-linux- TARGET=xscale-be-elf
>>> ......
>>> .....
>>> make[2]: Entering directory
>>> `/home/saravanan/madwifi-ng/madwifi/tools/ath_info'
>>> /usr/local/bin/arm-linux-gcc -g -O2 -W -Wall -mbig-endian  -c ath_info.c
>>> /usr/local/bin/arm-linux-gcc  -o ath_info ath_info.o
>>> /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld.real:
>>> ath_info.o: compiled for a big endian system and target is little
>>> endian
>>
>> I see.  "-mbig-endian" must come from CFLAGS, but it's not used when
>> linking.  I've committed the fix (it's revision 3773).
>>
>> --
>> Regards,
>> Pavel Roskin
>>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Madwifi-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/madwifi-users
>



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Madwifi-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/madwifi-users