Fix macOS superbuild for Apple Silicon toolchains - #12
Conversation
Three failures prevented the Assimp superbuild step from completing on macOS. All fixes are scoped to the elseif(APPLE) branch; Windows and Linux behaviour is unchanged. - Assimp 5.4.3 predates AppleClang's -Wnontrivial-memcall, which its own -Werror escalates to a hard failure in SceneCombiner.cpp. Disable ASSIMP_WARNINGS_AS_ERRORS. - pkg-config resolved minizip to an x86_64 Homebrew prefix, which cannot link against the arm64 build. Use the bundled contrib/unzip instead. - The staging step chose its source directory with a configure-time EXISTS check against a path Assimp only creates during install, so a clean tree always fell back to lib/ and staged a nested Mac/ folder. CMAKE_INSTALL_LIBDIR is already forced to lib/Mac, so the check was redundant. Verified by a full superbuild plus a successful ProjectMobiusEditor Mac Development build against UE 5.5.4.
There was a problem hiding this comment.
Pull request overview
This PR updates the macOS (Apple Silicon) superbuild configuration to ensure cmake --build _superbuild completes successfully with newer Apple toolchains, by adjusting how Assimp is configured and staged in the existing elseif(APPLE) branches.
Changes:
- Disable Assimp’s
ASSIMP_WARNINGS_AS_ERRORSon macOS to avoid new AppleClang warnings becoming hard failures. - Force Assimp to build its bundled unzip/minizip path (
ASSIMP_BUILD_MINIZIP=ON) to avoid linking against an x86_64 Homebrew minizip. - Remove the configure-time
EXISTScheck for Assimp’s lib layout and stage from the knownlib/Macinstall directory to prevent nestedMac/Macstaging.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Additional verification on a pristine clone (the case the staging bug actually hits): Staging is flat. On a fresh checkout there is no pre-existing |
Three failures prevented
cmake --build _superbuildfrom completing on macOS (Apple Silicon, Xcode 26 / AppleClang 21). All changes are inside the existingelseif(APPLE)branches ofUnrealFolder/ProjectMobius/CMakeLists.txt— Windows and Linux paths are untouched.1. Assimp
-Werrorvs a newer compilerAssimp 5.4.3 predates AppleClang's
-Wnontrivial-memcall, and its ownASSIMP_WARNINGS_AS_ERRORS(defaultON) turns the new diagnostic into a build failure. Vendored third-party source is left untouched; the option is disabled from the superbuild instead.2. minizip architecture mismatch
Assimp runs
use_pkgconfig(UNZIP minizip), which on a machine with an Intel Homebrew prefix at/usr/localresolves to an x86_64 library — unlinkable against the arm64 build this branch pins.ASSIMP_BUILD_MINIZIP=ONskips the lookup and compiles the bundledcontrib/unzip.3. Staging produced a nested directory
if(EXISTS "${ASSIMP_INST}/lib/Mac")is evaluated at configure time, before Assimp has been built or installed. On a clean tree the directory does not exist yet, so it fell back tolib/andcopy_directorystagedPlugins/UE4_Assimp/Binaries/Mac/Mac/— one level too deep. The same branch already forcesCMAKE_INSTALL_LIBDIR=lib/Mac, so the layout is known and the check was removable.This one is latent rather than fatal:
UE_AssimpLibrary.Build.csreads fromassimp/lib/Mac, notBinaries/Mac, so the editor build succeeds either way. It would surface at packaging time.Verification
arm64(lipo -archs), staged flat intoPlugins/UE4_Assimp/Binaries/Mac/.ProjectMobiusEditor Mac Developmentbuilds against UE 5.5.4 — 191/191 actions, exit 0 — and links the resulting Assimp dylib.Not tested on Windows or Linux; those code paths are unmodified.
Note for macOS builders
Two further things are needed on a current macOS, deliberately not included here since they are environment rather than repo concerns:
16.9.0inEngine/Config/Apple/Apple_SDK.json. With Xcode 26 installed, UBT reportsPlatform Mac is not a valid platform to build.xcodebuild -downloadComponent MetalToolchain.