Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Does 'gcc -m32' work?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
cutefuzzysquirrel
n00b
n00b


Joined: 19 Feb 2003
Posts: 6

PostPosted: Wed Mar 10, 2004 7:13 am    Post subject: Does 'gcc -m32' work? Reply with quote

Has anyone had any luck using '-m32' with gcc? I've tried to compile several programs with it, but I always end up with errors, usually due to missing libraries. Here's an example error message -

Code:

checking for XOpenDisplay in -lX11... no
ERROR:  You need libX11 to build Eterm.  Verify that you have libX11.a or
        libX11.so installed and that it is located in the X libraries
        directory shown above.  If it is in a different directory, try using
        the --x-libraries parameter to configure.
configure: error: Fatal:  libX11 not found.



This is just one example, I've tried several different progs, and nothing will compile with '-m32'.

I have the x86 emul libs installed (both base and X), I made sure gcc has multilib support, and I am able to run binary 32 bit programs (like opera).

This is driving me crazy, anybody have a clue?
_________________
Elen sila lumenn omentielvo
Back to top
View user's profile Send private message
cutefuzzysquirrel
n00b
n00b


Joined: 19 Feb 2003
Posts: 6

PostPosted: Thu Mar 11, 2004 10:43 pm    Post subject: BUMP Reply with quote

bump
_________________
Elen sila lumenn omentielvo
Back to top
View user's profile Send private message
slackerman
n00b
n00b


Joined: 22 Feb 2004
Posts: 72
Location: Palo Alto, CA

PostPosted: Thu Mar 11, 2004 11:10 pm    Post subject: Reply with quote

First, you should add the /emul/linux/x86 library paths to ./configure and/or make.

For the specific example you gave, you need to point ./configure to a location other than the default for the 32-bit X11 libraries. This ERROR message is likely returned when ./configure tries to compile some simple test code using the X11 library. It doesn't work because you're likely pointing it to the 64-bit version of the library...

i.e.:
Code:

./configure --x-libraries=/emul/linux/x86/usr/X11R6/lib


This is a "doable" thing if you only have to do it for a small set of libraries. I *think* (mind you I've not tried any of this), it should also work if you prepend all of the 32-bit libraries to your LD_LIBRARY_PATH variable.

Give it a try and post your results...

Cheers,

- Brendan

P.S.: Why Eterm? It builds natively, doesn't it?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum