Michael Ubell
2005-Nov-16 19:54 UTC
[CentOS] Generate 32bit programs on x86_64 architecture?
I'm trying to run purify on CentOS on an Intel Pentium 4/630 processor. Purify does not like the 64bit code. Is there some way to compile and run programs so that they are only using the 32 bit model? I tried gcc -m32 but then the system libraries come up missing. Purify engine: Error: Couldn't open the file crt1.o Purify engine: Error: Couldn't open the file crti.o Purify engine: Error: Couldn't resolve library directive: -ltcl8.4, (couldn't find library libtcl8.4.so or libtcl8.4.a). Purify engine: Error: Couldn't resolve library directive: -ldl, (couldn't find library libdl.so or libdl.a). Purify engine: Error: Couldn't resolve library directive: -lieee, (couldn't find library libieee.so or libieee.a). Purify engine: Error: Couldn't resolve library directive: -lm, (couldn't find library libm.so or libm.a). Purify engine: Error: Couldn't resolve library directive: -lc, (couldn't find library libc.so or libc.a). Purify engine: Error: Couldn't open the file crtn.o Purify engine: Error: Couldn't resolve library directive: -ldl, (couldn't find library libdl.so or libdl.a).
Aleksandar Milivojevic
2005-Nov-17 04:48 UTC
[CentOS] Generate 32bit programs on x86_64 architecture?
Michael Ubell wrote:> I'm trying to run purify on CentOS on an Intel Pentium 4/630 > processor. Purify does not like the 64bit code. Is there > some way to compile and run programs so that they are > only using the 32 bit model? > > I tried gcc -m32 but then the system libraries come > up missing.Yup, -m32 is the correct option. What you are missing are 32-bit development packages. Check for and install (and I mean install, not update, you want to have both i386 and x86_64 development packages) i386 versions of glibc-devel and libgcc. Depending on what you are trying to compile, you might need other i386 development packages. As you'll notice, x86_64 distribution contains both i386 and x86_64 versions of almost all libraries, however only i386 runtime gets installed by default, you must add development parts for i386 manually. For example, to compile C++ stuff, you'll need i386 libstdc++-devel. Esiest way to find out what you need to install is to locate 64-bit version of library that you probably already have installed, and then do for example rpm -qf /usr/lib64/libwhatever.so and see what package it belongs to (probably whatever-devel), and install i386 version of it.