Closed pkgw closed 3 years ago
https://github.com/rust-lang/rust/pull/78026#issuecomment-712227232
What if an OS doesn't have support for this?
Good question.
linkat
is in POSIX.1-2008 and pretty widely supported, but it appears at least VxWorks and Redox don't support it, so I've now added a patch special-casing those two platforms.
Is there a way to tell if we're compiling on MacOS 10.9 or lower and special case it if so?
Is there a way to tell if we're compiling on MacOS 10.9 or lower and special case it if so?
I think the weak
macro is normally used for runtime detection of a symbol.
@jyn514 In the interest of generating portable binaries, one could make the argument for not using the API even if one is compiling on a newer macOS. For precompiled stdlib in particular, I'd guess that somewhere there's a specification for the minimum supported OS version?
We can't really compile on old macos feasibly in CI, but it should be fairly straightforward to use linkat via the weak macro (which performs runtime detection of availability). I think we'll likely want to land using weak on nightly for testing, and then follow up with a beta backport. We can consider a stable backport as well, since this seems like a major problem for (all?) users targeting older macs.
Assigning P-high
as discussed as part of the Prioritization Working Group procedure and removing I-prioritize
.
@sunfishcode would you be up for filing a PR to fix this?
Still broken in 1.51. Does this mean that support for older systems has been discontinued after all? According to this commit a OS X <10.10 detection should also be added, but target_os
cannot detect the kernel version.
I have a draft for this. I'm getting some comments on Zulip before I open a PR.
@rustbot claim
We're merging https://github.com/rust-lang/rust/pull/85953 to fix this issue for the time being.
We also plan to start the conversation about when to drop support for older versions of macOS. But for now, this should restore support for older macOS.
Thanks! Should we expect this fix to appear in 1.54, or will it take longer than that to make it to stable?
It will definitely be in 1.55. It will only be in 1.54 if the libs team decides to backport it to beta. I personally think that might be a good idea, but I'm not on the team, I just happened to be the one who who wrote the fix PR.
@pkgw Quick update: unfortunately, this won't hit stable till 1.55.
@inquisitivecrystal Thanks, that's good to know!
After the release at 1.49, we at conda-forge are seeing some new build failures on macOS builds due to a missing
_linkat
symbol:linkat
is only availabe starting in macOS 10.10, while on conda-forge our targeted minimum version is 10.9. It looks like this may have been introduced unintentionally in #78026.I'm filing this as a regression because I don't see any documentation of a bump in the minimum macOS version for 1.49.
CC @isuruf @bollwyvl conda-forge/rust-feedstock#73.