Commit 6feefe1
[core] Fix LIB_CORE_NAME mismatch when soversion is enabled
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.
(cherry picked from commit 82162e3)1 parent 70f15b9 commit 6feefe1
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
216 | 224 | | |
217 | 225 | | |
218 | 226 | | |
| |||
0 commit comments