FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 04-06-2011, 12:01 PM
Patrick Dupre
 
Default compile 32 bit on 64 bit machine

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:

So, it seems that the include files are not correct.
I also tried:
gcc ttt.c -L/usr/lib/gcc/x86_64-redhat-linux/4.4.5/32 -m32

with the same error.

How can I make it works ?

thank.

--
---
================================================== ========================
Patrick DUPRÉ | |
Department of Chemistry | | Phone: (44)-(0)-1904-434384
The University of York | | Fax: (44)-(0)-1904-432516
Heslington | |
York YO10 5DD United Kingdom | | email: patrick.dupre@york.ac.uk
================================================== ========================--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 04-06-2011, 12:10 PM
Jakub Jelinek
 
Default compile 32 bit on 64 bit machine

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
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 04-06-2011, 12:18 PM
Sam Varshavchik
 
Default compile 32 bit on 64 bit machine

Patrick Dupre writes:






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:





So, it seems that the include files are not correct.





The above is only the first part of the error message, you left out the
rest of it.





But, in any case, do you have the glibc.i686, glibc-static.i686, and glibc-
devel.i686 rpms installed in addition to their x86_64 counterparts?


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 06:31 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org