How can I build libstdc++ with instrumentation to allow MSAN to work?
I have attempted to follow the instructions listed at
but there were a few issues:
1) I had to change the path that is used to find the library
2) It could not find ::max_align_t, so I simply defined it to be 16
3) "No rule to make target../src/c++11/libc++11convenience.la', needed
Could not figure this out.
Evgeniy, are these intructions still relevant?
I've updated build instructions, please see if they work for you.
Are the instructions at the same link?
That link seems to be dead now.
I tried to follow the new instructions, and at the last step (make) I get the following error
In file included from ../../libstdc++-v3/libsupc++/eh_aux_runtime.cc:29:
In file included from /home/daniel/programming/SomeLocalDir/libstdc++-v3/libsupc++/unwind-cxx.h:35:
/home/daniel/programming/SomeLocalDir/build/include/cstddef:51:11: error: no
member named 'max_align_t' in the global namespace
1 error generated.
make: *** [eh_aux_runtime.lo] Error 1
make: Leaving directory `/home/daniel/programming/SomeLocalDir/build/libsupc++'
make: *** [all-recursive] Error 1
make: Leaving directory `/home/daniel/programming/SomeLocalDir/build'
make: *** [all] Error 2
Seems like the same issue that I was getting before.
This is with TOT-gcc 4.9.0 20140116 (experimental) and clang version 3.5 (198044)
Try 4.8 branch of gcc. This process is known to work with google/gcc-4.8.
There is no upstream testing of building libstdc++ with clang, and it
is not an officially supported configuration, so it may break from
time to time.
You may want to look at libc++ as a replacement for libstdc++.
I was able to build libc++, but when I try to use -stdlib=libc++ I get the
/usr/bin/ld: /tmp/test-347fdf.o: undefined reference to symbol
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing
from command line
clang-3.5: error: linker command failed with exit code 1 (use -v to see
Any ideas what is going wrong here? Building on Ubuntu Saucy
I think clang driver is supposed to add -lstdc++ _after_ -lc++ with
-stdlib=libc++. This may have changed recently.
Did you follow "Build on Linux using CMake and libsupc++" section on
Yes (so no attempt at instrumentation has been made) other than doing the
build out of tree (in tree gave the same result), the example I got (clang
test.cpp -stdlib=libc++) is from there.