compile 32 bit on 64 bit machine

Jakub Jelinek jakub at redhat.com
Wed Apr 6 12:10:14 UTC 2011


On Wed, Apr 06, 2011 at 01:01:13PM +0100, Patrick Dupre wrote:
> Hello,
> 
> I am trying to compile a very simple application on a 64 bit machine
> which may run on a 32 bit machine.
> gcc -m32 ttt.c
> 
> gives me an error:
> In file included from /usr/include/features.h:385,
>                  from /usr/include/stdio.h:28,
>                  from ttt.c:2:

The above is not an error, just a context of some error.
I guess the error is that /usr/include/gnu/stubs-32.h doesn't exist
on your box, which is easily solvable by
sudo yum install /usr/include/gnu/stubs-32.h
(which is the same as
sudo yum install glibc-devel.i686
).  You want also 32-bit libgcc if you don't have it installed,
so
sudo yum install glibc-devel.i686 libgcc.i686

	Jakub


More information about the users mailing list