-
Notifications
You must be signed in to change notification settings - Fork 499
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 versioning scheme (SOVERSION) #1081
Comments
I found you currently using |
I think Dilithium ABI (that was caused heap corruption) is changed with changes like this: https://github.com/open-quantum-safe/liboqs/commits/main/src/sig/dilithium/sig_dilithium.h, for example when any So, any release after such change should have incremented SOVERSION. |
Thanks again for the explanation and tests.
One question related to this: In your opinion/experience, would a "regular" (read: couple of times a year) increase of Thus --short of manually analyzing each upstream code import in detail to judge the need for a version increase-- the one way to be sure such (possibly) "ABI-breaking" changes are detected/highlighted would be to increase In other words, would a simple ("preventative") |
I think not increasing SOVERSION while having ABI change can cause more problems, than increasing SOVERSION while ABI is not changed. Thus, I would recommend to increase SOVERSION for libqos if you are not sure that ABI changed or not, on every release (no need more frequent). And especially while it is not stabilized library (I conclude this from its version starting from This SOVERSION change will force all library clients to ne rebuild with a new library. This is OK if there are few clients. As seems to be case for liboqs. (In ALT Linux we have only OQS openssh.) If there are many clients, thing will be getting much more complicated, and it's better to only increase SOVERSION when needed. |
We've discussed this further, and will take your suggested approach of increasing SOVERSION in future releases. We'll try to check for particular ABI changes, but when in doubt will increase. The plan would be to do this starting from our next release. What number should we use there? In particular, @vt-alt if you've used .1, would you prefer us to use .2 for the next one? |
Yes, I used already |
Okay, will do. I'm going to close this issue; I've made a note in our release process wiki page to remember to do this upon our next release. |
I think what is really important is to have soversion changed appropriately between releases (including pre-releases) and binary packages. Perhaps that's why
But to change more frequently is not a bad thing (IMHO) and it only "wastes" numbers which are plenty. There maybe benefits to update soversion after/during actual ABI change -- for example if someone wishes to build a package from intermediate commit (their build will not break dependent packages), or you may document ABI change in a commit updating soversion. |
As pointed there open-quantum-safe/openssh#111 (comment)
liboqs
would benefit from proper library versioning. (Sometimes called API version or SOVERSION). This is different thing than usual project versioning. It's purpose to maintain binary (ABI) compatibility between executable binaries and shared libraries. Currently, liboqs just copy project version into SOVERSION which does not reflect backward incompatible ABI changes (which may cause obscure program errors when binary that is linked to a newer library used on system with older library — current versioning allows this, because major version number (that signifying backward-incompatible ABI change) is not incremented (while library does have backward incompatible ABI changes).References:
-version-info
arguments order is different from what will actually appear in the library suffix - they saycurrent:revision:age
, but library will be named likeliboqs.so..current.age.revision
).The text was updated successfully, but these errors were encountered: