[Llvm-bgq-discuss] 2 quick questions about upgrading

Biddiscombe, John A. biddisco at cscs.ch
Tue Feb 3 09:51:40 CST 2015


Thanks Hal,

I upgraded the bgclang and have two problems

1) I had to remove the Xassembler  ma2q flag from the bgclang script (I think I also removed another but didn't keep the original so I've forgotten what it was, oops)
       script_params="-Xassembler -ma2q $script_params"
Does this matter for anything much?

2) compiling statically seems ok, c and c++ with and without mpi run as expected and produce standard hello world results, but I need to use -dynamic to pull in some libs for non simple projects and then things segfault on startup.
(NB. using flag -std=c++11 - in the make verbose output I can see a stdlib=libstdc++ which I didn't put in there, so I assume the bgclang wrapper added for me)

If you have any suggestions for the -dynamic, please say. I attach info below for completeness.

Many thanks in advance.

JB

I've put the base_4.7.2 tarball here
/gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2
and the clang compiler is installed in
/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024
the only thing I'm getting from /bgsys/drivers is the comm mpi stuff AFAICT.

the segfault is in the kernel stuff
#0  0x00000fffb7997b9c in _dl_vdso_vsym (name=0xfffb79aca28 "__kernel_gettimeofday", vers=0xfffffffe650) at ../sysdeps/unix/sysv/linux/dl-vdso.c:40
#1  0x00000fffb7875c50 in _libc_vdso_platform_setup (argc=Unhandled dwarf expression opcode 0xf3) at ../sysdeps/unix/sysv/linux/powerpc/init-first.c:37
#2  _init (argc=Unhandled dwarf expression opcode 0xf3) at ../csu/init-first.c:86
#3  0x00000080bd227bf0 in ._dl_init_internal () from /lib64/ld64.so.1
#4  0x00000080bd2154dc in ._dl_start_user () from /lib64/ld64.so.1

and the libs being pulled in are (I've wiped LD_LIBRARY_PATH at this stage to make sure we don't get anything old and dodgy)
bbpbg1:~/bgq/build/bgas$ ldd bin/hello
	linux-vdso64.so.1 =>  (0x00000fff8de20000)
	libc++.so.1 => /gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/libc++/lib/libc++.so.1 (0x00000fff8dd00000)
	libstdc++.so.6 => /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libstdc++.so.6 (0x00000fff8dad0000)
	libm.so.6 => /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libm.so.6 (0x00000fff8d9b0000)
	libgcc_s.so.1 => /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libgcc_s.so.1 (0x00000fff8d8a0000)
	libc.so.6 => /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libc.so.6 (0x00000fff8d670000)
	libpthread.so.0 => /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libpthread.so.0 (0x00000fff8d550000)
	librt.so.1 => /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/librt.so.1 (0x00000fff8d430000)
	/lib64/ld64.so.1 (0x0000000054d50000)

which look ok to my untrained eye.

the make looks like this (this is from a project which includes some oost stuff etc using cmake so it's a bit bloated, but I can't see anything bad in there)

 [100%] Building CXX object cpptest/CMakeFiles/hello.dir/hello.cxx.o
/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/bin/clang++ -Xclang -isystem -Xclang /gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/libc++/include -Xclang -isystem -Xclang /bgsys/drivers/V1R2M2/ppc64//comm/gcc/include -Xclang -isystem -Xclang /bgsys/drivers/V1R2M2/ppc64//comm/lib/gnu -Xclang -isystem -Xclang /bgsys/drivers/V1R2M2/ppc64/ -Xclang -isystem -Xclang /bgsys/drivers/V1R2M2/ppc64//comm/sys/include -Xclang -isystem -Xclang /bgsys/drivers/V1R2M2/ppc64//spi/include -Xclang -isystem -Xclang /bgsys/drivers/V1R2M2/ppc64//spi/include/kernel/cnk -I/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/sleef/include -Xclang -isystem -Xclang /gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/libstdc++fixup/include -Xclang -isystem -Xclang /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/include/c++/4.7.2 -Xclang -isystem -Xclang /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/include/c++/4.7.2/powerpc64-bgq-linux -Xclang -isystem -Xclang /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include -target powerpc64-bgq-linux -gcc-toolchain /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2 -B/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/binutils/bin -B/gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib -mcpu=a2q -ffp-contract=fast -fno-math-errno -stdlib=libc++ -static -D__bgclang__=1 -D__bgclang_version__="r220548-20141024" -mllvm -optimize-regalloc -mllvm -fast-isel=0 -D__BGQ__ -std=c++11 -g -I/gpfs/bbp.cscs.ch/home/biddisco/apps/bgq/boost_1_56_0/include/boost-1_56 -I/bgsys/drivers/V1R2M2/ppc64/comm/include -o CMakeFiles/hello.dir/hello.cxx.o -c /gpfs/bbp.cscs.ch/home/biddisco/src/bgas/cpptest/hello.cxx
Linking CXX executable ../bin/hello
/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/bin/clang++ -target powerpc64-bgq-linux -gcc-toolchain /gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2 -B/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/binutils/bin -B/gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib -mcpu=a2q -ffp-contract=fast -fno-math-errno -stdlib=libc++ -L/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/libc++/lib -Wl,-rpath -Wl,/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/libc++/lib -L/gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib -Wl,-rpath -Wl,/gpfs/bbp.cscs.ch/home/biddisco/clang/V1R2M2_base_4.7.2/gnu-linux-4.7.2/powerpc64-bgq-linux/lib -std=c++11 -g -dynamic CMakeFiles/hello.dir/hello.cxx.o -o ../bin/hello -rdynamic -L/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/sleef/lib -Wl,-rpath -Wl,/gpfs/bbp.cscs.ch/home/biddisco/apps/bgclang/r220548-20141024/sleef/lib -Wl,--as-needed -lsleef -Wl,--no-as-needed
[100%] Built target hello



More information about the llvm-bgq-discuss mailing list