[lug] 64-bit app, 32-bit arch, and gcc 4.x

David Morris lists at morris-clan.net
Tue Apr 22 13:36:24 MDT 2008


I am compiling a 64-bit application on a 32-bit debian
(lenny) install running a 64-bit kernel.

I have been using gcc-3.4, but wanted to use some of the
features available via g++-4.x in std::tr1.  However if I
try compiling with any 4.x version g++ compiler I get the
following error message (with version changed as
appropriate):

/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.1.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.1.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.1.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.1.3/libstdc++.a when searching for -lstdc++


I have the package "lib64stdc++6" installed and it worked
perfectly with gcc-3.4.  I've tried installing various
lib64stdc++6-4.x packages but they had no effect.

Any ideas on why gcc 4.x won't compile 64-bit applications?

--David



More information about the LUG mailing list