[Openmp-dev] OpenMP deviceRTL for nvptx does not link

Qiongsi Wu via Openmp-dev openmp-dev at lists.llvm.org
Tue Nov 13 16:13:39 PST 2018


Hi everyone!

I am trying to build clang trunk with OpenMP CUDA device support and run into the following error. I am observing the same error in the released version of Clang 7.

[1/3] Building NVCC intermediate link file libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/omptarget-nvptx_intermediate_link.o
FAILED: cd /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx && /usr/local/cuda-9.0/bin/nvcc -gencode arch=compute_70,code=sm_70 -m64 -ccbin /usr/bin/cc -dlink /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_cancel.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_critical.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_data_sharing.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_libcall.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_loop.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_omptarget-nvptx.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_parallel.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_reduction.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_sync.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_task.cu.o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_omp_data.cu.o -o /home/wuqiongs/eco_llvm/build-openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/./omptarget-nvptx_intermediate_link.o
/usr/local/cuda-9.0/bin/crt/link.stub:16:26: fatal error: host_defines.h: No such file or directory
compilation terminated.

It seems that the linking failed due to an issue with the “host_defines.h” header. My CUDA library contains two headers with this name.

/usr/local/cuda-9.0/include/host_defines.h
/usr/local/cuda-9.0/include/crt/host_defines.h

and the top one includes the bottom one in it (in fact that is the only thing the top one has).

Also, my CMakeCache.txt contains the following:
./CMakeCache.txt:200:CUDA_TOOLKIT_INCLUDE:PATH=/usr/local/cuda-9.0/include
./CMakeCache.txt:203:CUDA_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-9.0
./CMakeCache.txt:206:CUDA_TOOLKIT_TARGET_DIR:PATH=/usr/local/cuda-9.0

, which look like the correct CUDA library directories.

May I get some suggestions from the community on how to proceed?

Thanks for your help!

Sincerely,
Qiongsi




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20181114/e7e18e79/attachment.html>


More information about the Openmp-dev mailing list