<span style=" font-size:10pt;font-family:sans-serif">Hi Jacob,</span><br><br><span style=" font-size:10pt;font-family:sans-serif">Have you tried
using a different version of GCC?</span><br><br><span style=" font-size:10pt;font-family:sans-serif">--Doru</span><p style="margin-top:0px;margin-Bottom:0px"><span style=" font-size:10pt;font-family:sans-serif"><br></span></p><br><br><br><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">From:
       </span><span style=" font-size:9pt;font-family:sans-serif">Jacob
Lambert via Openmp-dev <openmp-dev@lists.llvm.org></span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">To:
       </span><span style=" font-size:9pt;font-family:sans-serif">openmp-dev@lists.llvm.org</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Date:
       </span><span style=" font-size:9pt;font-family:sans-serif">10/15/2019
01:07 PM</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Subject:
       </span><span style=" font-size:9pt;font-family:sans-serif">[EXTERNAL]
[Openmp-dev] Building Clang+OpenMP on Power9</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Sent
by:        </span><span style=" font-size:9pt;font-family:sans-serif">"Openmp-dev"
<openmp-dev-bounces@lists.llvm.org></span><br><hr noshade><br><br><br><span style=" font-size:12pt">I'm having trouble building clang+OpenMP
on a Power9 system with support of offloading to an attached Nvidia GPU
(V100). Is this kind of build currently supported? I was able to successfully
build clang, which I'm now attempting to use as the C/C++ compiler for
a clang+openMP build. </span><br><br><span style=" font-size:12pt"> Here are my Cmake/make commands:</span><br><span style=" font-size:12pt">----------------------------------------</span><br><span style=" font-size:12pt">/home/username/misc/bin/cmake -G "Unix
Makefiles" ../llvm \<br>  -DLLVM_ENABLE_PROJECTS="clang;openmp" \<br>  -DCMAKE_BUILD_TYPE=Release \<br>  -DCMAKE_INSTALL_PREFIX=/home/username/compilers/clang-build-RELEASE_900-rc6_pwr9
\<br>  -DCMAKE_C_COMPILER=/home/username/git/llvm-project/install_pwr9/bin/clang
\<br>  -DCMAKE_C_FLAGS="--gcc-toolchain=/auto/software/gcc/ppc64le/gcc-8.3.0"
\<br>  -DCMAKE_CXX_COMPILER=/home/username/git/llvm-project/install_pwr9/bin/clang++
\<br>  -DCMAKE_CXX_FLAGS="--gcc-toolchain=/auto/software/gcc/ppc64le/gcc-8.3.0"
\<br>  -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_70 \<br>  -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=70</span><br><br><span style=" font-size:12pt">make VERBOSE=1 -j8</span><br><span style=" font-size:12pt">----------------------------------------</span><br><br><span style=" font-size:12pt">Here's the error I'm getting: </span><br><span style=" font-size:12pt">----------------------------------------</span><br><span style=" font-size:12pt">/usr/local/cuda-10.1/bin/nvcc /home/username/git/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/</span><a href="http://omp_data.cu"><span style=" font-size:12pt;color:blue"><u>omp_data.cu</u></span></a><span style=" font-size:12pt">-dc -o /home/username/git/llvm-project/build_pwr9/projects/openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_omp_data.cu.o
-ccbin /auto/software/gcc/ppc64le/gcc-8.3.0/bin/gcc -m64 -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -gencode
arch=compute_35,code=sm_35 -DNVCC -I/usr/local/cuda-10.1/include -I/usr/include/libxml2
-I/home/username/git/llvm-project/build_pwr9/include -I/home/username/git/llvm-project/llvm/include
-I/home/username/git/llvm-project/openmp/libomptarget/include<br>/auto/software/gcc/ppc64le/gcc-8.3.0/include/c++/8.3.0/type_traits(335):
error: identifier "__ieee128" is undefined<br>/auto/software/gcc/ppc64le/gcc-8.3.0/include/c++/8.3.0/bits/std_abs.h(101):
error: identifier "__ieee128" is undefined<br>/auto/software/gcc/ppc64le/gcc-8.3.0/include/c++/8.3.0/bits/std_abs.h(102):
error: identifier "__ieee128" is undefined<br>3 errors detected in the compilation of "/tmp/tmpxft_0000bd6b_00000000-6_omp_data.cpp1.ii".</span><br><span style=" font-size:12pt">----------------------------------------</span><br><br><span style=" font-size:12pt">Finally, here are the offending lines
from std_abs.h:</span><br><span style=" font-size:12pt">----------------------------------------</span><br><span style=" font-size:12pt"> 99 #if !defined(__STRICT_ANSI__)
&& defined(_GLIBCXX_USE_FLOAT128)<br>100   inline _GLIBCXX_CONSTEXPR<br>101   __float128<br>102   abs(__float128 __x)<br>103   { return __x < 0 ? -__x : __x; }<br>104 #endif</span><br><br><span style=" font-size:12pt">I haven't been able to find any reference
of a variable substitution/macro between __float128 and __ieee128, I'm
not sure where/when this takes place.</span><br><span style=" font-size:12pt">----------------------------------------</span><br><br><span style=" font-size:12pt">Any ideas? I'm not sure if the errors
stem from my clang build process, my gcc installation, my cuda/nvcc installlation,
Unix Makefiles vs Ninja, etc.</span><br><br><span style=" font-size:12pt">Jacob</span><tt><span style=" font-size:10pt">_______________________________________________<br>Openmp-dev mailing list<br>Openmp-dev@lists.llvm.org<br></span></tt><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev"><tt><span style=" font-size:10pt">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</span></tt></a><tt><span style=" font-size:10pt"><br></span></tt><br><br><BR>