Skip to content
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 library without SO version suffix, wrong SONAME ELF field #698

Closed
glaubitz opened this issue Sep 18, 2020 · 5 comments
Closed

Shared library without SO version suffix, wrong SONAME ELF field #698

glaubitz opened this issue Sep 18, 2020 · 5 comments

Comments

@glaubitz
Copy link

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.

@rccarper
Copy link
Contributor

rccarper commented Sep 28, 2020

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.

@rccarper
Copy link
Contributor

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.

@glaubitz
Copy link
Author

OK, thanks!

@rccarper
Copy link
Contributor

We just cut a new release for this library; the fix is in v0.4.59.

@yasminetalby
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants