-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
MacOSX.sdk: add SDK subports for 10.3-10.5 & 13-14 #23312
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
base: master
Are you sure you want to change the base?
MacOSX.sdk: add SDK subports for 10.3-10.5 & 13-14 #23312
Conversation
Notifying maintainers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I first saw the email notification of this PR I thought you were adding the missing current SDKs.
@@ -4,7 +4,7 @@ PortSystem 1.0 | |||
|
|||
name MacOSX.sdk | |||
categories devel | |||
platforms macosx | |||
platforms {macosx any} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea.
It will trigger rebuilds of every subport so I will need to load the distfiles that can't be downloaded automatically onto one of the build machines manually before merging this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it looks like this port has bitrotted. For newer SDKs it downloaded them direct from Apple's CDN but now Apple is delivering a 403 response, e.g.:
% curl -I https://swcdn.apple.com/content/downloads/28/19/071-82714-A_HUFJRGID6Y/nnmlg28zs93jdbrsqtk6krr4mmaize40hb/CLTools_macOSLMOS_SDK.pkg
HTTP/1.1 403 Forbidden
…
so we either need a new URL from which to download the packages that used to be available via Apple's CDN or we need to revert to the old strategy of manually downloading the CLT dmgs from the Apple Developer web site and adjust the port's programming accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does one determine the proper URL from swcdn.apple.com?
There are various posts with URLs from swcdn.apple.com, but none of them seem to mention how to find them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I probably had just found one of those posts at the time. I don't remember.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would seem that someone has taken the time to search for this information.
I have updated the pull request to remove nonexistent files.
However, I believe the fix (e48c336) constitutes a stealth update, but fixing it would disrupt the existing distfile naming convention.
I also added SDKs for macOS 13-14 (fe83f2f), but I do not know how to find the release dates of the distfiles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the fix (e48c336) constitutes a stealth update, but fixing it would disrupt the existing distfile naming convention.
And the SDK version is still exactly the same? Can you compare the old and new distfiles to see what the difference is? If you don't have the old distfiles, I can check if I saved them, which I was in the habit of doing for this port.
This will fix https://trac.macports.org/ticket/69952 by the way.
I also added SDKs for macOS 13-14 (fe83f2f), but I do not know how to find the release dates of the distfiles.
You could check if there is an HTTP Last-Modified header. If not, you could check the Internet; if not Apple, then surely somebody has posted something to announce these releases. You could also look at the modification date of the dmg or the files in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the SDK version is still exactly the same? Can you compare the old and new distfiles to see what the difference is? If you don't have the old distfiles, I can check if I saved them, which I was in the habit of doing for this port.
As far as I can tell, they have the same SDK version.
Unfortunately, I do not have access to the old distfiles, so I do not know what the differences are.
This will fix https://trac.macports.org/ticket/69952 by the way.
Thank you for pointing this out.
I have updated the commit message.
You could check if there is an HTTP Last-Modified header. If not, you could check the Internet; if not Apple, then surely somebody has posted something to announce these releases. You could also look at the modification date of the dmg or the files in it.
I have updated the dates using the HTTP Last-Modified header.
# variant_set universal | ||
#} | ||
# | ||
supported_archs noarch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is certainly inaccurate but this port is a very special case so maybe this is an acceptable simplification.
Do you know if this would do anything to fix https://trac.macports.org/ticket/66918? Does rev-upgrade skip scanning ports marked noarch
? If so, that would be an argument in favor of this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is certainly inaccurate but this port is a very special case so maybe this is an acceptable simplification.
I would be happy to revert the change.
Setting configure.cxx_stdlib
to empty is similarly inaccurate.
Should configure.cxx_stdlib
also be set to either libc++ or libstdc++ depending on the SDK version?
Do you know if this would do anything to fix https://trac.macports.org/ticket/66918? Does rev-upgrade skip scanning ports marked
noarch
? If so, that would be an argument in favor of this change.
I am afraid the rev-upgrade issue persists even with the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be happy to revert the change.
I'm not saying yet that we should revert it. It certainly would reduce the number of systems on which the port needs to build, and the archives that get produced would indeed be the same.
Setting
configure.cxx_stdlib
to empty is similarly inaccurate.
That is true… the comment in the port explains that this was done to eliminate an unnecessary clang dependency. If there is a better solution to that, that's fine.
Should
configure.cxx_stdlib
also be set to either libc++ or libstdc++ depending on the SDK version?
I'm not sure if that would have the same effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does rev-upgrade skip scanning ports marked
noarch
?
No, and that's probably because it also scans for missing files. This issue will require a change in "base", I'm afraid. But maybe that can be as simple as making noarch
skip the registration of binary files. IIRC this is basically what I did to have a semi-functional rev-upgrade
feature in my LinuxPorts adaptation (I made isBinary()
a stub returning false unconditionally so).
This would make some sort of sense ... treating all files installed by a port claiming that it has only "noarch" files as if they were not "binary" even if some of them would actually fit that description. I think it can be argued that no port setting this expects or should expect to have its files checked for shared library dependencies.
The safer alternative would be a new rev_upgrade_skip_archceck
option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue will require a change in "base", I'm afraid.
Or an unorthodox approach: create a nicely compressed DMG of the SDK directory and install that, plus a script that handles the mounting so the user doesn't have to remember where the DMG is installed. Ports that get their content off a DMG know how to mount them on custom mountpoint not under /Volumes
so that script could make the DMG content appear under the same path as where it's found now.
I think there are additional advantages to this; these SDKs install a really large number of (small) files which make them potentially SSD-unfriendly and costly for both the registry and the rev-upgrade scan. Is there any indication that people who install these ports actually use them more than occasionally? I suppose a startupitem could be provided for those who do, so the DMG gets mounted when they log in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing the rev-upgrade issue would definitely be nice.
However, as you point out, it must either be fixed in the base or in the Portfile with an "unorthodox approach."
The ideas are interesting, but I think they are a bit outside the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a nicely compressed DMG of the SDK directory and install that
Yuck!
I suppose a startupitem could be provided for those who do, so the DMG gets mounted when they log in?
Eww!
fbceab4
to
fe83f2f
Compare
Of course, there is no rush on this pull request. |
Sorry, I haven't really looked at this again since my April comments. |
The files installed by the MacOSX.sdk subports should be exactly the same regardless of the system, so add `any` to `platforms`. There might be use in installing an older SDK on a newer system, so do not limit `supported_archs`.
fe83f2f
to
93d0ac4
Compare
93d0ac4
to
9c80a61
Compare
Thank you for taking the time to review the changes. |
On Monday May 13 2024 22:40:51 MarcusCalhoun-Lopez wrote:
However, as you point out, it must either be fixed in the base or in the Portfile with an "unorthodox approach."
The ideas are interesting, but I think they are a bit outside the scope of this PR.
Unorthodox but AFAICT not in violation of anything. In the end it isn't that different from ports that install files in the post-activation phase, or (perhaps a better analogy) ports that contain software that installs its own runtime files when used. Add a startup item and the user will notice very little of the change
This PR already fixes the fetch issue in addition to adding subports so adding another fix doesn't really change its nature. But I'm not planning to get involved any further :)
OTOH, pushing the fix for the fetch issue ASAP would be courteous ...
This port is extremely useful, but I suspect to only to a very small
population.
My own interest was limited to being able to generate a fat binary with Apple ARM components, which I could do without even installing the port (= by pointing `isysroot` into the port's destroot.)
Having an idea how and what for people the port would be probably be helpful in deciding how to approach the rev-upgrade issue. It seems obvious that this port can't be used as any kind of dependency of another port. So if everyone already deactivates it when not in use then there really wouldn't be much hurry to fix the rev-upgrade issue if it weren't for the fact that frequent de- and re-activation of a port with this many (small) files really isn't very kind on SSDs (from what I've understood).
|
I don't know why you say that. I created this port for ports that need older or newer SDKs. Ideally, the newer/older SDKs would only need to be installed on the buildbot workers and then the binary that gets produced would work without it. I didn't particularly intend users to use the older/newer SDKs directly, though there's no reason they can't do that if they want. Regarding the rev-upgrade issue, I simply didn't notice when I created the ports since I had rev-upgrade turned off in my MacPorts installation. |
Yuck!
Eww!
I do know why you say that.
I don't know why you say that.
I should probably have said "any kind of runtime dependency".
What I fail to see is why any port would need an older SDK, much less a newer one than the host one (except outliers like the half-baked 10.10 SDK on 10.9). I don't think I've never encounter APIs that have been deprecated away from the system headers but not from the system frameworks (which would be a case where you'd need the old SDK). And building against a newer SDK isn't going to provide the implementations for all those new functions it declares...
That the buildbots could use older SDKs to build for older OS versions is a different matter: I don't suppose they will ever run rev-upgrade (if they work in any way like the Ubuntu/Launchpad build bots).
|
Any chance this can get merged? |
homepage https://developer.apple.com/documentation/macos-release-notes/macos-14-release-notes | ||
} | ||
|
||
subport MacOSX13.sdk { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d ideally want this for game-porting-toolkit
to avoid even more patches.
is there a path forward here? If so, let's make some progress, otherwise let's close the PR |
What is this even blocking on? Just the fact that the CI/testfarm/whatever can't find a logfile when it wants to? |
I think I have addressed all the specific concerns expressed. |
@MarcusCalhoun-Lopez then just merge it yourself. I can't follow all the discussion here and @ryandesign hasn't been back to leave a response so this will remain in limbo. If you think it's all done then merge it. Of someone wants to make changes that can be done later. |
Can we finally get this merged? |
Seconded! |
I just tried to use the (patched) version to fetch the 10.7 SDK, and apparently I am not entitled to get the required Xcode installer with the developer account I've been using since forever. Why's that? Do you need to be a paying developer for that, nowadays? EDIT: to the rescue O:^) |
You can download Xcode 2.3 & Xcode Tools v1.0 from https://developer.apple.com/download/all/ without even having a paid developers account. |
On Friday May 30 2025 09:46:33 Dean M Greer wrote:
You can download Xcode 2.3 & Xcode Tools v1.0 from https://developer.apple.com/download/all/ without even having a paid developers account.
And they contain the 10.7 SDK?
|
Description
Type(s)
Tested on
macOS x.y
Xcode x.y / Command Line Tools x.y.z
Verification
Have you
port lint --nitpick
?sudo port test
?sudo port -vst install
?