Skip to content
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

Improving support for OS version constraints #37

Open
staticfloat opened this issue Jan 12, 2022 · 0 comments
Open

Improving support for OS version constraints #37

staticfloat opened this issue Jan 12, 2022 · 0 comments

Comments

@staticfloat
Copy link
Member

Eventually, we'll have the ability to target specific glibc/macOS SDK/etc... versions, and we'll need to be able to surface incompatibilities to users. Since Pkg doesn't allow us to declare compat constraints on OS version, we must instead do something at __init__() time.

Some of the information is already encoded into the HostTriplet, for example:

julia> using Base.BinaryPlatforms; HostPlatform()
Linux x86_64 {cxxstring_abi=cxx11, julia_version=1.7.1, libc=glibc, libgfortran_version=5.0.0, libstdcxx_version=3.4.29}
julia> using Base.BinaryPlatforms; HostPlatform()
macOS x86_64 {cxxstring_abi=cxx11, julia_version=1.7.1, libgfortran_version=5.0.0}

Notice that this information is, as of now, incomplete; the macOS triplet lacks the os_version() information that we'd need to determine SDK compatibility, the Linux triplet lacks the precise glibc version, etc... But it's a start! With complete information in the Platform object, we can fully support artifact selection, but we would still need to surface good errors to the user in the event that no artifact can be selected, as in the case where something requires macOS 12+, but the user is running 10.15.

It would be good to teach BB to pay attention to these standard limiting factors, and see if (for instance) the minimum-supported glibc version for a particular architecture is greater than Julia's minimum-supported version, then emit checks in __init__() that ensure that the HostPlatform() is compatible with those bounds. So e.g. if an x86_64 build of LibFoo_jll requires glibc 2.12.2 or greater, we can elide the check, but if it requires 2.17+, we would generate the check. That is, of course, only if the check takes a significant amount of time; if it's essentially free, then I think we can get away with just always emitting the relevant checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant