[Llvm-bgq-discuss] linker errors with llvm/current/bin/bgclang++

Geoffrey Irving irving at naml.us
Sat Jan 19 01:18:15 CST 2013


A reduced test case crashing bug is attached.  Usage:

    vesta:core% /home/projects/llvm/current/bin/bgclang++ -o bad -O2
bad.cpp && ./bad
    vesta:core% /home/projects/llvm/current/bin/bgclang++ -o bad -O3
bad.cpp && ./bad
    Illegal instruction (core dumped)

Geoffrey

On Fri, Jan 18, 2013 at 7:35 PM, Geoffrey Irving <irving at naml.us> wrote:
> Cool, that gets me through linking and unit tests in debug mode and
> optimized with -O2.  However, I get an illegal instruction in some
> static initialization code if I use -O3.  I'll see how easy it is to
> reduce my test case.
>
> In any case, progress!
>
> Thanks,
> Geoffrey
>
> On Fri, Jan 18, 2013 at 7:18 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>> Geoffrey,
>>
>> I believe this bug has been fixed in trunk; I'll updated our install next week. In the mean time, try building with -mcmodel=small
>>
>>  -Hal
>>
>> ----- Original Message -----
>>> From: "Geoffrey Irving" <irving at naml.us>
>>> To: llvm-bgq-discuss at lists.alcf.anl.gov
>>> Sent: Friday, January 18, 2013 9:10:59 PM
>>> Subject: [Llvm-bgq-discuss] linker errors with llvm/current/bin/bgclang++
>>>
>>> I'm trying to get my C++11 app running on vesta.  Compiling with
>>> clang
>>> gives me the following linker errors (summarized below, with full
>>> build output attached):
>>>
>>> /home/projects/llvm/current/bin/bgclang++ -o
>>> build/powerpc/release/core/array/RawArray.os -c
>>> -U__GXX_EXPERIMENTAL_CXX0X__ -O3 -funroll-loops -Wall -Winit-self
>>> -Woverloaded-virtual -Wsign-compare -fno-strict-aliasing -std=c++0x
>>> -Werror -Wno-array-bounds -Wno-unknown-pragmas -fPIC -DOTHER_PYTHON
>>> -DNDEBUG -DOTHER_THREAD_SAFE=1 -DBOOST_EXCEPTION_DISABLE
>>> -DBUILDING_other_core -I/usr/include/python2.6
>>> -I/home/irving/.local/lib/python2.6/site-packages/numpy/core/include
>>> -I/usr/local/include -Ibuild/include
>>> -I/home/irving/download/boost_1_52_0 core/array/RawArray.cpp
>>> ...MANY OTHER COMPILE COMMANDS...
>>> /home/projects/llvm/current/bin/bgclang++ -o
>>> build/powerpc/release/core/libother_core.so -shared
>>> -Wl,-rpath=/gpfs/vesta_home/irving/otherlab/other/install/release/lib
>>> build/powerpc/release/core/array/RawArray.os
>>> ...MANY_OTHER_OBJECT_FILES... -L/usr/lib64 -L/usr/local/lib
>>> -Linstall/release/lib -lpython2.6
>>> /bgsys/drivers/ppcfloor/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.4.6/../../../../powerpc64-bgq-linux/bin/ld:
>>> build/powerpc/release/core/array/RawArray.os(.text+0x63e):
>>> unresolvable R_PPC64_TOC16_HA relocation against symbol
>>> `_ZTVSt9bad_alloc@@GLIBCXX_3.4'
>>> /bgsys/drivers/ppcfloor/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.4.6/../../../../powerpc64-bgq-linux/bin/ld:
>>> build/powerpc/release/core/array/RawArray.os(.text+0x642):
>>> unresolvable R_PPC64_TOC16_LO relocation against symbol
>>> `_ZTVSt9bad_alloc@@GLIBCXX_3.4'
>>> /bgsys/drivers/ppcfloor/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.4.6/../../../../powerpc64-bgq-linux/bin/ld:
>>> build/powerpc/release/core/array/RawArray.os(.text+0x652):
>>> unresolvable R_PPC64_TOC16_HA relocation against symbol
>>> `_ZTISt9bad_alloc@@GLIBCXX_3.4'
>>> /bgsys/drivers/ppcfloor/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.4.6/../../../../powerpc64-bgq-linux/bin/ld:
>>> build/powerpc/release/core/array/RawArray.os(.text+0x656):
>>> unresolvable R_PPC64_TOC16_LO relocation against symbol
>>> `_ZTISt9bad_alloc@@GLIBCXX_3.4'
>>> /bgsys/drivers/ppcfloor/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.4.6/../../../../powerpc64-bgq-linux/bin/ld:
>>> final link failed: Nonrepresentable section on output
>>> clang: error: linker command failed with exit code 1 (use -v to see
>>> invocation)
>>> scons: *** [build/powerpc/release/core/libother_core.so] Error 1
>>>
>>> Any ideas what might be going wrong?  A google search turned up many
>>> similar bugs in the past, but I haven't found a specific reference.
>>> Notes:
>>>
>>> 1. The only library I'm linking to is Python.
>>> 2. I needed to undef __GXX_EXPERIMENTAL_CXX0X__ in order to get
>>> -std=c++0x to compile.  Otherwise it complains about stuff like this
>>> (more details on request):
>>>
>>> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6/bits/stl_pair.h:106:10:
>>> error: no matching function for call to 'move'
>>>         : first(std::move(__p.first)),
>>>                 ^~~~~~~~~
>>>
>>> Thanks,
>>> Geoffrey
>>>
>>> _______________________________________________
>>> 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
>> Postdoctoral Appointee
>> Leadership Computing Facility
>> Argonne National Laboratory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad.cpp
Type: text/x-c++src
Size: 438 bytes
Desc: not available
URL: <http://lists.alcf.anl.gov/pipermail/llvm-bgq-discuss/attachments/20130118/07c19504/attachment.cpp>


More information about the llvm-bgq-discuss mailing list