More findings:
I’m able to build Csound for iOS on my old Intel MacBook Pro with XCode 12.4, but the building doesn’t complete nicely on my M1 MacBook Pro with XCode 14.1 (it doesn’t create libcsound.a), with these logs:
Fatal Error Build iOS XCode 14.1.txt (1.8 MB)
An excerpt:
** BUILD SUCCEEDED **
+ lipo -create libcsound-device.a Release/libCsoundLib.a -output ../libcsound.a
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: libcsound-device.a (No such file or directory)
I tried removing i386 / arm7 archs from the devices, but the build still fails.
There are two xconfig files under the iOS folder:
This is now simulator.xconfig:
ONLY_ACTIVE_ARCH=YES
ARCHS = x86_64
VALID_ARCHS = x86_64
IPHONEOS_DEPLOYMENT_TARGET = 11.0
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
//DEBUGGING_SYMBOLS=NO
STRIP_INSTALLED_PRODUCT=YES
//DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
DEPLOYMENT_POSTPROCESSING=YES
USER_HEADER_SEARCH_PATHS=$(inherited) /usr/local/include
GCC_PREPROCESSOR_DEFINITIONS=$(inherited) IOS=1
And this is device.xconfig:
ONLY_ACTIVE_ARCH=YES
ARCHS = arm64
VALID_ARCHS = arm64
IPHONEOS_DEPLOYMENT_TARGET = 11.0
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
STRIP_INSTALLED_PRODUCT=YES
//DEBUGGING_SYMBOLS=NO
//DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
DEPLOYMENT_POSTPROCESSING=YES
GCC_PREPROCESSOR_DEFINITIONS=$(inherited) IOS=1
If I don’t modify the two files above I get those errors:
Errors
/Users/giovanni.bedetti/Downloads/csound-6.18.0/iOS/cs6iOS/Csound.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.1, but the range of supported deployment target versions is 11.0 to 16.1.99. (in target 'CsoundLib-static' from project 'Csound')
error: The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture. (in target 'CsoundLib-static' from project 'Csound')
warning: Run script build phase 'CMake Rules' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'CsoundLib-static' from project 'Csound')
/Users/giovanni.bedetti/Downloads/csound-6.18.0/iOS/cs6iOS/Csound.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.1, but the range of supported deployment target versions is 11.0 to 16.1.99. (in target 'ZERO_CHECK' from project 'Csound')
error: The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture. (in target 'ZERO_CHECK' from project 'Csound')
warning: Run script build phase 'CMake Rules' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ZERO_CHECK' from project 'Csound')
**** BUILD FAILED ****
Not sure if I’m getting closer to discover something, but just wanted to flag this.
Will try again later this evening!