-
Notifications
You must be signed in to change notification settings - Fork 266
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
Link errors when attempting to use external LLVM & Clang #430
Labels
Comments
Seems adding a link directive for clang-cpp resolves the issue, at least for libcling. |
I've done the same for tools/driver and now I got a cling binary, but it fails to run like:
|
This was referenced Sep 8, 2021
1 task
Apteryks
added a commit
to Apteryks/root
that referenced
this issue
May 18, 2024
The officially supported way to build LLVM/Clang as a shared library is via the LLVM_BUILD_LLVM_DYLIB and LLVM_LINK_LLVM_DYLIB CMake options (see: https://llvm.org/docs/BuildingADistribution.html). When built this way, the whole of Clang API is exposed as a shared library (libclang-cpp.so). * CMakeLists.txt: Query if we're in shared mode via llvm-config, and register the result as LLVM_LIB_IS_SHARED. [LLVM_LIB_IS_SHARED] <target_link_libraries>: Use the PUBLIC interface of the LLVM shared library. * lib/Interpreter/CMakeLists.txt [LLVM_LIB_IS_SHARED]: When defined, replace the individual Clang components by clang-cpp. * lib/MetaProcessor/CMakeLists.txt: Likewise. * lib/Utils/CMakeLists.txt: Likewise. * tools/Jupyter/CMakeLists.txt: Likewise. * tools/driver/CMakeLists.txt: Likewise. * tools/libcling/CMakeLists.txt: Likewise. Fixes: <root-project/cling#430>
Apteryks
added a commit
to Apteryks/root
that referenced
this issue
May 26, 2024
* CMakeLists.txt: Remove llvm-config related code, instead using modern 'find_package' constructs. Fixes: <root-project/cling#430>
vgvassilev
pushed a commit
to root-project/root
that referenced
this issue
May 27, 2024
* CMakeLists.txt: Remove llvm-config related code, instead using modern 'find_package' constructs. Fixes: <root-project/cling#430>
FonsRademakers
pushed a commit
that referenced
this issue
May 27, 2024
* CMakeLists.txt: Remove llvm-config related code, instead using modern 'find_package' constructs. Fixes: <#430>
PPaye
pushed a commit
to PPaye/root
that referenced
this issue
Jun 3, 2024
* CMakeLists.txt: Remove llvm-config related code, instead using modern 'find_package' constructs. Fixes: <root-project/cling#430>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using LLVM and Clang as external dependencies (but built using their patched sources), Cling fails to link, showing various missing LLVM symbols.
See ba63aikq9ym2n7gjs13m56hxa77q25-cling-0.9-1.d78d1a0.drv.txt for the complete build log.
Expected behavior
Cling should build successfully.
To Reproduce
./pre-inst-env guix build cling
Setup
The text was updated successfully, but these errors were encountered: