Public bug reported: Binary package hint: lib64stdc++6
If you try to (cross)compile a c++ application on a i386 system for a amd64 system then gcc will search the right version of libstdc++.so . If you installed lib64stdc++6 you have this file but it with it will be named /usr/lib64/libstdc++.so.6.0.13 and it will have a symlink to it named /usr/lib64/libstdc++.so.6 but there is no libstdc++.so symlink . So if you run "g++ -m64 what_you_want_to_compile.cpp" the compiler will only find the libstdc++.so symlink that's pointing to the 32bit version /usr/lib/libstdc++.so.6.0.13 and you will notice the following error: /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++ /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++ /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++ /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++ /usr/bin/ld: cannot find -lstdc++ collect2: ld returned 1 exit status If you create a symlink "/usr/lib64/libstdc++.so" that points to libstdc++.so.6 (also in /usr/lib64) this problem is fixed. g++ can now create 64bit executables on a 32 bit system. (and it can still create 32 bit executables if you remove the -m64 option) So the only thing that should happen is : the package lib64stdc++6 should install one more file with the following proporties "lrwxrwxrwx 1 root root 14 2010-08-28 15:44 /usr/lib64/libstdc++.so -> libstdc++.so.6" The following is probably automaticly included but just in case it isn't: I am using 10.04.1 LTS and the version of lib64stdc++6 is 4.4.3-4ubuntu5 ProblemType: Bug DistroRelease: Ubuntu 10.04 Package: lib64stdc++6 4.4.3-4ubuntu5 ProcVersionSignature: Ubuntu 2.6.32-24.41-generic 2.6.32.15+drm33.5 Uname: Linux 2.6.32-24-generic i686 Architecture: i386 CheckboxSubmission: 599e0ceddfe21469dfccfaf9e1ce596f CheckboxSystem: 6846a698de8fa2198772bce0df24d7c6 Date: Sat Aug 28 15:47:24 2010 InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5) ProcEnviron: LANG=en_US.utf8 SHELL=/bin/bash SourcePackage: gcc-4.4 ** Affects: gcc-4.5 (Ubuntu) Importance: Undecided Status: New ** Tags: apport-bug i386 lucid -- Missing symlink causes problems crosscompiling c++ apps https://bugs.launchpad.net/bugs/625839 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs