[Linuxppc-users] undefined reference to __tls_get_addr_opt

Lorenzo Chelini LCH at zurich.ibm.com
Tue Apr 2 05:42:23 AEDT 2019


Hi All,

Thanks so much for the comments. The problem was Clang that was picking up 
the system installed GCC and not the one in the advanced toolchain.
To address the issue I used --gcc-toolchain=/opt/at10.0 and now compiles.
But I have still a problem while trying to execute.

./gemm: /lib64/ld64.so.2: version `GLIBC_2.22' not found (required by 
/dataL/lch/polly/llvm_build/lib/libGPURuntime.so)
        linux-vdso64.so.1 =>  (0x00007fff81440000)
        libGPURuntime.so => 
/dataL/lch/polly/llvm_build/lib/libGPURuntime.so (0x00007fff81410000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fff813b0000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fff811c0000)
        /lib64/ld64.so.2 (0x00007fff81460000)

        Version information:
        ./gemm:
                libc.so.6 (GLIBC_2.17) => /lib64/libc.so.6
        /dataL/lch/polly/llvm_build/lib/libGPURuntime.so:
                ld64.so.2 (GLIBC_2.22) => not found
                libc.so.6 (GLIBC_2.17) => /lib64/libc.so.6
        /lib64/libdl.so.2:
                ld64.so.2 (GLIBC_PRIVATE) => /lib64/ld64.so.2
                libc.so.6 (GLIBC_PRIVATE) => /lib64/libc.so.6
                libc.so.6 (GLIBC_2.17) => /lib64/libc.so.6
        /lib64/libc.so.6:
                ld64.so.2 (GLIBC_2.17) => /lib64/ld64.so.2
                ld64.so.2 (GLIBC_PRIVATE) => /lib64/ld64.so.2

Do you have some suggestions on how I can fix this issue as well?

This is the compilation string I am using:

clang -O3 --gcc-toolchain=/opt/at10.0 -mllvm -polly -mllvm 
-polly-target=gpu -I utilities -I linear-algebra/kernels/gemm 
utilities/polybench.c linear-algebra/kernels/gemm/gemm.c 
-L/dataL/lch/polly/llvm_build -lGPURuntime -L/opt/at10.0 -ldl -o gemm

Looking forward to hearing from you.
Best regards,
Lorenzo Chelini.




From:   "Bill Schmidt" <wschmidt at linux.ibm.com>
To:     "Segher Boessenkool" <segher at linux.ibm.com>, "Lorenzo Chelini" 
<LCH at zurich.ibm.com>
Cc:     linuxppc-users at lists.ozlabs.org
Date:   03/29/2019 18:10
Subject:        Re: [Linuxppc-users] undefined reference to 
__tls_get_addr_opt



On 3/29/19 11:16 AM, Segher Boessenkool wrote:
> Hi!
>
> On Thu, Mar 28, 2019 at 12:25:43PM +0100, Lorenzo Chelini wrote:
>> I am a PhD at IBM Zurich working on compiler. I am having the following 

>> error “undefined reference to `__tls_get_addr_opt at GLIBC_2.22'” while 
>> linking a runtime library in LLVM/Polly. Do you know how I can fix this 

>> error?
>> I am using a P9 architecture running Linux and I am using the latest 
>> advance toolchain (gcc (GCC) 8.2.1 20180813 (Advance-Toolchain-at12.0))
> No you're not:
>
>> Selected GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.5
> It is picking up the system toolchain of your OS (RHEL 7?), which 
probably
> gives you a glibc 2.17, which won't work with that 2.22 symbol something
> wants (you didn't show what, or how it got that 2.22 version; either 
way,
> you don't want to use 2.17 (or 4.8.5) when developing new code).
>
> Probably if you make everything find the newer toolchain all will work
> well.  It's either a configuration problem on your side, or one of the
> tools you're trying to build is misbehaving.
These resources may help you:

https://developer.ibm.com/linuxonpower/advance-toolchain/adv-tool-usage/
https://developer.ibm.com/linuxonpower/advance-toolchain/advtool-faq/

Bill
>
> Good luck,
>
>
> Segher
>
> _______________________________________________
> Linuxppc-users mailing list
> Linuxppc-users at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-users




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-users/attachments/20190401/0ccfb13a/attachment.htm>


More information about the Linuxppc-users mailing list