Closed GoogleCodeExporter closed 9 years ago
Very strange, but why g++ tries to link libstdc++ staticaly? I don't see any
options like -static-libgcc.
Can you produce compilation log and attach it to this issue?
make distclean && make 2>&1 | tee compile.log
Also, very like that /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a was
compiled incorrectly (without -fPIC option).
Original comment by loentar
on 9 Dec 2011 at 6:16
I was able to solve the problem by upgrading libstdc++6-4.4-dev to the same
version as libstdc++6.
> Very strange, but why g++ tries to link libstdc++ staticaly?
That was the key question.
With the help of strace (my favorite tool) I figured out that g++ fell back to
the static lib (/usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a) after getting
an error when trying to access the shared lib
(/usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.so). The shared lib was a broken
symlink. The link apparently broke when I upgraded libstdc++6 to 4.6.1-4
without upgrading libstdc++6-4.4-dev at the same time.
Sorry to have bothered you with this...
Original comment by j...@joergschneider.com
on 9 Dec 2011 at 7:14
Sure, I'm glad that problem is now solved.
Original comment by loentar
on 9 Dec 2011 at 7:27
The debian bug, which caused this problem has been fixed in gcc-4.6/4.6.2-16
and gcc-4.7/4.7.0~rc1-1.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651550
Original comment by j...@joergschneider.com
on 3 Mar 2012 at 5:24
Original issue reported on code.google.com by
j...@joergschneider.com
on 8 Dec 2011 at 10:08