Mac OS X (Darwin) and Symbol not found: __ZTIN10__cxxabiv117__class_type_infoE

Hi All,

I'm testing another crypto library. This time its a C++ library.

$ /usr/local/bin/clang++ -fsanitize=address -fsanitize=undefined -m64
-Ibuild/include -O3 -finline-functions -D_REENTRANT -Wno-long-long -W
-Wall -fPIC -fvisibility=hidden -c src/algo_base/symkey.cpp -o
build/lib/algo_base_symkey.o
/usr/local/bin/clang++ -fsanitize=address -fsanitize=undefined -m64
-Ibuild/include -O3 -finline-functions -D_REENTRANT -Wno-long-long -W
-Wall -fPIC -fvisibility=hidden -c src/algo_factory/algo_factory.cpp
-o build/lib/algo_factory.o
...
$ export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib/clang/3.3/lib/darwin/:./
$ ./check
dyld: Symbol not found: __ZTIN10__cxxabiv117__class_type_infoE
  Referenced from: .//libbotan-1.10.dylib.0
  Expected in: flat namespace
in .//libbotan-1.10.dylib.0
Trace/BPT trap: 5

I see the same problem was briefly discussed at
http://clang-developers.42468.n3.nabble.com/recent-change-broke-fcatch-undefined-behavior-td4027379i20.html.
But I don't see a workaround.

Any ideas?

Jeff

$ uname -a
Darwin riemann.home.pvt 12.4.0 Darwin Kernel Version 12.4.0: Wed May
1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64

$ /usr/local/bin/clang++ -v
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-apple-darwin12.4.0
Thread model: posix

Some library linked to libbotan is not linked to libcxxrt or equivalent library

Thanks Konstantin.

It looks like libcxxrt missing altogether:

    $ find /usr/local -iname libcxxrt
    $

Let me build Clang from sources again and see if it shows up in the
build directory. Perhaps `make install` missed it.

Related: these sanitizers are awesome - they are finding obscure stuff
throughout all the projects being tested. Every engineering process
should include a Clang scan-build and sanitize run.

Jeff

I don't know how the default OSX build works - you can probably clone, build and install it pretty easily though
https://github.com/pathscale/libcxxrt

You can workaround this issue by disabling the specific undefined behavior check that uses this symbol:

clang -fsanitize=undefined -fno-sanitize=vptr

I just hope Apple will fix the OS X libcxxabi exported symbols in the next release.

You can workaround this issue by disabling the specific undefined behavior check that uses this symbol:

clang -fsanitize=undefined -fno-sanitize=vptr

I just hope Apple will fix the OS X libcxxabi exported symbols in the next release.

Perfect, thanks.

Jeff