Summary: | Support blueprint building on M1 darwin arm64 | ||
---|---|---|---|
Product: | [Unmaintained] Craft | Reporter: | Ruixuan Tu <turx2003> |
Component: | Blueprints | Assignee: | Hannah von Reth <vonreth> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | julius.kuenzel, kde-windows, mutlaqja, turx2003 |
Priority: | NOR | ||
Version: | stable | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | macOS | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ruixuan Tu
2022-01-14 07:55:15 UTC
One way I found to solve it is to add the following to each CMakeLists.txt if(APPLE) option(OSX_FRAMEWORK "Build a Mac OS X Framework" ON) set(CMAKE_OSX_ARCHITECTURES “x86_64;arm64" CACHE STRING "Build architectures for Mac OS X" FORCE) else() set(OSX_FRAMEWORK OFF) endif() or pass -DCMAKE_OSX_ARCHITECTURES=x86_64;arm64 to cmake The current build system builds for x86_64 anytime, and the above command is to enable the universal binary build. If we only want to build for one arch at a time, we can change it to “arm64” in case of a build for M1. I am happy to help solve this problem if you can give me some hints, considering we may not have many developers with an M1 Mac available. We have tens of CMakeLists.txt so this solution isn't viable. is there a way to set this in CraftSettings.ini ? We also tried to build KStars on M1 Macs and failed due to this exact issue as well. For now: arch -arch x86_64 zsh -li . craftenv.sh Now craft will build everything in x86_64 mode. And Qt5 has no support for arm builds for that reason we won't try to implement it. Some where this year I'll play with qt6 and m1 builds. Craft can build software for macOS ARM now. |