PDA

View Full Version : crt1.o (compiling 32-bit binaries)


Guido64
6th December 2004, 09:31 PM
This seems pretty simple, but I can't find any answers for it on the net. I have a fresh install of FC3 on an Athlon64, and I can't compile anything in 32-bit mode. Trying "Hello world" gives:

[root@area51 tmp]# gcc -m32 hello.c
hello.c: In function `main':
hello.c:7: warning: return type of 'main' is not `int'
/usr/bin/ld: crt1.o: No such file: No such file or directory

crt1.o is present in /usr/lib64 but not in /usr/lib. Is there an RPM that contains this? I have the following groups installed:
Compatibility Arch Support
x86 Compatibility Arch Development Support

Or is there some way to get a 32-bit binary to link with the 64-bit crt1.o?

Guido64
6th December 2004, 09:57 PM
So, I think I've partially answered my own question: I need to install glibc-devel-2.3.3-74.i386

Clue to this was that 'rpm -q glibc' lists two entries, but 'rpm -q glibc-devel' lists only one. 'yum info glibc-devel' shows x86_64 installed, and i386 available in 'base'.

The problem now is, yum refuses to install the i386 version:
yum install glibc-devel-2.3.3-74.i386

reports "nothing to do", despite the fact that it just reported that the package was not installed. Is there something I'm missing in the yum command? And why wasn't this installed as part of one of the "Compatability" groups?

Dubious Dave
28th May 2008, 12:52 AM

did you try

yum install glibc-devel.i386

? this worked for me.