-
Notifications
You must be signed in to change notification settings - Fork 233
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
portconfigure: Prioritize returning SDK with DEVELOPER_DIR set #135
Conversation
It definitely does cause problems, as indicated in the comment you deleted. Anything that detects functionality at build time will see things available in the SDK that are not available in the OS. This would be fine if everything used potentially weak-linked symbols correctly, but that's actually very rare in the world of software that isn't Mac-only. |
I don't fully understand weak-links yet but I've just read up about them. It means that we should still ideally return the target's OS version (which is the current OS) over the newest-available right? I figure the solution would be to try |
ba4da46
to
3ddc049
Compare
Looking in the CLT location first is fine, but xcrun should remain the last resort because it can be quite slow. And yes the target OS version's SDK should be tried first and generic MacOSX after. The lack of weak linking awareness isn't just theoretical by the way, there have been a number of tickets where users ran into problems because they had Xcode installed (with a later OS version's SDK) but not the CLT. This is one example: https://trac.macports.org/ticket/54893 |
4b0160a
to
74aec32
Compare
Alright thanks for the feedback, I've made some changes to favor checking with |
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.
LG2M now, let's wait for CI.
Relevant: https://trac.macports.org/ticket/57143
xcrun --sdk macosx
, which was previously reenabled as the final fallback by @jmroot, is moved to the top of the::configure_get_sdkroot
proc so the newest-available macOS SDK is returned first instead of the current OS version's SDKs. It was generally agreed on trac that the newest-available SDK should be used, so I assume this change is better and causes no problems.The DEVELOPER_DIR change is done so a CommandLineTools SDK is returned if the port isn't Xcode-dependent. This fixes gmp failing to install in tracemode with the latest changes to master.