Fix LIB_CORE_NAME mismatch when soversion is enabled#21375
Merged
vepadulano merged 1 commit intoroot-project:masterfrom Feb 25, 2026
Merged
Fix LIB_CORE_NAME mismatch when soversion is enabled#21375vepadulano merged 1 commit intoroot-project:masterfrom
vepadulano merged 1 commit intoroot-project:masterfrom
Conversation
On Linux, dl_iterate_phdr reports loaded libraries by their SONAME (e.g. libCore.so.6.38), not their full filename (libCore.so.6.38.02). Commit ff7e631 changed LIB_CORE_NAME from using the SOVERSION-based name to TARGET_FILE_NAME, which gives the full versioned filename. When soversion is enabled, this causes TROOT::GetSharedLibDir() to fail to match the library name reported by the dynamic linker, returning an empty path. This breaks module loading and causes cling to attempt recompiling modules from source at runtime, which fails when external headers (e.g. Vc) are not in cling's include path. Fix by using TARGET_SONAME_FILE_NAME when soversion is enabled on Linux. On macOS, _dyld_get_image_name returns the actual filename, so TARGET_FILE_NAME remains correct there.
Test Results 22 files 22 suites 3d 4h 40m 14s ⏱️ For more details on these failures, see this check. Results for commit 1528d05. ♻️ This comment has been updated with latest results. |
5 tasks
Member
|
For the record, the Spack builds are similarly broken since they also use soversion. |
Member
|
/backport to 6.38 |
|
Something went wrong with the backport to 6.38: @hageboeck please see the logs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
soversion=ON,TROOT::GetSharedLibDir()fails to findlibCoreon Linux becauseLIB_CORE_NAME(set toTARGET_FILE_NAME, e.g.libCore.so.6.38.02) doesn't match whatdl_iterate_phdrreports (the SONAME, e.g.libCore.so.6.38).This causes ROOT to fail to locate its library directory, breaking pre-compiled module loading and causing cling to attempt recompiling modules from source at runtime.
Discovered via the conda-forge ROOT build which enables
soversion=ON.The fix uses
TARGET_SONAME_FILE_NAMEwhensoversionis enabled on Linux. On macOS,_dyld_get_image_namereturns the actual filename soTARGET_FILE_NAMEremains correct.Introduced by ff7e631.