After upgrading Server 10.04 to 12.04, I was receiving errors related to lgcc_s while trying to compile with g++ and gcc. There are several versions of libgcc_s installed in
/usr/lib/gcc/x86_64-linux-gnu/, including 4.6 and 4.8. If I create a symlink to the
libgcc_s.so in the 4.6 directory to
/usr/lib so its on my path, the compilation gives the error
ld: unable to find lgcc_s. If I link the version from the 4.8 folder, everything works. Checking the version of
apt-cache policy libstdc++6 libstdc++6: Installed: 4.8.1-2ubuntu1~10.04.1 Candidate: 4.8.1-2ubuntu1~10.04.1 Version table: *** 4.8.1-2ubuntu1~10.04.1 0 100 /var/lib/dpkg/status 4.6.3-1ubuntu5 0 500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
The version of
On a clean 12.04 install, only the 4.6 directory is available in
/usr/lib/gcc/x86_64-linux-gnu/. Further, the output of
apt-cache policy libstdc++6 is
libstdc++6: Installed: 4.6.3-1ubuntu5 Candidate: 4.6.3-1ubuntu5 Version table: *** 4.6.3-1ubuntu5 0 500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages 100 /var/lib/dpkg/status
Why are the versions of
libstdc++6 different after the install? Why does linking the library from the 4.8 directory work but the 4.6 directory doesn't? How can I remove the 4.8 version of
libstdc++6 without wrecking its dependencies (which are pretty much every program on the system)?
Finally, the overarching reason for asking these questions is that I'm trying (and failing) to build several software packages (Cantera and RDKit) that are failing at various C++ compiler steps. I want to eliminate the gcc as the source of the problem, and this inconsistency sticks out to me.