
1i5t5.duncan at cox
Dec 10, 2008, 1:05 AM
Post #3 of 4
(662 views)
Permalink
|
|
Re: Curious thing- linking against .so libs...
[In reply to]
|
|
Nikos Chantziaras <realnc [at] arcor> posted ghnsoh$ubf$1 [at] ger, excerpted below, on Wed, 10 Dec 2008 09:57:08 +0200: > Branko Badrljica wrote: >> gcc -O2 -m32 -march=barcelona -pipe -L/usr/lib64 -lgdgeda -o tt tt.c >> (libgdgeda has just .so ) > > -m32 generates 32-bit code. /usr/lib64 is only for 64-bit binaries. > Don't use -m32. That's absolutely correct as far as it goes, but may miss the point. Presumably, the OP is trying to compile 32-bit code, thus the -m32. Does that nVidia stuff even support 64-bit? If he's trying to do 64-bit compiles, then you are right, kill that -m32. If he's trying to do 32- bit compiles, he must link to 32-bit libs, not the 64-bit libs he's trying to link to at present. Keep in mind that Gentoo's 32-bit side of multilib is rather limited. In general, it's designed to work with pre-built binaries, not for compiling 32-bit, altho trivial 32-bit programs only using glibc and (for C++) libstdc++ (part of gcc) should be compilable. If you're going to be doing a lot of 32-bit compilation, the suggested solution is to use a 32-bit chroot in which you start from a standard 32- bit stage tarball and build most of an entire 32-bit Gentoo installation (sans kernel and services that are provided by the 64-bit side). It works and is in some ways much more in keeping with the normal Gentoo build-from-sources spirit, but it's a LOT more work than just running a standard multilib system so you can run the occasional 32-bit-only binary. Here's the Gentoo/amd64 32-bit chroot HOWTO: http://www.gentoo.org/proj/en/base/amd64/howtos/chroot.xml -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman
|