[Llvm-bgq-discuss] trouble with latest clang install

Biddiscombe, John A. biddisco at cscs.ch
Fri Feb 14 06:52:24 CST 2014


Hal

Apologies, I didn’t realize I was using the wrong wrapper.

I recompiled using the bgclang++11 wrapper and things work much better.
I first compiled boost ok, but had trouble linking to it - I ran into the
cxxABI link error with boost program_options:: __1 etc etc

After a bit of goggling around explained to me the std c++ lib issues, so
I had another go using the following settings …

export CC=/gpfs/bbp.cscs.ch/home/biddisco/bgas/apps/clang/bin/bgclang
export CXX=/gpfs/bbp.cscs.ch/home/biddisco/bgas/apps/clang/bin/bgclang++11
export PATH=/gpfs/bbp.cscs.ch/home/biddisco/bgas/apps/clang/bin:$PATH

I found some info about building boost with clang and followed
instructions here 
http://stackoverflow.com/questions/11081818/linking-troubles-with-boostprog
ram-options-on-osx-using-llvm?lq=1
I modified tools/build/v2/user-config.jam to include the clang-11 option
using clang : 11
    : "/gpfs/bbp.cscs.ch/home/biddisco/bgas/apps/clang/bin/bgclang++11"
    : <cxxflags>"-std=c++11 -stdlib=libc++ -ftemplate-depth=512"
<linkflags>"-stdlib=libc++"
    ;


And then proceeded to building boost using the following commands
./bootstrap.sh --with-toolset=clang-11
./b2 -j 16 toolset=clang-11 cxxflags="-fPIC" --threading=multi
--without-mpi --without-python
--prefix=/gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_54_0

And boost compiles fine.
"The Boost C++ Libraries were successfully built!"

To test, I compiled the boost serialisation demo from this page
http://www.boost.org/doc/libs/1_42_0/libs/serialization/example/demo.cpp
And also a simple boost::program_options demo and boost::filesystem demo
they all run fine

Thank you very much for the help and all the work you’ve put in getting
the clang stuff running..

But…

when I run simple demos from the HPX library

bbpbg2:~/bgas/build/hpx$ bin/hello_world
terminate called after throwing an instance of 'std::__1::runtime_error'
  what():  collate_byname<char>::collate_byname failed to construct for
Aborted (core dumped)


gdb shows me a trace …
(gdb) where
#0  0x00000fffb3458c5c in raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:67
#1  0x00000fffb345abd4 in abort () at abort.c:92
#2  0x00000fffb3aa7b00 in __gnu_cxx::__verbose_terminate_handler ()
    at 
/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/gcc-4.4.6/libstdc++-v3/libsupc++/
vterminate.cc:93
#3  0x00000fffb3aa4d74 in __cxxabiv1::__terminate (handler=<value
optimized out>)
    at 
/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/gcc-4.4.6/libstdc++-v3/libsupc++/
eh_terminate.cc:38
#4  0x00000fffb3aa4db8 in std::terminate () at
/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/gcc-4.4.6/libstdc++-v3/libsupc++/
eh_terminate.cc:48
#5  0x00000fffb47b1c14 in .__clang_call_terminate () from
/gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_54_0/lib/libboost_filesy
stem.so.1.54.0
#6  0x00000fffb47b48a0 in ._ZNK5boost10filesystem4path7compareERKS1_ ()
   from 
/gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_54_0/lib/libboost_filesy
stem.so.1.54.0
Backtrace stopped: frame did not save the PC


It looks very suspicious as there are some stdlib++ appearances in there.

Does anything here give you any idea of what might have gone wrong. I’ve
tried a number of rebuilds and the error persists, whilst simple demos run
ok. I’m not sure where to look to diagnose what’s up (I’ve contacted the
HPX people as well). One question is why the shared clang libc++ links to
the stdlibc++ one. If I do an

bbpbg2:~/bgas/build/c++test$ ldd
/gpfs/bbp.cscs.ch/home/biddisco/bgas/apps/clang/libc++/lib/libc++.so.1.0

	linux-vdso64.so.1 =>  (0x00000fff9ad40000)
	libpthread.so.0 =>
/bgsys/drivers/V1R2M1/ppc64/gnu-linux/powerpc64-bgq-linux/lib/libpthread.so
.0 (0x00000fff9ab00000)
	librt.so.1 => 
/bgsys/drivers/V1R2M1/ppc64/gnu-linux/powerpc64-bgq-linux/lib/librt.so.1
(0x00000fff9a9d0000)
	libc.so.6 => 
/bgsys/drivers/V1R2M1/ppc64/gnu-linux/powerpc64-bgq-linux/lib/libc.so.6
(0x00000fff9a790000)
	libstdc++.so.6 => 
/bgsys/drivers/V1R2M1/ppc64/gnu-linux/powerpc64-bgq-linux/lib/libstdc++.so.
6 (0x00000fff9a550000)
	/lib64/ld64.so.1 (0x0000000032420000)
	libm.so.6 => 
/bgsys/drivers/V1R2M1/ppc64/gnu-linux/powerpc64-bgq-linux/lib/libm.so.6
(0x00000fff9a430000)
	libgcc_s.so.1 => 
/bgsys/drivers/V1R2M1/ppc64/gnu-linux/powerpc64-bgq-linux/lib/libgcc_s.so.1
 (0x00000fff9a320000)


It seems odd. Could this be causing the trouble? (the demos run fine
though, so I guess not).

Anyway, I’ll keep poking around, if anything comes to mind, I’m grateful
for help.

Thanks

JB
  



More information about the llvm-bgq-discuss mailing list