Xcode: Duplicate arm64 symbols with IOS_INSTALL_COMBINED and xcode 12
After updating to xcode 12 one of my builds stopped working. It is configured by
cmake -S. -B_builds -GXcode -DCMAKE_SYSTEM_NAME=iOS \
"-DCMAKE_OSX_ARCHITECTURES=armv7;armv7s;arm64;i386;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10 \
-DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO \
-DCMAKE_XCODE_ATTRIBUTE_STRIP_INSTALLED_PRODUCT=YES \
-DCMAKE_IOS_INSTALL_COMBINED=YES \
-DCMAKE_CXX_FLAGS=-fno-aligned-allocation
And gives the following build error:
fatal error: lipo: <redacted>/_builds/implementation/Release-iphonesimulator/pipeline.framework/pipeline and <redacted>/_builds/install/<redacted>/pipeline.framework/pipeline have the same architectures (arm64) and can't be in the same fat output file
CMake Error at /usr/local/Cellar/cmake/3.18.3/share/cmake/Modules/CMakeIOSInstallCombined.cmake:306 (message):
Command failed:
lipo;-create;<redacted>/_builds/implementation/Release-iphonesimulator/pipeline.framework/pipeline;<redacted>/_builds/install/<redacted>/pipeline.framework/pipeline;-output;<redacted>/_builds/install/<redacted>/pipeline.framework/pipeline
I assume the new xcode also has an arm64 simulator and puts the symbols for this architecture into both the simulator and phone frameworks, thus getting the duplication.
Edited by Brad King