cpp-httplib: SOVERSION does not indicate binary compatibility accurately
Currently, SOVERSION on the shared library is set to match two version components:
This indicates that all 0.18.x releases should be backwards compatible. However, this is not the case. The most recent example is #2022 adding is_connection_closed field in middle of Request class. This caused all field offsets to change, causing software linked to the previous version of the library to start accessing wrong fields.
Please either update SOVERSION to correctly indicate binary compatible, or — even better — set stronger binary compatibility guarantees. This library is used by some huge stuff (for example, LLVM) and people need to spend hours rebuilding it whenever ABI of cpp-httplib changes.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (17 by maintainers)
Commits related to this issue
- package.mask: Revert "Mask =dev-cpp/cpp-httplib-0.18.6" Confirmed that upstream broke ABI again. Reverts: 0929eeb0d11469d1efa1ea282717ccb6563425f8 Closes: https://bugs.gentoo.org/949414 Bug: https:/... — committed to gentoo/gentoo by mgorny 2 years ago
- ci: add abidiff workflow This CI workflow checks ABI compatibility between the pushed commit and the previous, helping preventing accidental ABI breaks. Helps with https://github.com/yhirose/cpp-htt... — committed to Tachi107/cpp-httplib by Tachi107 2 years ago
- ci: add abidiff workflow This CI workflow checks ABI compatibility between the pushed commit and the previous, helping preventing accidental ABI breaks. Helps with https://github.com/yhirose/cpp-htt... — committed to Tachi107/cpp-httplib by Tachi107 2 years ago
- ci: add abidiff workflow This CI workflow checks ABI compatibility between the pushed commit and the previous, helping preventing accidental ABI breaks. Helps with https://github.com/yhirose/cpp-htt... — committed to Tachi107/cpp-httplib by Tachi107 2 years ago
- ci: add abidiff workflow This CI workflow checks ABI compatibility between the pushed commit and the latest tagged release, helping preventing accidental ABI breaks. Helps with https://github.com/yh... — committed to Tachi107/cpp-httplib by Tachi107 2 years ago
- ci: add abidiff workflow This CI workflow checks ABI compatibility between the pushed commit and the latest tagged release, helping preventing accidental ABI breaks. Helps with https://github.com/yh... — committed to Tachi107/cpp-httplib by Tachi107 2 years ago
- ci: add abidiff workflow This CI workflow checks ABI compatibility between the pushed commit and the latest tagged release, helping preventing accidental ABI breaks. Helps with https://github.com/yh... — committed to Tachi107/cpp-httplib by Tachi107 2 years ago
- ci: add abidiff workflow This CI workflow checks ABI compatibility between the pushed commit and the latest tagged release, helping preventing accidental ABI breaks. Helps with https://github.com/yh... — committed to Tachi107/cpp-httplib by Tachi107 2 years ago
- ci: add abidiff workflow This CI workflow checks ABI compatibility between the pushed commit and the latest tagged release, helping preventing accidental ABI breaks. Helps with https://github.com/yh... — committed to Tachi107/cpp-httplib by Tachi107 2 years ago
- ci: add abidiff workflow (#2054) This CI workflow checks ABI compatibility between the pushed commit and the latest tagged release, helping preventing accidental ABI breaks. Helps with https://githu... — committed to yhirose/cpp-httplib by Tachi107 2 years ago
Hi all.
One thing we do in a project I maintain is having a CI job which builds the project and runs abidiff on it. This way, if we introduce ABI-breaking changes, we can notice it and fix it promptly.
Making cpp-httplib’s ABI more stable would benefit lots of people which prefer using the compiled variant of the library, and I’d be glad to help some way. It also interests me personally as handling ABI changes in Debian is always a bit of an involved process.
@Tachi107 thanks for the great job at #2054, also thanks all for valuable comments and suggestions! 😄
@yhirose I don’t think it’s really something to solve in Cmake. The compatibility is already set to
SameMinorVersionthere. Otherwise all you could do is set it toExactVersionand set the patch version on the solib too. But that’s just telling the user “any and all version bumps should be considered breaking”.@Tachi107’s recommendation sounds good for a way to automate it. Haven’t used it myself though.