We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to build Clang 18.1.4 with offloading with nvptx and amdgpu. The pretty much same cmake args worked on 17.0.6.
Modules loaded:
'torel@srl-login1:~$ module list Currently Loaded Modulefiles:
Cmake config:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-mavx2 -mno-avx512f -mno-avx512pf -mno-avx512bw" -DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU" -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;bolt;libc;libclc;lld;lldb;openmp;flang;polly;pstl;mlir" -DCMAKE_INSTALL_PREFIX=/cm/shared/apps/clang/gcc/18.1.4 -G "Unix Makefiles" ../llvm -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_80 -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=70,75,80,90 -DLIBOMPTARGET_DEP_CUDA_DRIVER=/cm/shared/apps/cuda12.3/toolkit/12.3.2/targets/x86_64-linux/lib/stubs/libcuda.so
Build fails at
[ 22%] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.strcpy.dir/strcpy.cpp.o In file included from /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/__support/endian.h:12, from /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/string/memory_utils/utils.h:1 , from /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/string/memory_utils/inline_memcpy.h:14, from /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/string/strcpy.cpp:10: /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/string/strcpy.cpp:17:28: error: ‘char* __llvm_libc_18_1_4_::strcpy(char*, const char*)’ aliased to external symbol ‘strcpy’ 17 | LLVM_LIBC_FUNCTION(char *, strcpy, | ^~~~~~ /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/__support/common.h:28:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’ 28 | decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]]; \ | ^~~~ /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/string/strcpy.cpp:17:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’ 17 | LLVM_LIBC_FUNCTION(char *, strcpy, | ^~~~~~~~~~~~~~~~~~ /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/string/strcpy.cpp:17:28: error: ‘char* __llvm_libc_18_1_4_::strcpy(char*, const char*)’ specifies less restrictive attributes than its target ‘char* strcpy(char*, const char*)’: ‘leaf’, ‘nonnull’, ‘nothrow’ [-Werror=missing-attributes] 17 | LLVM_LIBC_FUNCTION(char *, strcpy, | ^~~~~~ /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/__support/common.h:28:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’ 28 | decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]]; \ | ^~~~ /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/string/strcpy.cpp:17:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’ 17 | LLVM_LIBC_FUNCTION(char *, strcpy, | ^~~~~~~~~~~~~~~~~~ In file included from /usr/include/features.h:486, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/string.h:26, from /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/string/strcpy.h:12, from /home/torel/workspace/Clang/llvm-project-llvmorg-18.1.4/libc/src/string/strcpy.cpp:9: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:77:1: note: ‘char* __llvm_libc_18_1_4_::strcpy(char*, const char*)’ target declared here 77 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) | ^~~~~ cc1plus: all warnings being treated as errors make[2]: *** [projects/libc/src/string/CMakeFiles/libc.src.string.strcpy.dir/build.make:76: projects/libc/src/string/CMakeFiles/libc.src.string.strcpy.dir/strcpy.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:81671: projects/libc/src/string/CMakeFiles/libc.src.string.strcpy.dir/all] Error 2 make: *** [Makefile:156: all] Error 2 torel@srl-login1:~/workspace/Clang/llvm-project-llvmorg-18.1.4/Build-clang-x86_64$
Any suggestions?
The text was updated successfully, but these errors were encountered:
duplicate of #60481
Sorry, something went wrong.
No branches or pull requests
I'm trying to build Clang 18.1.4 with offloading with nvptx and amdgpu. The pretty much same cmake args worked on 17.0.6.
Modules loaded:
'torel@srl-login1:~$ module list
Currently Loaded Modulefiles:
'
Cmake config:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-mavx2 -mno-avx512f -mno-avx512pf -mno-avx512bw" -DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU" -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;bolt;libc;libclc;lld;lldb;openmp;flang;polly;pstl;mlir" -DCMAKE_INSTALL_PREFIX=/cm/shared/apps/clang/gcc/18.1.4 -G "Unix Makefiles" ../llvm -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_80 -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=70,75,80,90 -DLIBOMPTARGET_DEP_CUDA_DRIVER=/cm/shared/apps/cuda12.3/toolkit/12.3.2/targets/x86_64-linux/lib/stubs/libcuda.so
Build fails at
Any suggestions?
The text was updated successfully, but these errors were encountered: