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

llvm-17.0.0-rc1: compiler_rt results in link errors on macOS 10.12.6 #64227

Open
debohman opened this issue Jul 30, 2023 · 6 comments
Open

llvm-17.0.0-rc1: compiler_rt results in link errors on macOS 10.12.6 #64227

debohman opened this issue Jul 30, 2023 · 6 comments

Comments

@debohman
Copy link

This was found while building python-3.11.4 using clang-17.

The change which introduced this problem is Declare _availability_version_check as weak_import instead of looking it.

Reverting this change and rebuilding compiler_rt allows python to build and run.

It appears that this change came directly from Apple. It seems that this change needs some more consideration, or the project needs to say that llvm-17 is not supported on macOS / Darwin before versions such-and-such.

@tru
Copy link
Collaborator

tru commented Aug 21, 2023

cc - @ahatanak is this something we need to fix in 17.x?

@h-vetinari
Copy link
Contributor

libcxx 17 already dropped support for MacOS <10.13, following in the footsteps of chrome, firefox, and google's "foundational support policy". It's worth noting that 10.12 is EOL since almost 4 years, which would also explain why Apple doesn't pay much attention to it anymore.

Note that I'm not advocating for any particular action (or inaction), just documenting some context because I've been occupied with this topic recently. This kind of long tail of support is just very prone to bitrot in general.

Since you mention python in the OP, there's also a specific discussion on this topic happening there (for future versions though). CPython itself already documents the requirement of a 10.13 SDK exactly for the weak-linking of symbols, but you should still be able to target 10.12 (unless the bitrot got into this corner as well...).

@ahatanaka
Copy link
Contributor

Can you paste the command line and error message you are seeing? I don’t fully understand the problem and I don’t have access to my computer now, but I’m guessing you need a to build your project with a sufficiently new Xcode if you are using clang 17.

Which Xcode version was used to build RC1?

@debohman
Copy link
Author

This was several weeks ago, I was bootstrapping LLVM / Clang, etc. with Clang 16. The only part of the toolchain that is Apple is the linker and the system headers / libraries. I am not certain about what version of Xcode, probably 9.X. This system only has the command line tools installed, and none of the tools give the marketing version number of Xcode.

I bootstrapped LLVM / Clang / libc++ on this system a few years ago using GCC as a crutch, that was around LLVM 10.

The actual error was a linker error for the missing symbol _availability_version_check. See the link to original diff in the first comment. I just backed out that change to get it to work.

@tru
Copy link
Collaborator

tru commented Aug 29, 2023

Where are we with this issue, reading through the comments it's not obvious that this is a widespread systematic issue, but rather a environment issue for you @debohman ?

@debohman
Copy link
Author

debohman commented Sep 5, 2023

I guess the question is: are we saying that llvm-17 is not supported on macOS 10.12? I understand now that that libcxx is not supported on macOS 10.12, although that is just a minor header file issue, see #64226.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Triage
Development

No branches or pull requests

6 participants