Hi,
I’m trying to compile Clang 19.0.0git with OpenMP offloading support using the following command:
cmake ../llvm/ -DCMAKE_BUILD_TYPE=Release -G Ninja
-DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU"
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld"
-DLLVM_ENABLE_RUNTIMES="libc;openmp;offload;libunwind"
-DCMAKE_INSTALL_PREFIX=/<path>/clang -DLLVM_ENABLE_ASSERTIONS=ON
-DLIBOMPTARGET_ENABLE_DEBUG=ON
-DLIBOMPTARGET_DEVICE_ARCHITECTURES=sm_80
-DPTXAS_EXECUTABLE=/<path>/cuda-12.2.0-2ttufp/bin/ptxas
-DLLVM_USE_LINKER=lld -DCLANG_DEFAULT_LINKER=lld
-DLIBC_GPU_BUILD=ON
-DLLVM_OPTIMIZED_TABLEGEN=ON
-DBUILD_SHARED_LIBS=ON
-DLLVM_APPEND_VC_REV=OFF
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
However during compilation it exits with the following error:
[6053/6063] Performing build step for 'runtimes-nvptx64-nvidia-cuda'
[1312/1312] Linking CXX static library /<path>/llvm-project/build/lib/libcgpu-nvptx.a
[6054/6063] Performing build step for 'runtimes-amdgcn-amd-amdhsa'
[1312/1312] Linking CXX static library /<path>/llvm-project/build/lib/libcgpu-amdgpu.a
[6055/6063] Performing build step for 'runtimes'
[87/705] Generating kmp_i18n_default.inc
FAILED: openmp/runtime/src/kmp_i18n_default.inc /<path>/llvm-project/build/runtimes/runtimes-bins/openmp/runtime/src/kmp_i18n_default.inc
cd /<path>/llvm-project/build/runtimes/runtimes-bins/openmp/runtime/src && /<path>/perl-5.36.0-7mbahg/bin/perl /work/ku0598/k203175/llvm-project/openmp/runtime/tools/message-converter.pl --os=lin --prefix=kmp_i18n --default=kmp_i18n_default.inc /<path>/llvm-project/openmp/runtime/src/i18n/en_US.txt
Dumper.c: loadable library and perl binaries are mismatched (got first handshake key 0xeb00080, needed 0xeb80080)
[88/705] Generating kmp_i18n_id.inc
FAILED: openmp/runtime/src/kmp_i18n_id.inc /<path>/llvm-project/build/runtimes/runtimes-bins/openmp/runtime/src/kmp_i18n_id.inc
cd /<path>/llvm-project/build/runtimes/runtimes-bins/openmp/runtime/src && /<path>/perl-5.36.0-7mbahg/bin/perl /<path>/llvm-project/openmp/runtime/tools/message-converter.pl --os=lin --prefix=kmp_i18n --enum=kmp_i18n_id.inc /<path>/llvm-project/openmp/runtime/src/i18n/en_US.txt
Dumper.c: loadable library and perl binaries are mismatched (got first handshake key 0xeb00080, needed 0xeb80080)
[344/705] Building CXX object offload/plugins-nextgen/amdgpu/CMakeFiles/omptarget.rtl.amdgpu.dir/src/rtl.cpp.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/runtimes-stamps/runtimes-build /<path>/llvm-project/build/runtimes/runtimes-stamps/runtimes-build
cd /<path>/llvm-project/build/runtimes/runtimes-bins && /<path>/cmake-3.26.3-fuvwuh/bin/cmake --build .
ninja: build stopped: subcommand failed.