You are not logged in.

#1 2010-01-07 20:49:44

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Problem cross compiling from x86_64 to i386

Please read from the fourth message.


OLD MESSAGE:
Today I needed to cross compile and ld could not get libc.co.6 because it looks it with the absolute path /usr/lib/libc.so.6 ignoring -L options,
I tried fixing using --sysroot, but ld was not compiled with its support.

So I was wondering, it should not be better to compile with --with-sysroot ?

Last edited by ezzetabi (2010-01-08 10:11:51)

Offline

#2 2010-01-07 21:26:46

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Problem cross compiling from x86_64 to i386

Post a feature request for this, so you can be sure that at least one dev will look at it.

Offline

#3 2010-01-07 22:26:46

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: Problem cross compiling from x86_64 to i386

I can easily make a cross compiler for a variety of architectures and have not run into that issue and the are a few already in [community].  Looks like you are doing it wrong...

Offline

#4 2010-01-08 09:46:45

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Problem cross compiling from x86_64 to i386

I am trying to compile the doom3 SDK: so it is a cross compiling from x86_64 to i386.
After downloading the SDK and unpacking it with --tar xf, since the package uses scons  I had to modify the file SConstruct  line BASELINKFLAGS: I put BASELINKFLAGS = [ "-m32", "-L/opt/lib32/lib", "-L/opt/lib32/usr/lib", ]

but the linking fails with
`/usr/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6'

On the other hand if I use
BASELINKFLAGS = [ "-m32", "--sysroot=/opt/lib32", ]
ld fails anyway with... :S
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../crti.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/crtbeginS.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/crtendS.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../crtn.o' is incompatible with i386 output

It is not really important, but I find annoying that I cannot compile it :S

Last edited by ezzetabi (2010-01-08 09:48:59)

Offline

Board footer

Powered by FluxBB