Skip to content

clang: warning: no such sysroot directory #262

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

Closed
Legrandin opened this issue Feb 2, 2020 · 8 comments
Closed

clang: warning: no such sysroot directory #262

Legrandin opened this issue Feb 2, 2020 · 8 comments

Comments

@Legrandin
Copy link

I tried the new version on master (x86_64 only) on Travis (default osx image) with a library that uses and compiles its own C extensions.

I am seeing this clang error during compilation when it gets to Python 3.5 (Python 2.7 seems fine):

Compiling with an SDK that doesn't seem to exist: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk

Please check your Xcode installation

clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]

The only way workaround is to add the following to .travis.yml:

env: CFLAGS="-isysroot $(xcrun --show-sdk-path)"

CFLAGS then expands into:

CFLAGS=-isysroot /Applications/Xcode-9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

Is there a better fix?

@Legrandin
Copy link
Author

Actually, this happens also for version 1.1.0 on a build that used to work perfectly some months ago, which seems to indicate a regression inside some of the images of Travis.io...

@joerick
Copy link
Contributor

joerick commented Feb 2, 2020

Hmm, I'd like to investigate a little. Could you post your travis configs for both scenarios and the corresponding failing builds?

@YannickJadoul
Copy link
Member

@Czaki Did you perhaps encounter something similar, while developing #156?

@Czaki
Copy link
Contributor

Czaki commented Feb 2, 2020

@Czaki Did you perhaps encounter something similar, while developing #156?

No but it look like to many files in repository (also some configuration which are produced on developer machine)

From travis documentation:

Travis CI uses macOS 10.13 and Xcode 9.4.1 by default

My suggested solution is to clean repository and complete .gitignore file. Other solution is to change system version ex. osx_image: xcode11.2

Links:
https://docs.travis-ci.com/user/reference/osx/
http://gitignore.io/

@joerick
Copy link
Contributor

joerick commented Feb 10, 2020

Any more info on this @Legrandin ?

@Legrandin
Copy link
Author

This is the log of an OSX build that fails on Travis with cibuildwheel==1.1.0 and default image xcode9.4 (note that some tests are meant to fail, such as the one checking presence of gcc):

https://travis-ci.org/Legrandin/pycryptodome/jobs/648626392

Note the message:

clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]

However, if you set CFLAGS to " -isysroot $(xcrun --show-sdk-path)" in .travis.yml, the build passes:

https://travis-ci.org/Legrandin/pycryptodome/jobs/645049211

The following warning doesn't go away, but at least compilation works:

Compiling with an SDK that doesn't seem to exist: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Please check your Xcode installation

@Czaki
Copy link
Contributor

Czaki commented Feb 10, 2020

I review this log and does no see call of cibuildwheel in this failed log. For me Your problem is not connected with cibuildwheel but with yours custom build system.
All fails are in call python -tt setup.py build command.

I suggest to add verbose=1 to flag in your compiler checker:
https://github.com/Legrandin/pycryptodome/blob/master/compiler_opt.py#L68

Or maybe you can remove cibuildwheel instal and show that build pass?

Did You check If CFLAGS is empty before overwirte it:
https://github.com/Legrandin/pycryptodome/blob/master/travis/travis_script.sh#L4

Maybe here path to compilers headers is set?

@Legrandin
Copy link
Author

Yep, I think I mixed up some logs: the problem here is with the current Travis OSX images, not with cibuildwheel. Sorry for the confusion.

I did have an earlier error within cibuildwheel related to some 32-bit builds, but I see you are now switch to 64-bit builds only, which is actually awesome, so there is no much point in investigating that further.

Thanks for the great work!

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