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

Weak linkage on OSX not working anymore? #10235

Closed
h-vetinari opened this issue Jan 23, 2024 · 3 comments
Closed

Weak linkage on OSX not working anymore? #10235

h-vetinari opened this issue Jan 23, 2024 · 3 comments
Labels
waiting-on-reporter Issue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.

Comments

@h-vetinari
Copy link

While building cryptography 42.0 in conda-forge, the macos jobs are failing with:

            Undefined symbols for architecture x86_64:
              "_getentropy", referenced from:
                  std::sys::unix::rand::hashmap_random_keys::h694f1d109e8c2473 in libstd-f4038c6a2122598b.rlib(std-f4038c6a2122598b.std.69f244de2863e905-cgu.0.rcgu.o)
            ld: symbol(s) not found for architecture x86_64
            clang-16: error: linker command failed with exit code 1 (use -v to see invocation)

This is easily fixed by upgrading the MacOS deployment target; I would be the first to celebrate ecstatically once we finally shoot MacOS<10.13 to the moon, but for now, the default in conda-forge is still 10.9. However, we actually already announced that we're moving to 10.13 last August, so the only reason that this hasn't happened yet at scale is some painfully deep infrastructure work. Still, it'd be perfectly legitimate to just raise our target version in response to this.

The reason I'm opening this issue at all, is that, while searching to find out which MacOS version introduced support for _getentropy (10.12, AFAICT), I stumbled across this comment by @alex on a related issue:

Our next release uses weak linkage to ensure that no matter what macOS version a wheel is built on, it will work fine on any supported macOS. This can be closed.

Even though that comment is going on 7 years old, I thought I'd at least ask if that is something that should still be working according to you. Personally, I wouldn't want you to waste any time on supporting ancient MacOS versions, so I really don't mind if the answer is no.

@alex
Copy link
Member

alex commented Jan 23, 2024

Hmm, so this is coming from rust's internals (specifically their hashmap randomization).

Looks like the current version of rustc requires 10.12+: https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/unix/rand.rs#L182-L187

You'll need to use a rustc older than 1.74 if you want to support older macOS: rust-lang/rust#104385

FWIW 10.12 is the oldest macOS we support with our official wheels.

@alex alex added the waiting-on-reporter Issue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply. label Jan 23, 2024
@h-vetinari
Copy link
Author

Yeah, that's good enough for me. The world has moved on, and countless key projects require 10.13+ (e.g. libcxx, chrome, etc.).

@h-vetinari
Copy link
Author

Thanks for the quick response!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
waiting-on-reporter Issue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.
Development

No branches or pull requests

2 participants