-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
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
[HIPIFY] Build fail with LLVM 15-18 #833
Comments
It looks like your installation of LLVM doesn't contain the reported clang libraries, whereas LLVM libraries were found. Check the |
Checking ... $ cmake \
-DCMAKE_INSTALL_PREFIX=../dist \
-DCMAKE_BUILD_TYPE=Release \
..
-- Found LLVM 15.0.7:
-- - CMake module path: /usr/lib64/cmake/llvm
-- - Include path : /usr/include
-- - Binary path : /usr/bin
-- Configuring done (0.0s)
-- Generating done (0.0s) I can see that LLVM 15 was found, I'm checking for the underlying clang libraries. They indeed are not there. I followed this instructions from CentOS 8 to install my LLVM library. Or simply put:
Last metadata expiration check: 0:11:55 ago on Tue 25 Apr 2023 01:49:09 PM CEST.
Package llvm-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Package llvm-devel-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Package llvm-toolset-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Package llvm-test-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Package llvm-compat-libs-14.0.6-1.module_el8.8.0+1224+64629835.x86_64 is already installed.
Package llvm-libs-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Package llvm-googletest-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete! I'm checking now, if this libs are missing because the
Last metadata expiration check: 0:13:58 ago on Tue 25 Apr 2023 01:49:09 PM CEST.
Package clang-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Package clang-devel-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Package clang-tools-extra-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Package clang-libs-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Package llvm-compat-libs-14.0.6-1.module_el8.8.0+1224+64629835.x86_64 is already installed.
Package clang-resource-filesystem-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete! Now, invoking $ make
[ 2%] Linking CXX executable hipify-clang
/usr/bin/ld: cannot find -lclangASTMatchers
/usr/bin/ld: cannot find -lclangFrontend
/usr/bin/ld: cannot find -lclangTooling
/usr/bin/ld: cannot find -lclangParse
/usr/bin/ld: cannot find -lclangSerialization
/usr/bin/ld: cannot find -lclangSema
/usr/bin/ld: cannot find -lclangEdit
/usr/bin/ld: cannot find -lclangFormat
/usr/bin/ld: cannot find -lclangLex
/usr/bin/ld: cannot find -lclangAnalysis
/usr/bin/ld: cannot find -lclangDriver
/usr/bin/ld: cannot find -lclangAST
/usr/bin/ld: cannot find -lclangToolingCore
/usr/bin/ld: cannot find -lclangRewrite
/usr/bin/ld: cannot find -lclangBasic
/usr/bin/ld: cannot find -lclangToolingInclusions
/usr/bin/ld: cannot find -lclangSupport
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/hipify-clang.dir/build.make:660: hipify-clang] Error 1
make[1]: *** [CMakeFiles/Makefile2:181: CMakeFiles/hipify-clang.dir/all] Error 2
make: *** [Makefile:136: all] Error 2 No luck : ( Thus, how can I obtain these missing libraries? EDIT After digging on my installation, I found these libraries. $ ls /usr/include/clang/
Analysis/ Frontend/
APINotes/ FrontendTool/
ARCMigrate/ Index/
AST/ IndexSerialization/
ASTMatchers/ Interpreter/
Basic/ Lex/
CodeGen/ Parse/
Config/ Rewrite/
CrossTU/ Sema/
DirectoryWatcher/ Serialization/
Driver/ StaticAnalyzer/
Edit/ Support/
ExtractAPI/ Testing/
Format/ Tooling/ Then, can you point to me how to modify the |
|
The |
@emankov could we please reopen this, I am seeing the exact same issue, with the difference that I am using Fedora 38 with clang-16, which should also be supported. I found the solution in this post: It seems, that on Fedora everything is packed into I am no good with cmake, so can't provide a proper pull request, but perhaps you could add detection for libclang-cpp, which would fix the build problem on Fedora and most likely also no CentOS? The below diff solved the problem for me on Fedora 38:
EDIT: the compiled
I was not able to figure out what that means and if it is related to the above linking issue. |
It looks like we need to investigate LLVM/clang linking issues on |
Hello, I also get the
issue on several versions of ubuntu with different LLVM versions. The name of the option is not always the same. |
Hi @hammersbaldthegodofimpacience! Could you please share the cmake log and verbose hipify-clang log (with |
Same here, trying to build on alpine:
|
Here in vanilla ubuntu 24.04 container
|
Thanks, @hammersbaldthegodofimpacience! I'll try to reproduce it on Ubuntu first. |
Same problem on Ubuntu22.04 with llvm14, clang14, GCC12 library. Running |
@wme7 Can you please check if your issue still happens on the latest ROCm 6.2? If not, please close the ticket. Thanks! |
I still get this error. Did you manage to reproduce it? |
Reopening due to multiple complaints on building hipify-clang for not only CentOS and Fedora but Ubuntu as well. The issue needs reproduction. |
On CentOS, I installed LLVM (v15) and Clang (v15) and started the build using CMake (v3.26). The build runs smoothly but at the very end it reached a linker error.
Here is a copy of the build output generated:
Perhaps I missed something ... any suggestion is welcome ; )
The text was updated successfully, but these errors were encountered: