cancel
Showing results for 
Search instead for 
Did you mean: 

gcc problem

Fedele Giuseppe
Frequent Advisor

gcc problem

Hello I need to compile a 32bit application on a 64bit platfrom:

# uname -a
Linux pippo 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

if I run the gcc command with "-m32" option I get the following error:

# gcc -m32 -o output32 hello.c
In file included from /usr/include/features.h:352,
from /usr/include/stdio.h:28,
from hello.c:1:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory


infact the stubs-32.h file is missing in my platform

Must I specify further options, or install additional software?

Many thanks

Giuseppe
3 REPLIES
DAVID W MEDBERRY
Occasional Advisor

Re: gcc problem

"linux32" is a command that sets up the proper environment variables and gcc flags.

Under debian this is provided by the package:
util-linux


linux32 is a symbolic link to "setarch"

YMMV on other Linux versions
DAVID W MEDBERRY
Occasional Advisor

Re: gcc problem

You may want to check for util-linux-ng in your distribution. (Originally developed at Red Hat.)
Ragu_3
Trusted Contributor

Re: gcc problem

http://groups.google.se/group/linux.debian.ports.x86-64/browse_thread/thread/ded2c55b7e7b6a58

This is a good thread when you are trying to cross-compile.
Debian GNU/Linux for the Enterprise! Ask HP ...