Created attachment 157742 [details] patch This symbol wasn't exported from libcxxrt.so, but clang sometimes produces references to it during the normal build process: > undefined reference to `__cxa_deleted_virtual' Spotted on 10.1 during some plain C++ port update. Must be MFCd to 10.X.
Which Clang version, and perhaps special options, are involved here? The patch should be good; I'm just curious why this wasn't encountered before.
Virtual function deletion triggered the problem (http://stackoverflow.com/questions/3910083/deleting-virtual-functions-in-c0x) This is relatively new feature introduced in c++11. Maybe it isn't used much yet, that's why this went unnoticed.
I had to create the copy of this function in the port patch to solve the problem. But if more and more port projects begin to use this feature, this will turn into a problem that all released 10.X systems having clang won't be able to compile them.
Note that newer versions of libsupc++ expose this with CXXABI_1.3.6: __cxa_deleted_virtual@@CXXABI_1.3.6 See also here: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=183870 Maybe it's best to also put 'our' symbol under this namespace, for the sake of compatibility?
> Maybe it's best to also put 'our' symbol under this namespace, for the sake of compatibility? Yes, probably makes sense make it easy to swap in libsupc++ for testing.
Put up a review on https://reviews.freebsd.org/D2850 .
libsupc++ is for gcc-compiled C++, and libcxxer is for clang-compiled C++. They aren't compatible much anyway, can't really be mixed.
Here's a useful comment on ABI compat on various c++ support libs: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-February/082620.html
(In reply to yuri from comment #7) They are intended to be ABI compatible (or, rather, libcxxrt intends to support a superset of the libsupc++ ABI). In the base system, we link both libstdc++ and libc++ to libcxxrt, allowing you to use both in the same program and to throw exceptions through both (though not to pass standard library types other than exception objects across library boundaries). We compile libstdc++ as a filter library so that the definitions of the libsupc++ symbols that it exports actually come from libcxxrt. If the gcc ports are not doing this with their versions of libstdc++, then please file a bug with the gcc port maintainers.
A commit references this bug: Author: dim Date: Tue Jun 23 17:54:25 UTC 2015 New revision: 284732 URL: https://svnweb.freebsd.org/changeset/base/284732 Log: Add __cxa_deleted_virtual to libcxxrt's version map. This symbol can sometimes be emitted by clang++, and was not yet exported from libcxxrt. Attempt to be compatible with libsupc++ by using the same CXXABI_1.3.6 symbol version. Reported by: yuri@rawbw.com PR: 200863 Reviewed by: emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D2850 Changes: head/lib/libcxxrt/Version.map
A commit references this bug: Author: dim Date: Fri Jul 3 20:29:05 UTC 2015 New revision: 285109 URL: https://svnweb.freebsd.org/changeset/base/285109 Log: MFC r284732: Add __cxa_deleted_virtual to libcxxrt's version map. This symbol can sometimes be emitted by clang++, and was not yet exported from libcxxrt. Attempt to be compatible with libsupc++ by using the same CXXABI_1.3.6 symbol version. Approved by: re (kib) Reported by: yuri@rawbw.com PR: 200863 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D2850 Changes: stable/10/lib/libcxxrt/Version.map
A commit references this bug: Author: dim Date: Fri Jul 3 20:31:27 UTC 2015 New revision: 285110 URL: https://svnweb.freebsd.org/changeset/base/285110 Log: MFC r284732: Add __cxa_deleted_virtual to libcxxrt's version map. This symbol can sometimes be emitted by clang++, and was not yet exported from libcxxrt. Attempt to be compatible with libsupc++ by using the same CXXABI_1.3.6 symbol version. Reported by: yuri@rawbw.com PR: 200863 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D2850 Changes: _U stable/9/ _U stable/9/lib/ _U stable/9/lib/libcxxrt/ stable/9/lib/libcxxrt/Version.map