[Bug 1012292] New: clang cannot link against most g++-produced libraries because it does not support ABI tags
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292 Bug ID: 1012292 Summary: clang cannot link against most g++-produced libraries because it does not support ABI tags Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: Linux Status: NEW Severity: Major Priority: P5 - None Component: Development Assignee: bnc-team-screening@forge.provo.novell.com Reporter: jengelh@inai.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- $ cat k.cpp #include <string> std::string foo(void) { return ""; } $ g++ -c k.cpp $ nm k.o | grep foo 0000000000000000 T _Z3fooB5cxx11v $ clang++ -c k.cpp $ nm k.o | grep foo 0000000000000000 T _Z3foov $ clang++ -c k.cpp -D_GLIBCXX_USE_CXX11_ABI=1 $ nm k.o | grep foo 0000000000000000 T _Z3foov Because clang does not produce the same symbol names as g++, clang will not be able to link to g++ libraries - specifically, to functions which take or which return std::string. What this looks in a practical setting is something like $ clang++ -shared -fPIC -o libmy.so my.cpp -lvmime $ ldd -r libmy.so undefined symbol: vmime::charset::getName() const (libmy.so) $ nm libmy.so U _ZNK5vmime9parameter7getNameEv $ nm -D /usr/lib64/libvmime.so 00012345 T _ZNK5vmime9parameter7getNameB5cxx11Ev -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292
Jan Engelhardt
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292
Jan Engelhardt
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292#c1
--- Comment #1 from Jan Engelhardt
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292
Todd R
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292#c2
Markus K
Judging from https://reviews.llvm.org/D18035 , there must be some newer clang version that has it.
Yes, llvm 3.9 is out since September and fixes that incompatibility: http://llvm.org/releases/3.9.0/docs/ReleaseNotes.html#gcc-abi-tag -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292#c3
Ismail Donmez
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292#c5
Ismail Donmez
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292
http://bugzilla.opensuse.org/show_bug.cgi?id=1012292#c6
Jan Engelhardt
participants (1)
-
bugzilla_noreply@novell.com