Compile 32bit on 64bit host
From Attie's Wiki
(Difference between revisions)
m (Created page with 'While setting up distcc, I ran into a problem. The server is running Fedora 12 64-bit, while the client is running Fedora 12 32-bit. To make 32-bit binaries you need to add <cod…') |
m |
||
Line 4: | Line 4: | ||
<pre> | <pre> | ||
$ yum install glibc-devel.i686 | $ yum install glibc-devel.i686 | ||
+ | $ yum install libgcc.i686 | ||
... | ... | ||
$ gcc test.c -o test -m32 | $ gcc test.c -o test -m32 |
Revision as of 22:31, 17 July 2010
While setting up distcc, I ran into a problem. The server is running Fedora 12 64-bit, while the client is running Fedora 12 32-bit.
To make 32-bit binaries you need to add -m32
to the compile line, and install a couple of things on the server:
$ yum install glibc-devel.i686 $ yum install libgcc.i686 ... $ gcc test.c -o test -m32
Note: While sorting this problem I found a new friend:
yum whatprovides <filename>