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

macOS build error on 4.0.0 : undeclared identifier 'CLOCK_MONOTONIC' #185

Open
jakirkham opened this issue Nov 16, 2022 · 10 comments
Open

Comments

@jakirkham
Copy link

On macOS builds am seeing the following error:

line_profiler/timers.c:64:23: error: use of undeclared identifier 'CLOCK_MONOTONIC'

This traces back to this line:

clock_gettime(CLOCK_MONOTONIC, &ts);

More details in this CI log. Have also attached the log for posterity

@jakirkham
Copy link
Author

Think we may need something like this

@Theelx
Copy link
Collaborator

Theelx commented Nov 16, 2022

Ah you're right, we forgot to test Mac when adding the nanosecond resolution timers. I appreciate the link to the conda-forge fix, I'll try to implement that in a PR today.

@Erotemic
Copy link
Member

@Theelx the CI does test on OSX. Not sure why ours work, but the conda ones fail.

@Theelx
Copy link
Collaborator

Theelx commented Nov 16, 2022

Do we know what versions of OSX are being used for our pipeline vs conda's?

@jakirkham
Copy link
Author

Conda-forge is building with an older macOS SDK (10.9) to support a wider range of users. Sounds like wheels are doing the same thing. Admittedly that is getting to be a pretty old macOS version.

Looking at the patch linked above, it appears this feature isn't included until 10.12, which is more recent.

@henryiii
Copy link

You can request a newer macOS for a conda-recipe, we have to do that for root-feedstock and I think some others. 10.9 is really old at this point, is conda-forge ever going to update that?

@jakirkham
Copy link
Author

Feel free to share feedback in issue ( conda-forge/conda-forge.github.io#1844 )

In any event for the scope of this issue, agree we can bump the minimum OS requirement in conda-forge, which I'm now doing in the feedstock

Not sure how that is handled for wheels given they would have the same issue. Perhaps folks here have thoughts on that 🙂

@henryiii
Copy link

I'd personally recommend just bumping to 10.12 for wheels too. 10.12 is plenty old at this point. That's the first version that starts having some C++17 support (10.14 for full C++17 support). CMake's wheels bumped from 10.9 to to 10.10 and no one has complained yet. :)

@jakirkham
Copy link
Author

Is this a configuration developers here would need to set? If so, how should that be done?

Also would it makes to raise upstream with cibuildwheel (looking at this text in particular)?

@henryiii
Copy link

henryiii commented Nov 22, 2022

Yes, you set MACOSX_DEPLOYMENT_TARGET to 10.12 (for example, in tool.cibuildwheel.environment). We will support 10.9+ in cibuildwheel until CPython raises the minimum they compile with. But it's fine to increase that for a package.

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

4 participants