| Summary: | compatibility version decreased between 2.0.8 and 2.0.9 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Joshua Root <josh+sdl> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | contact, sezeroz |
| Version: | 2.0.9 | ||
| Hardware: | All | ||
| OS: | Mac OS X (All) | ||
|
Description
Joshua Root
2018-11-08 06:05:04 UTC
Three different build systems had three different versioning (and cmake was the worst of them.) Official libsdl.org-distributed osx binaries are Xcode-generated, we took that as the base, adjusted the rest after it: otherwise, binaries linked against autofoo and libtool would fail running agaisnt Xcode-generated SDL frameworks. This is the reason for that commit, bug 4208 and bug 2915. Sam & Ryan should decide if/how to change the versioning. Bug 2915 was definitely a real problem, but the version used by cmake should also have been increased to match autotools. The versions cannot decrease, or the runtime compatibility checking simply doesn't work right. The only correct solution is to increase all the versions to something >= the largest version that had been used anywhere. So you are saying that the Xcode project file had it wrong from the start, which I don't agree. SDL2-2.0.0.dmg from libsdl.org has compatibility version 1.0.0 / current version 1.0.0, and if I link against it I can run with any newer SDL2 version that is generated by Xcode, and as of the changes referenced here then any SDL2 version: increasing the compatibility version without removing apis or breaking api/abi compatibility seems wrong to me. But Sam & Ryan should decide. You have the wrong idea about what the compatibility version means. You increase it when you add public symbols, not when you break compatibility by removing them or changing their semantics. If you do that, you need to change the major version, which is part of the install_name. I'm not saying the Xcode project had it wrong as such, just that given the existence of multiple version numbers in the wild, you need to go with the largest of them. Note also that anything that was linked with an autotools-built 2.0.8 or earlier now has the exact same issue as in bug 2915 when run with 2.0.9. Example: dyld: Library not loaded: /opt/local/lib/libSDL2-2.0.0.dylib Referenced from: /opt/local/bin/ffmpeg Reason: Incompatible library version: ffmpeg requires version 9.0.0 or later, but libSDL2-2.0.0.dylib provides version 1.0.0 Abort trap: 6 That change was backed out, thanks! https://hg.libsdl.org/SDL/rev/d274fa9731b1 |