-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
NativeAOT result binary on macOS targets latest SDK #98124
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsDescriptionI think that result library should have at least a maximum OS sdk version between used libraries. I use .net 8.0.101. Reproduction StepsCreate console app. Expected behaviorminos should be 11.0 Load command 13 Actual behaviorLoad command 13 Regression?No response Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
It seems that the logic in the build files only covers iOS-like platforms. We should probably fix that. As a workaround you can add an argument to the linker in the .csproj file:
|
Trying to determine whether this warrants a backport. What is this version used for? Does macOS block binaries with minos version 14.0 from being launched on older macOS versions? |
Yes, older macOS versions would block running the binaries. I am leaning towards doing a backport. Xamarin workloads already do this and so this is unexpected inconsistency between I can open a PR when I get home and we can either proceed with it or close it. |
I made the backport - https://github.com/dotnet/runtime/compare/release/8.0-staging...filipnavara:runtime:min-version-80?expand=1 - and started filling the template, only to realize that macOS (14.3.1) actually ignores the value for console applications, and so does the linker when referencing a dynamic library. With that in mind I no longer think the backport is necessary. In case the opinion changes in the future, here's part of the prefilled template:
|
@filipnavara Thank you for looking into it! |
Description
I think that result library should have at least a maximum OS sdk version between used libraries.
I've checked all libraries before linker - maximum sdk version is 11.0. But somehow after compile it's 14.0 in a result binary.
Maybe there is an linker arg or any csproj parameter to select minimum os sdk version I did not found?
I use .net 8.0.101.
Reproduction Steps
Create console app.
Add PublishAot=True
dotnet publish -c Release -r osx-x64
otool -l ConsoleApp1
Expected behavior
minos should be 11.0
Load command 13
cmd LC_BUILD_VERSION
cmdsize 32
platform 1
minos 11.0
sdk 14.2
ntools 1
tool 3
version 1022.1
Actual behavior
Load command 13
cmd LC_BUILD_VERSION
cmdsize 32
platform 1
minos 14.0
sdk 14.2
ntools 1
tool 3
version 1022.1
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: