-
Notifications
You must be signed in to change notification settings - Fork 617
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
Building universal 2 on macOS is broken #853
Comments
Thanks for the report. To start, can I request that if you are on a release version of CMake, could you retest using CMake 3.19, which is now available as a release candidate? https://cmake.org/download/ 3.19 has fixes for Xcode 12, including moving CMake from the Xcode 3 (!!!??!!!!!) build system to Xcode's current build system. They did this specifically to address building universal binaries. I don't expect this will fix the issues you've encountered, but I think we should start from a version of CMake that's intended to address Apple Silicon, and work with Xcode 12. |
I have done some further testing with cmake release and 3.19 and have a PR here. Also I reproduced this with the normal Makefile generator, the Xcode build system changes only matter with |
Hmmm Universal 2 builds seem to be broken again on master... Maybe something to do with the library split? If I checkout master at this commit, I can totally cmake Ilmbase with universal 2, and then cmake OpenEXR with universal 2, pointing to the built Ilmbase by exporting IlmBase_DIR. |
Can you post the cmake command you are using to generate? |
Sure thing (using cmake version 3.19.1): |
CMake has a handy way to build Universal (fat) binaries with x86_64 and arm64 chunks. A recent change seems to break it (#772). This is with Xcode 12.2 beta 2.
I have found that trying to detect compiler support for CPU specific functions is really annoying when building universal binaries with cmake as what you want to ask is not
does my compiler support AVX?
as this will try to build AVX instructions for both x86_64 (fine) and then arm64 (fail), which then fails. What you needs isdoes my compiler support AVX in x86_64 mode?
, then to use platform#define
s to switch in the actual code.If I revert the PR linked above I can build univerally, but the AVX ASM is disabled, which is also not desirable.
The text was updated successfully, but these errors were encountered: