-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
libclang produced by 14.0.0.rc1 has wrong so-number #54004
Comments
@h-vetinari This is expected. libclang.so ABI usually stays stable across major releases, so we've frozen the soname at libclang.so.13. The plan is to keep it with this name unless the ABI changes. |
Well, different people can have different expectations. 😅 From LLVM 8 (at least, didn't check back further) to LLVM 13, the version of But OK, if this is intentional, then I'll reflect this in our build. |
@h-vetinari There is a libclang.so.14.0.0 symlink you can link against if you need a versioned so name. |
Ah, I guess you already saw that in the first comment. |
Thanks; I can easily live with an ABI version that's different from LLVM-major. Just wanted to verify that that's intentional. |
@tstellar I've found |
@EugeneZelenko |
Sorry, if I was too fast. |
Gentle ping @tstellar (regarding |
@h-vetinari Changing the soname of libclang-cpp.so is intentional, because the ABI/API is changes with each major version. |
Thank you very much for clarifying that. Closing. |
Unfortunately, one more question popped up still: the OSX dylib for libclang still gets produced as Or am I overlooking something again? Can the ABI version be platform-dependent (and if so, is that really desirable...)? |
PS. I tried looking for documentation on this, but couldn't find any on it. Indeed, out of all files in the |
Apologies for one last ping @tstellar - |
@h-vetinari This wasn't implemented for OSX, because it didn't already use a linker script. |
Thank you very much. What do you think of the following suggestions (not sure if they merit a separate issue)?
|
You should simply use something else to make clear As a workaround: Link: https://discourse.llvm.org/t/llvm-14-0-1-schedule-and-release-updates/61227/15 |
I think using the SONAME to indicate the ABI is quite a traditional approach. Personally I find it trickier that it's not consistent across platforms. |
On FreeBSD with ports devel/llvm12 devel/llvm13 and devel/llvm14 installed over time
So l ended up with no -lclang.14 in ldconfig and llvm14 things use /usr/local/llvm13/lib/libclang.so.13 . In case it is unclear: having all 3 llvm's around at the same time is deliberate and the port's are not designed to share each other's files, even when there is ABI compatibility. ABI compatibility need not imply functionally identical in all observable respects. |
Looks like you edited your original posting. I asked @tstellar to clarify on these ABI changes listed in [0] via PM (link in [1] is what you had in the original posting). Update: [0] was the link I mentioned via PM. So this about clang and libcxx - cannot say what is with libclang.so. [0] https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html#abi-changes-in-clang |
Yea, libclang is not part of libc++ and so I deleted my mistaken reference. As for [0], the libclang section of the page ( https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html#libclang ) is empty, indicating no C ABI change for accessing clang functionality. But that does not mean that using the C interface to clang results in functionally identical behavior in all observable respects, since the clang code has actually changed some compared to 13. The ldconfig -r handling can not pick out 13's functionality vs. 14's functionality. (But can pick out 12's functionality.) https://releases.llvm.org/13.0.0/tools/clang/docs/ReleaseNotes.html#libclang does report "Make libclang SONAME independent from LLVM version. It will be updated only when needed." but actually changed 12->13. 14.0.0 is the first no-change example. https://lists.llvm.org/pipermail/cfe-dev/2021-June/068423.html reported:
However, that can lead to functional changes in behavior where mixing old and new could be a problem --even though the C code would run. |
So is it bug or feature? 🤔 |
Just checked one thing: [tkloczko@devel-g2v tmp]$ objdump -x libclang.so.14.0.0 libclang-cpp.so.14.0 |grep SONAME
SONAME libclang.so.13
SONAME libclang-cpp.so.14.0 In other words file name ins case of libclang.so.14.0.0 do not match with SONAME. Issue is that of distributions which have packaged both clang 14.x and 13.x package manager dependencies resolver is totally confused and it causes that clang 14.x main subpackage with executables will be installed with subpackage with packaged clang 13.x libraries 🤔 As release notes poins that clang 14.x have some ABI changes not changeing main clang library SONAME is IMO bug. and it would be good if someone from LLVM core devel team would confirm that and perepare JFDI commit to fix that. As LLVM 14.0.1 has alredy many issues which are causing that literally none of the leading distributions in its devel versions decided to move to LLVM 14.0.1 IMO it would be good to clean at least few known 14.x issues and make new 14.0.2 release ASAP. Personally I wold be interested to sort out #54897 |
The ABI changes are only in the C++ library (libclang-cpp.so) and not in the C library (libclang.so) |
Nevertheless this is causing some packaging issuew which I've described. |
I'll quote https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Compatibility.html#Compatibility on the type of issue: QUOTE |
@tstellar On Arch Linux, I have
There's no |
I think this can be considered fixed by bc39d7b. |
Seen in conda-forge/clangdev-feedstock#165, where we explicitly test for presence of
libclang.so.<major_ver>
in the installed environment. Turns out, thatlibclang.so.14.0.0
is created, but not the symlink tolibclang.so.14
:I searched for other issues, maybe #53932 is related.
The text was updated successfully, but these errors were encountered: