-
Notifications
You must be signed in to change notification settings - Fork 1.3k
build: Allow building ROOT using the Clang shared library #17698
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
Comments
I think this is related to #17461 where the solution to both issues may be to use |
Hi @jakeforster, #17737 fixes #17461. This should get us closer to potentially allow using the Clang shared library, but there are two blockers:
So some progress, but not quite. If you want to give it a try with fresh eyes from your side, please let us know how it goes! |
Hi @hahnjo Thank you very much for your work toward improving the build system! Sorry I haven't been able to help so far. I saw in #17737 that you think it might be ready for more testing, so I tried again. For ROOT's inputs, I used:
I started with ROOT commit 3c0c962 and applied a couple of patches (see master...jakeforster:root:allow-building-against-shared-llvm-library-ctd) to get as far as the Thanks! Please let me know if I can try anything out.
|
@aaronj0 @vgvassilev looks like CppInterOp made things worse... |
This PR will improve the situation with CppInterOp: The problem was that |
Yes, as expected. I had a quick look and the code that throws the errors is in |
Because the cmake of shipped llvm are broken. It does not matter if we specify this option, if llvm is shipped in a package manager we have a problem as the cmake config or the cmake targets forces an explicit linking of libLLVM.so. |
|
Does not work for shipped llvm on conda. Tracing this down is very hard but I did that once (and forgot most of it) but basically somewhere in the shipped cmake files with the llvm release there is logic which disregards this option and hardcodes libLLVM.so and CppInterOp.so starts loading libLLVM.so and we get the usual assert. |
Explain what you would like to see improved and how.
Hello gentle maintainers
My understanding is PR #15563 added support for building Cling as a standalone package using shared libraries from LLVM and Clang. This was facilitated by adopting the new style for embedding LLVM in a project (see https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project).
Similarly, does ROOT's build system allow ROOT to be built using shared libraries from LLVM and Clang? If not, would you be interested in modifying it to support this?
As discussed in that previous PR, there is an advantage to allowing these builds to be done separately, and I assume this modification could be done such that ROOT can still be built with the bundled LLVM and Clang when the builtin options are passed.
For reference, my attempt to build ROOT with external LLVM, Clang and Cling fails at the 'rootcling_stage1' target, which I'm assuming is due to the expectation of building using static libraries (though I'd be happy to be wrong):
That's from building ROOT version 6.32.08 without builtin Cling, LLVM and Clang; LLVM is from tag "ROOT-llvm16-20240621-01" of root-project's fork, Clang is built from that same LLVM, and Cling is version 1.1 built with LLVM from tag "cling-llvm16-20240621-02".
Thanks in advance!
Jake
ROOT version
6.32.08. Also tried with 6.34.02 using Cling 1.2 and LLVM/Clang 18.
Installation method
From source
Operating system
Linux (Guix)
Additional context
No response
The text was updated successfully, but these errors were encountered: