<span style=" font-size:11pt;font-family:sans-serif">Hi All, </span>
<br><span style=" font-size:11pt;font-family:sans-serif">I am a PhD at
IBM Zurich working on compiler. I am having the following error “undefined
reference to `__tls_get_addr_opt@GLIBC_2.22'” while linking a runtime
library in LLVM/Polly. Do you know how I can fix this error?</span>
<br><span style=" font-size:11pt;font-family:sans-serif">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))</span>
<br>
<br><span style=" font-size:11pt;font-family:sans-serif">Here the error
trace:</span>
<br><span style=" font-size:11pt;font-family:sans-serif">clang version
9.0.0 (/dataP/lch/tmp/llvm/tools/clang 961f21b225d19fd5d602dfd6d29e2ca9a0600a38)
(/dataP/lch/tmp/llvm b6bb254aa4bc8602032aa193b1417dbd864c9eb5)</span>
<br><span style=" font-size:11pt;font-family:sans-serif">Target: powerpc64le-unknown-linux-gnu</span>
<br><span style=" font-size:11pt;font-family:sans-serif">Thread model:
posix</span>
<br><span style=" font-size:11pt;font-family:sans-serif">InstalledDir:
/dataP/lch/tmp/llvm_build/bin</span>
<br><span style=" font-size:11pt;font-family:sans-serif">Found candidate
GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.2</span>
<br><span style=" font-size:11pt;font-family:sans-serif">Found candidate
GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.5</span>
<br><span style=" font-size:11pt;font-family:sans-serif">Selected GCC installation:
/usr/lib/gcc/ppc64le-redhat-linux/4.8.5</span>
<br><span style=" font-size:11pt;font-family:sans-serif">Candidate multilib:
.;@m64</span>
<br><span style=" font-size:11pt;font-family:sans-serif">Selected multilib:
.;@m64</span>
<br><span style=" font-size:11pt;font-family:sans-serif">Found CUDA installation:
/usr/local/cuda-9.2, version 9.2</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> "/ibm/gpfs-dataP/lch/tmp/llvm_build/bin/clang-9"
-cc1 -triple powerpc64le-unknown-linux-gnu -emit-obj -disable-free -main-file-name
polybench.c -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu ppc64le
-mfloat-abi hard -target-abi elfv2 -dwarf-column-info -debugger-tuning=gdb
-momit-leaf-frame-pointer -v -resource-dir /ibm/gpfs-dataP/lch/tmp/llvm_build/lib/clang/9.0.0
-I utilities/ -I linear-algebra/kernels/2mm/ -I/usr/local/cuda-9.2/extras/CUPTI/include
-I/usr/local/cuda-9.2/nvvm/include -I/usr/local/cuda-9.2/include -internal-isystem
/usr/local/include -internal-isystem /ibm/gpfs-dataP/lch/tmp/llvm_build/lib/clang/9.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-O3 -fdebug-compilation-dir /dataP/lch/tmp/polybench-c-3.2 -ferror-limit
19 -fmessage-length 159 -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -polly -mllvm
-polly-target=gpu -o /tmp/polybench-cf3eb6.o -x c utilities/polybench.c
-faddrsig</span>
<br><span style=" font-size:11pt;font-family:sans-serif">clang -cc1 version
9.0.0 based upon LLVM 9.0.0svn default target powerpc64le-unknown-linux-gnu</span>
<br><span style=" font-size:11pt;font-family:sans-serif">ignoring nonexistent
directory "/include"</span>
<br><span style=" font-size:11pt;font-family:sans-serif">#include "..."
search starts here:</span>
<br><span style=" font-size:11pt;font-family:sans-serif">#include <...>
search starts here:</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> utilities</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> linear-algebra/kernels/2mm</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/local/cuda-9.2/extras/CUPTI/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/local/cuda-9.2/nvvm/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/local/cuda-9.2/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/local/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /ibm/gpfs-dataP/lch/tmp/llvm_build/lib/clang/9.0.0/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif">End of search
list.</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> "/ibm/gpfs-dataP/lch/tmp/llvm_build/bin/clang-9"
-cc1 -triple powerpc64le-unknown-linux-gnu -emit-obj -disable-free -main-file-name
2mm.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -fuse-init-array -target-cpu ppc64le -mfloat-abi
hard -target-abi elfv2 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer
-v -resource-dir /ibm/gpfs-dataP/lch/tmp/llvm_build/lib/clang/9.0.0 -I
utilities/ -I linear-algebra/kernels/2mm/ -I/usr/local/cuda-9.2/extras/CUPTI/include
-I/usr/local/cuda-9.2/nvvm/include -I/usr/local/cuda-9.2/include -internal-isystem
/usr/local/include -internal-isystem /ibm/gpfs-dataP/lch/tmp/llvm_build/lib/clang/9.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-O3 -fdebug-compilation-dir /dataP/lch/tmp/polybench-c-3.2 -ferror-limit
19 -fmessage-length 159 -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -polly -mllvm
-polly-target=gpu -o /tmp/2mm-db0788.o -x c linear-algebra/kernels/2mm/2mm.c
-faddrsig</span>
<br><span style=" font-size:11pt;font-family:sans-serif">clang -cc1 version
9.0.0 based upon LLVM 9.0.0svn default target powerpc64le-unknown-linux-gnu</span>
<br><span style=" font-size:11pt;font-family:sans-serif">ignoring nonexistent
directory "/include"</span>
<br><span style=" font-size:11pt;font-family:sans-serif">#include "..."
search starts here:</span>
<br><span style=" font-size:11pt;font-family:sans-serif">#include <...>
search starts here:</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> utilities</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> linear-algebra/kernels/2mm</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/local/cuda-9.2/extras/CUPTI/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/local/cuda-9.2/nvvm/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/local/cuda-9.2/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/local/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /ibm/gpfs-dataP/lch/tmp/llvm_build/lib/clang/9.0.0/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> /usr/include</span>
<br><span style=" font-size:11pt;font-family:sans-serif">End of search
list.</span>
<br><span style=" font-size:11pt;font-family:sans-serif"> "/opt/at12.0/bin/ld"
--hash-style=gnu --no-add-needed --eh-frame-hdr -m elf64lppc -dynamic-linker
/lib64/ld64.so.2 -o main /usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../lib64/crt1.o
/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/ppc64le-redhat-linux/4.8.5/crtbegin.o
-L/dataP/lch/tmp/llvm_build -L/usr/lib/gcc/ppc64le-redhat-linux/4.8.5 -L/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../..
-L/ibm/gpfs-dataP/lch/tmp/llvm_build/bin/../lib -L/lib -L/usr/lib /tmp/polybench-cf3eb6.o
/tmp/2mm-db0788.o -lGPURuntime -ldl -lm -lc -L/usr/local/cuda-9.2/extras/CUPTI/lib64
-L/usr/local/cuda-9.2/nvvm/lib64 -L/usr/lib64/nvidia -L/usr/local/cuda-9.2/lib64
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /usr/lib/gcc/ppc64le-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../lib64/crtn.o</span>