You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[clang] DISABLE_LLVM_LINK_LLVM_DYLIB no longer honored after upgrade to LLVM22 when configuring with builtin_llvm=OFF #23155
docker run -it registry.cern.ch/root-ci/ubuntu2604:buildready
apt update
apt install llvm-20 libedit-dev libpolly-20-dev
git clone https://github.com/root-project/root root_src && cd root_src
git checkout v6-40-00-patches
sed -i 's|LLVM REQUIRED|LLVM ${ROOT_LLVM_VERSION_REQUIRED_MAJOR}.1 REQUIRED|g' interpreter/CMakeLists.txt # Backport of a patch from master
mkdir build && cd build
cmake -Dbuiltin_llvm=OFF -Dminimal=ON ..
grep -r LLVM.so *
shows that LLVM is not linked via shared object libraries, as expected.
Instead, in current master:
docker run -it registry.cern.ch/root-ci/ubuntu2604:buildready
apt update
apt install llvm-22 libpolly-22-dev
git clone https://github.com/root-project/root root_src && cd root_src
mkdir build && cd build
cmake -Dbuiltin_llvm=OFF -Dminimal=ON ..
grep -r LLVM.so *
shows a lot of occurrences in grep, which is not what one would expect. Which later leads to the issue described in #12156
Ubuntu26 installs LLVM20 and LLVM22 in the same way, so it's probably not a Debian packaging issue, but rather something with LLVM22 CMakeLists.txt changes. See only minor differences:
diff --brief --recursive /usr/lib/llvm-20/lib/ /usr/lib/llvm-22/lib/ | grep Only
Only in /usr/lib/llvm-20/lib/: libLLVM-20.so
Only in /usr/lib/llvm-22/lib/: libLLVM-22.so
Only in /usr/lib/llvm-20/lib/: libLLVM.so.20.1
Only in /usr/lib/llvm-22/lib/: libLLVM.so.22.1
Only in /usr/lib/llvm-20/lib/: libLTO.so.20.1
Only in /usr/lib/llvm-22/lib/: libLTO.so.22.1
Only in /usr/lib/llvm-20/lib/: libRemarks.so.20.1
Only in /usr/lib/llvm-22/lib/: libRemarks.so.22.1
Only in /usr/lib/llvm-20/lib/: libclang-cpp.so.20.1
Only in /usr/lib/llvm-22/lib/: libclang-cpp.so.22.1
Only in /usr/lib/llvm-20/lib/cmake: polly
Only in /usr/lib/llvm-20/lib/: libPolly.a
Only in /usr/lib/llvm-20/lib/: libPollyISL.a
Only in /usr/lib/llvm-22/lib/: libLLVMABI.a
Only in /usr/lib/llvm-22/lib/: libLLVMCAS.a
Only in /usr/lib/llvm-22/lib/: libLLVMDTLTO.a
Only in /usr/lib/llvm-22/lib/: libLLVMDWARFCFIChecker.a
Only in /usr/lib/llvm-22/lib/: libLLVMDebugInfoDWARFLowLevel.a
Only in /usr/lib/llvm-22/lib/: libLLVMFrontendDirective.a
Only in /usr/lib/llvm-22/lib/: libLLVMPlugins.a
Only in /usr/lib/llvm-22/lib/: libLLVMSupportLSP.a
Reproducer
docker run -it registry.cern.ch/root-ci/ubuntu2604:buildready
apt update
apt install llvm-22 libpolly-22-dev
git clone https://github.com/root-project/root root_src && cd root_src
mkdir build && cd build
cmake -Dbuiltin_llvm=OFF -Dminimal=ON ..
make clang-tblgen -j$(nproc)
ROOT version
ROOT v6.40.02
Built for linuxx8664gcc on Jun 10 2026, 10:37:47
From tags/v6-40-02@v6-40-02
With c++ (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0 std201703
Binary directory: /opt/root/bin
Thanks a lot! I can confirm that your patch #18387 (comment)
solves this issue. (Even if that issue you mean is with builtin_clang=OFF whereas I use builtin_clang=ON, so not exactly duplicate).
What I do not understand is why it works ok with LLVM20 without that patch, and starts failing with LLVM22.
Activity
guitargeek commentedon Aug 26, 2026
It's a never-ending story, see also:
LLVM_LINK_LLVM_DYLIB=ON#18387ferdymercury commentedon Aug 26, 2026
Thanks a lot! I can confirm that your patch #18387 (comment)
solves this issue. (Even if that issue you mean is with builtin_clang=OFF whereas I use builtin_clang=ON, so not exactly duplicate).
What I do not understand is why it works ok with LLVM20 without that patch, and starts failing with LLVM22.
[clang] do not search again for LLVM if already found by parent projects
[interpreter] do not let builtin_clang search again for LLVM if built…
[interpreter] do not let builtin_clang search again for LLVM if built…
[CMake] Don't let builtin_clang search for LLVM if builtin_llvm=OFF
[CMake] Don't let builtin_clang search for LLVM if builtin_llvm=OFF