Shared library without SO version suffix, wrong SONAME ELF field
glaubitz opened this issue · 5 comments
In (#691), the SO version field was removed from the shared library meaning that the symbolic to the shared library file is unversioned which is - as far as I know - not allowed (see: https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html).
The proper versioning scheme must include the SO version as a suffix which changes whenever the library's API is changed in an incompatible way.
And the suffix must match what it's in the SONAME ELF field.
Currently, libaws-c-common has:
0x000000000000000e (SONAME) Library soname: [libaws-c-common.so.1.0.0]
which incorrectly includes the version of the library.
Comparing with other libraries:
libaws-c-common:
abuild@suse-laptop:~/rpmbuild/BUILD/aws-c-common-0.4.57/build> readelf -d libaws-c-common.so.1.0.0 |grep SONAME
0x000000000000000e (SONAME) Library soname: [libaws-c-common.so.1.0.0]
abuild@suse-laptop:~/rpmbuild/BUILD/aws-c-common-0.4.57/build>
Other shared libraries:
glaubitz@suse-laptop:/usr/lib> readelf -d libgssrpc.so.4.2 |grep SONAME
0x0000000e (SONAME) Library soname: [libgssrpc.so.4]
glaubitz@suse-laptop:/usr/lib> readelf -d libgpg-error.so.0.30.0 |grep SONAME
0x0000000e (SONAME) Library soname: [libgpg-error.so.0]
glaubitz@suse-laptop:/usr/lib> readelf -d librpm.so.9.0.1 |grep SONAME
0x0000000e (SONAME) Library soname: [librpm.so.9]
glaubitz@suse-laptop:/usr/lib> readelf -d libacl.so.1.1.2253 |grep SONAME
0x0000000e (SONAME) Library soname: [libacl.so.1]
glaubitz@suse-laptop:/usr/lib>
These libraries all have symbolic links corresponding to their SONAME, i.e. libacl.so.1.1.2253
has libacl.so.1
.
Hello, sorry for the delay in response. I have a possible fix for aws-c-common, and I'll be trying to apply that to any other affected libraries.
A quick update on this issue: we merged a fix for aws-c-common, and we should be able to cut a new release soon. We are still in the process of spreading that fix to our other libraries.
OK, thanks!
We just cut a new release for this library; the fix is in v0.4.59.
Closing this issue as a fix was released in v0.4.59.
If you have any further question or request feel free to contact the team through the submission of a new GitHub issue or discussion.
Best regards,
Yasmine