<html><body>
<p><font size="2" face="Menlo-Regular">Sounds like some debug info would help isolate the problem library, i'd suggest enabling the dynamic loader's trace facility. Set this environment variable:</font><br>
<font size="2" face="Menlo-Regular"> LD_DEBUG=files,libs</font><br>
<font size="2" face="Menlo-Regular"> </font><br>
<font size="2" face="Menlo-Regular"> or</font><br>
<font size="2" face="Menlo-Regular"> </font><br>
<font size="2" face="Menlo-Regular"> LD_DEBUG=all</font><br>
<br>
<font size="2" face="sans-serif">You could also use runjob's "--strace 0" option (or slurm/cobalt equivalent) to get a system call trace, but that might be slightly too low-level detail. </font><br>
<br>
<font size="2" face="sans-serif">Hope that helps,</font><br>
<font size="2" face="sans-serif">Tom</font><br>
<br>
<font size="2" face="sans-serif">Tom Gooding<br>
Senior Engineer / Blue Gene SW Lead / CAPI<br>
tgooding@us.ibm.com 507-253-0747<br>
</font><br>
<br>
<tt><font size="2">llvm-bgq-discuss-bounces@lists.alcf.anl.gov wrote on 05/06/2014 11:11:37 AM:<br>
<br>
> From: "Biddiscombe, John A." <biddisco@cscs.ch></font></tt><br>
<tt><font size="2">> To: "llvm-bgq-discuss@lists.alcf.anl.gov" <llvm-bgq-<br>
> discuss@lists.alcf.anl.gov></font></tt><br>
<tt><font size="2">> Date: 05/06/2014 11:11 AM</font></tt><br>
<tt><font size="2">> Subject: [Llvm-bgq-discuss] clang/bgclang</font></tt><br>
<tt><font size="2">> Sent by: llvm-bgq-discuss-bounces@lists.alcf.anl.gov</font></tt><br>
<tt><font size="2">> <br>
> Hal,</font></tt><br>
<tt><font size="2">> </font></tt><br>
<tt><font size="2">> In my ongoing struggle to succeed despite my repeated failures, I <br>
> have successfully compiled boost/hpx/otherstuff with just clang++ <br>
> and linked to libc++ from the c++11 toolchain. However, when I <br>
> startup programs compiled as part of HPX, I get a segfault in some _dl<br>
> _fixup going on during the initialization of a static path/dir <br>
> object in boost filesystem.</font></tt><br>
<tt><font size="2">> </font></tt><br>
<tt><font size="2">> The best explanation I’ve found from stackoverflow says (http://<br>
> stackoverflow.com/questions/10578315/segmentation-fault-in-dl-runtime-resolve)</font></tt><br>
<tt><font size="2">> 1. Heap corruption (overflow) or</font></tt><br>
<tt><font size="2">> 2. Mismatched parts of glibc itself.</font></tt><br>
<tt><font size="2">> and 2) is clearly a possibility in my case since we’re using </font></tt><br>
<tt><font size="2">> libc.so.6 => /bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-<br>
> linux/lib/libc.so.6 (0x00000fff78420000)</font></tt><br>
<tt><font size="2">> which is non-standard.</font></tt><br>
<tt><font size="2">> </font></tt><br>
<tt><font size="2">> Question: Is there anything in the bgclang script that does <br>
> important setting of any var/flag which might influence how the exes<br>
> get linked. I see stuff in particular that sets</font></tt><br>
<tt><font size="2">> BGCLANG_TARGET_INC="-Xclang -isystem -Xclang /gpfs/bbp.cscs.ch/home/<br>
> biddisco/apps/clang/bgclang/r206161-20140414/libc++/include <br>
> $BGCLANG_TARGET_INC"</font></tt><br>
<tt><font size="2">> and also </font></tt><br>
<tt><font size="2">> BGCLANG_TARGET_FLAGS="$BGCLANG_TARGET_FLAGS -L<br>
> $BGSYS_FLOOR/$GNU_LINUX/powerpc64-bgq-linux/lib"</font></tt><br>
<tt><font size="2">> and I wonder about the -Xclang items which I understand to be <br>
> instructions to clang plugins.</font></tt><br>
<tt><font size="2">> </font></tt><br>
<tt><font size="2">> If I have my system configured as follows</font></tt><br>
<tt><font size="2">> CFLAGS="-mcpu=a2"</font></tt><br>
<tt><font size="2">> CXXFLAGS="-mcpu=a2 -std=c++11 -stdlib=libc++ -D_bgq_linux -I/gpfs/<br>
> bbp.cscs.ch/home/biddisco/apps/clang/bgclang/r206161-20140414/libc+<br>
> +/include -I/bgsys/drivers/ppcfloor"</font></tt><br>
<tt><font size="2">> LDFLAGS="-dynamic -L/gpfs/bbp.cscs.ch/home/biddisco/apps/clang/<br>
> bgclang/r206161-20140414/libc++/lib -L/bgsys/drivers/ppcfloor/gnu-<br>
> linux-4.7.2/powerpc64-bgq-linux/lib"</font></tt><br>
<tt><font size="2">> (the -D_bgq_linux is mine and used by certain cpp files to #include stuff)</font></tt><br>
<tt><font size="2">> </font></tt><br>
<tt><font size="2">> can you imagine what might be going wrong with my build/link to <br>
> munge my libc initialization in any way? Have I linked to the wrong <br>
> libc/c++ stuff perhaps?</font></tt><br>
<tt><font size="2">> Typically my exes come out looking like this (ldd below) as far as <br>
> libs are used, which seems ok, but they do segfault on start which <br>
> is really annoying me a lot (understatement). </font></tt><br>
<tt><font size="2">> </font></tt><br>
<tt><font size="2">> thanks</font></tt><br>
<tt><font size="2">> </font></tt><br>
<tt><font size="2">> JB</font></tt><br>
<tt><font size="2">> </font></tt><br>
<tt><font size="2">> bbpbg2:~/bgas/clang/build/cpp$ ldd ../hpx/bin/network_storage</font></tt><br>
<tt><font size="2">> linux-vdso64.so.1 => (0x00000fff7d580000)</font></tt><br>
<tt><font size="2">> libhpxd.so.0 => /gpfs/bbp.cscs.ch/home/biddisco/<br>
> bgas/clang/build/hpx/lib/hpx/libhpxd.so.0 (0x00000fff79b00000)</font></tt><br>
<tt><font size="2">> libhpx_serializationd.so.0 => /gpfs/bbp.cscs.ch/<br>
> home/biddisco/bgas/clang/build/hpx/lib/hpx/libhpx_serializationd.so.<br>
> 0 (0x00000fff79ac0000)</font></tt><br>
<tt><font size="2">> libboost_date_time-clang35-mt-d-1_55.so.1.55.0 => /<br>
> gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_date_time-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79a90000)</font></tt><br>
<tt><font size="2">> libboost_filesystem-clang35-mt-d-1_55.so.1.55.0 => /<br>
> gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_filesystem-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79a40000)</font></tt><br>
<tt><font size="2">> libboost_program_options-clang35-mt-d-1_55.so.1.55.0<br>
> => /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_program_options-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79920000)</font></tt><br>
<tt><font size="2">> libboost_regex-clang35-mt-d-1_55.so.1.55.0 => /gpfs/<br>
> bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_regex-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79710000)</font></tt><br>
<tt><font size="2">> libboost_serialization-clang35-mt-d-1_55.so.1.55.0 <br>
> => /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_serialization-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79530000)</font></tt><br>
<tt><font size="2">> libboost_system-clang35-mt-d-1_55.so.1.55.0 => /<br>
> gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_system-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79510000)</font></tt><br>
<tt><font size="2">> libboost_thread-clang35-mt-d-1_55.so.1.55.0 => /<br>
> gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_thread-clang35-mt-d-1_55.so.1.55.0 (0x00000fff794c0000)</font></tt><br>
<tt><font size="2">> libboost_atomic-clang35-mt-d-1_55.so.1.55.0 => /<br>
> gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_atomic-clang35-mt-d-1_55.so.1.55.0 (0x00000fff794a0000)</font></tt><br>
<tt><font size="2">> libboost_chrono-clang35-mt-d-1_55.so.1.55.0 => /<br>
> gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_chrono-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79480000)</font></tt><br>
<tt><font size="2">> libboost_context-clang35-mt-d-1_55.so.1.55.0 => /<br>
> gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/<br>
> libboost_context-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79460000)</font></tt><br>
<tt><font size="2">> libmpich.so.3 => /usr/lib64/mvapich2/lib/<br>
> libmpich.so.3 (0x00000fff790f0000)</font></tt><br>
<tt><font size="2">> libibverbs.so.1 => /usr/lib64/libibverbs.so.1 <br>
> (0x000000808dbe0000)</font></tt><br>
<tt><font size="2">> libopa.so.1 => /usr/lib64/mvapich2/lib/libopa.so.1 <br>
> (0x00000fff790a0000)</font></tt><br>
<tt><font size="2">> libmpl.so.1 => /usr/lib64/mvapich2/lib/libmpl.so.1 <br>
> (0x00000080afc00000)</font></tt><br>
<tt><font size="2">> librt.so.1 => /bgsys/drivers/ppcfloor/gnu-linux-4.7.<br>
> 2/powerpc64-bgq-linux/lib/librt.so.1 (0x00000fff78f70000)</font></tt><br>
<tt><font size="2">> libpthread.so.0 => /bgsys/drivers/ppcfloor/gnu-<br>
> linux-4.7.2/powerpc64-bgq-linux/lib/libpthread.so.0 (0x00000fff78e50000)</font></tt><br>
<tt><font size="2">> librdmacm.so.1 => /usr/lib64/librdmacm.so.1 <br>
> (0x000000808dc10000)</font></tt><br>
<tt><font size="2">> libhwloc.so.5 => /gpfs/bbp.cscs.ch/home/biddisco/<br>
> apps/clang/hwloc-1.8.1/lib/libhwloc.so.5 (0x00000fff78df0000)</font></tt><br>
<tt><font size="2">> libdl.so.2 => /bgsys/drivers/ppcfloor/gnu-linux-4.7.<br>
> 2/powerpc64-bgq-linux/lib/libdl.so.2 (0x00000fff78cd0000)</font></tt><br>
<tt><font size="2">> libc++.so.1 => /gpfs/bbp.cscs.ch/home/biddisco/apps/<br>
> clang/bgclang/libc++/lib/libc++.so.1 (0x00000fff78ab0000)</font></tt><br>
<tt><font size="2">> libstdc++.so.6 => /bgsys/drivers/ppcfloor/gnu-<br>
> linux-4.7.2/powerpc64-bgq-linux/lib/libstdc++.so.6 (0x00000fff78880000)</font></tt><br>
<tt><font size="2">> libm.so.6 => /bgsys/drivers/ppcfloor/gnu-linux-4.7.<br>
> 2/powerpc64-bgq-linux/lib/libm.so.6 (0x00000fff78760000)</font></tt><br>
<tt><font size="2">> libgcc_s.so.1 => /bgsys/drivers/ppcfloor/gnu-<br>
> linux-4.7.2/powerpc64-bgq-linux/lib/libgcc_s.so.1 (0x00000fff78650000)</font></tt><br>
<tt><font size="2">> libc.so.6 => /bgsys/drivers/ppcfloor/gnu-linux-4.7.<br>
> 2/powerpc64-bgq-linux/lib/libc.so.6 (0x00000fff78420000)</font></tt><br>
<tt><font size="2">> libibumad.so.3 => /usr/lib64/libibumad.so.3 <br>
> (0x00000080a0b60000)</font></tt><br>
<tt><font size="2">> /lib64/ld64.so.1 (0x0000000020a80000)</font></tt><br>
<tt><font size="2">> </font></tt><br>
<tt><font size="2">> _______________________________________________<br>
> llvm-bgq-discuss mailing list<br>
> llvm-bgq-discuss@lists.alcf.anl.gov<br>
> <a href="https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss">https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss</a><br>
</font></tt></body></html>