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
Shared Libraries built using Clang and gnuace are missing SONAME
#1790
Comments
platform_gcc_clang_common.GNU and platform_clang_common.GNU are not used by platform_linux_clang.GNU |
To be more specific on the "linker skips over the libraries..." part, this is what I'm seeing building with Clang and GCC on Linux: Clang:
GCC:
So with Clang, an unversioned |
Alright then, I guess I just assumed that because it made sense, but I didn't look into it enough last week. Anyway I found another difference between GCC and clang on Linux while working on OpenDDS/OpenDDS#3354: I built with clang to test ubsan and it was missing source locations in violation messages because I think ACE_TAO/ACE/include/makeinclude/platform_android.GNU Lines 201 to 205 in 60b3882
|
Despite being in the common compiler logic, somehow clang is not getting these arguments, at least on Linux. This appears not to normally be a problem, but when the libraries are used in a certain way, they cause failures where libraries built with GCC do not. The particular scenario is installing the shared libraries using CMake's
install(IMPORTED_RUNTIME_ARTIFACTS)
.The dynamic linker skips over the libraries in
LD_LIBRARY_PATH
. PuttingSOFLAGS+=-Wl,-h,$(SONAME)
inplatform_macros.GNU
or manually setting theSONAME
usingpatchelf
are some of the ways to workaround this issue.The text was updated successfully, but these errors were encountered: