[Llvm-bgq-discuss] clang/bgclang

Hal Finkel hfinkel at anl.gov
Tue May 6 16:07:31 CDT 2014


----- Original Message -----
> From: "Thomas Heller" <thom.heller at gmail.com>
> To: llvm-bgq-discuss at lists.alcf.anl.gov
> Sent: Tuesday, May 6, 2014 1:13:39 PM
> Subject: Re: [Llvm-bgq-discuss] clang/bgclang
> 
> On Tuesday, May 06, 2014 16:11:37 Biddiscombe, John A. wrote:
> > Hal,
> > 
> > In my ongoing struggle to succeed despite my repeated failures, I
> > have
> > successfully compiled boost/hpx/otherstuff with just clang++ and
> > linked to
> > libc++ from the c++11 toolchain. However, when I startup programs
> > compiled
> > as part of HPX, I get a segfault in some _dl_fixup going on during
> > the
> > initialization of a static path/dir object in boost filesystem.
> 
> Just for the record: I am not able to reproduce this issue with the
> bgclang++11 wrapper script on the CNK nodes (Unfortunately, I have no
> access
> to IONs).

Thanks for confirming!

 -Hal

> 
> Regards,
> Thomas
> 
> > 
> > The best explanation I've found from stackoverflow says
> > (http://stackoverflow.com/questions/10578315/segmentation-fault-in-dl-runti
> > me-resolve)
> > 
> >   1.  Heap corruption (overflow) or
> >   2.  Mismatched parts of glibc itself.
> > and 2) is clearly a possibility in my case since we're using
> > libc.so.6 =>
> > /bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libc.so.6
> > (0x00000fff78420000) which is non-standard.
> > 
> > Question: Is there anything in the bgclang script that does
> > important
> > setting of any var/flag which might influence how the exes get
> > linked. I
> > see stuff in particular that sets BGCLANG_TARGET_INC="-Xclang
> > -isystem
> > -Xclang
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/bgclang/r206161-20140414/libc++/
> > include $BGCLANG_TARGET_INC" and also
> >                 BGCLANG_TARGET_FLAGS="$BGCLANG_TARGET_FLAGS
> > -L$BGSYS_FLOOR/$GNU_LINUX/powerpc64-bgq-linux/lib" and I wonder
> > about the
> > -Xclang items which I understand to be instructions to clang
> > plugins.
> > 
> > If I have my system configured as follows
> > CFLAGS="-mcpu=a2"
> > CXXFLAGS="-mcpu=a2 -std=c++11 -stdlib=libc++ -D_bgq_linux
> > -I/gpfs/bbp.cscs.ch/home/biddisco/apps/clang/bgclang/r206161-20140414/libc+
> > +/include -I/bgsys/drivers/ppcfloor" LDFLAGS="-dynamic
> > -L/gpfs/bbp.cscs.ch/home/biddisco/apps/clang/bgclang/r206161-20140414/libc+
> > +/lib
> > -L/bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-linux/lib"
> > (the -D_bgq_linux is mine and used by certain cpp files to #include
> > stuff)
> > 
> > can you imagine what might be going wrong with my build/link to
> > munge my
> > libc initialization in any way? Have I linked to the wrong libc/c++
> > stuff
> > perhaps? Typically my exes come out looking like this (ldd below)
> > as far as
> > libs are used, which seems ok, but they do segfault on start which
> > is
> > really annoying me a lot (understatement).
> > 
> > thanks
> > 
> > JB
> > 
> > bbpbg2:~/bgas/clang/build/cpp$ ldd ../hpx/bin/network_storage
> >                 linux-vdso64.so.1 =>  (0x00000fff7d580000)
> >                 libhpxd.so.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/bgas/clang/build/hpx/lib/hpx/libhpxd.so.0
> > (0x00000fff79b00000) libhpx_serializationd.so.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/bgas/clang/build/hpx/lib/hpx/libhpx_seriali
> > zationd.so.0 (0x00000fff79ac0000)
> > libboost_date_time-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_date_t
> > ime-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79a90000)
> > libboost_filesystem-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_filesy
> > stem-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79a40000)
> > libboost_program_options-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_progra
> > m_options-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79920000)
> > libboost_regex-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_regex-
> > clang35-mt-d-1_55.so.1.55.0 (0x00000fff79710000)
> > libboost_serialization-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_serial
> > ization-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79530000)
> > libboost_system-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_system
> > -clang35-mt-d-1_55.so.1.55.0 (0x00000fff79510000)
> > libboost_thread-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_thread
> > -clang35-mt-d-1_55.so.1.55.0 (0x00000fff794c0000)
> > libboost_atomic-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_atomic
> > -clang35-mt-d-1_55.so.1.55.0 (0x00000fff794a0000)
> > libboost_chrono-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_chrono
> > -clang35-mt-d-1_55.so.1.55.0 (0x00000fff79480000)
> > libboost_context-clang35-mt-d-1_55.so.1.55.0 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/boost_1_55_0/lib/libboost_contex
> > t-clang35-mt-d-1_55.so.1.55.0 (0x00000fff79460000) libmpich.so.3 =>
> > /usr/lib64/mvapich2/lib/libmpich.so.3 (0x00000fff790f0000)
> > libibverbs.so.1
> > => /usr/lib64/libibverbs.so.1 (0x000000808dbe0000) libopa.so.1 =>
> > /usr/lib64/mvapich2/lib/libopa.so.1 (0x00000fff790a0000)
> > libmpl.so.1 =>
> > /usr/lib64/mvapich2/lib/libmpl.so.1 (0x00000080afc00000) librt.so.1
> > =>
> > /bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/librt.so.1
> > (0x00000fff78f70000) libpthread.so.0 =>
> > /bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libpthread.
> > so.0 (0x00000fff78e50000) librdmacm.so.1 =>
> > /usr/lib64/librdmacm.so.1
> > (0x000000808dc10000) libhwloc.so.5 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/hwloc-1.8.1/lib/libhwloc.so.5
> > (0x00000fff78df0000) libdl.so.2 =>
> > /bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libdl.so.2
> > (0x00000fff78cd0000) libc++.so.1 =>
> > /gpfs/bbp.cscs.ch/home/biddisco/apps/clang/bgclang/libc++/lib/libc++.so.1
> > (0x00000fff78ab0000) libstdc++.so.6 =>
> > /bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libstdc++.s
> > o.6 (0x00000fff78880000) libm.so.6 =>
> > /bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libm.so.6
> > (0x00000fff78760000) libgcc_s.so.1 =>
> > /bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libgcc_s.so
> > .1 (0x00000fff78650000) libc.so.6 =>
> > /bgsys/drivers/ppcfloor/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/libc.so.6
> > (0x00000fff78420000) libibumad.so.3 => /usr/lib64/libibumad.so.3
> > (0x00000080a0b60000) /lib64/ld64.so.1 (0x0000000020a80000)
> 
> _______________________________________________
> llvm-bgq-discuss mailing list
> llvm-bgq-discuss at lists.alcf.anl.gov
> https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-bgq-discuss mailing list