We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4208

Summary: make macOS autofoo builds min/current version match Xcode builds
Product: SDL Reporter: Ozkan Sezer <sezeroz>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: josh+sdl
Version: HG 2.0   
Hardware: All   
OS: Mac OS X (All)   
Attachments: ltmain.sh patch for macOS minversion

Description Ozkan Sezer 2018-07-01 07:52:53 UTC
Created attachment 3264 [details]
ltmain.sh patch for macOS minversion

Xcode project files set min version to 1.0.  The following hack
makes the autofoo builds match that by hand-editing ltmain.sh.
I don't know a better way for this.  OK to push?

(patch also attached, because bugzilla will possibly mangle it.)

diff --git a/build-scripts/ltmain.sh b/build-scripts/ltmain.sh
--- a/build-scripts/ltmain.sh
+++ b/build-scripts/ltmain.sh
@@ -7404,8 +7404,11 @@
 	  # Darwin ld doesn't like 0 for these options...
 	  func_arith $current + 1
 	  minor_current=$func_arith_result
-	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
-	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  #xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  #verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  # make minversion match the Xcode project files, i.e. 1.0
+	  xlcverstring="${wl}-compatibility_version 1.0 ${wl}-current_version ${wl}$minor_current.$revision"
+	  verstring="-compatibility_version 1.0 -current_version $minor_current.$revision"
 	  ;;
 
 	freebsd-aout)
Comment 1 Ozkan Sezer 2018-07-05 20:02:12 UTC
I pushed the change to SDL-1.2 and to default branches.
If there is a better way of doing this, then I'd revert
and so that the better solution would be applied.

https://hg.libsdl.org/SDL/rev/aad2440e3d61
https://hg.libsdl.org/SDL/rev/1a1133e9c7d4
Comment 2 Sam Lantinga 2018-11-13 00:32:31 UTC
This caused bug 4367, and caused problems for Valve as well.
Comment 3 Sam Lantinga 2018-11-13 00:36:28 UTC
This change was backed out in SDL 2.0:
https://hg.libsdl.org/SDL/rev/d274fa9731b1

In SDL 2.1 we can make the compatibility version match the autotools version, by adjusting the Xcode project.
Comment 4 Ozkan Sezer 2018-11-13 05:08:39 UTC
Well, we are back in the versioning mess we had been again :)
Should we revert this from SDL-1.2 too?  What about bug 2915?
Comment 5 Sam Lantinga 2018-11-13 16:00:03 UTC
(In reply to Ozkan Sezer from comment #4)
> Well, we are back in the versioning mess we had been again :)
> Should we revert this from SDL-1.2 too?  What about bug 2915?

I'm less concerned about SDL 1.2 since we don't have a planned release and there are fewer people who are affected either way. You're welcome to backport it for consistency.

We do have inconsistent versions now between build systems, and that's okay. People typically don't switch build systems in their projects, and if they do, they'll be rebuilding everything so library dependencies will match up. We can fix this in SDL 2.1.
Comment 6 Ozkan Sezer 2018-11-14 17:00:34 UTC
(In reply to Sam Lantinga from comment #5)
> I'm less concerned about SDL 1.2 since we don't have a planned release and
> there are fewer people who are affected either way. You're welcome to
> backport it for consistency.

Reverted the change in SDL-1.2 for consistency.
Comment 7 Joshua Root 2018-11-14 17:36:37 UTC
(In reply to Sam Lantinga from comment #3)
> In SDL 2.1 we can make the compatibility version match the autotools
> version, by adjusting the Xcode project.

Increasing the compatibility version now won't cause any problems. In fact it's really not correct to have left it at 1.0.0 this whole time, since new APIs have certainly been added.