I have created a new react-native project and I am trying to build the iOS code but it is failing with below error:
fatal error: module map file
'/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Products/Release-iphonesimulator/YogaKit/YogaKit.modulemap' not found
react-native versions:
react-native-cli: 2.0.1
react-native: 0.62.2
stack trace from Xcode:
CompileC /Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/Objects-normal/x86_64/thoughtrail_vers.o /Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/DerivedSources/thoughtrail_vers.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'thoughtrail' from project 'thoughtrail')
cd /Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -target x86_64-apple-ios9.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fmodules -gmodules -fmodules-cache-path=/Users/ritz/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/ritz/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DCOCOAPODS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -iquote /Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/thoughtrail-generated-files.hmap -I/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/thoughtrail-own-target-headers.hmap -I/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/thoughtrail-all-target-headers.hmap -iquote /Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/thoughtrail-project-headers.hmap -I/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Products/Release-iphonesimulator/include -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/CocoaAsyncSocket -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/CocoaLibEvent -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/DoubleConversion -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/FBLazyVector -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/FBReactNativeSpec -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/Flipper -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/Flipper-DoubleConversion -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/Flipper-Folly -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/Flipper-Glog -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/Flipper-PeerTalk -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/Flipper-RSocket -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/FlipperKit -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/OpenSSL-Universal -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/RCTRequired -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/RCTTypeSafety -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/React-Core -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/React-RCTText -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/React-cxxreact -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/React-jsi -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/React-jsinspector -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/ReactCommon -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/Yoga -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/YogaKit -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/glog -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/react-native-webview -I/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Private/React-Core -I/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/DerivedSources-normal/x86_64 -I/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/DerivedSources/x86_64 -I/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/DerivedSources -F/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Products/Release-iphonesimulator -fmodule-map-file=/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Products/Release-iphonesimulator/YogaKit/YogaKit.modulemap -fmodule-map-file=/Users/ritz/Documents/workspace/threesixnine/thoughtrail/source/mobile/thoughtrail/ios/Pods/Headers/Public/yoga/Yoga.modulemap -MMD -MT dependencies -MF /Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/Objects-normal/x86_64/thoughtrail_vers.d --serialize-diagnostics /Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/Objects-normal/x86_64/thoughtrail_vers.dia -c /Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/DerivedSources/thoughtrail_vers.c -o /Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Intermediates.noindex/thoughtrail.build/Release-iphonesimulator/thoughtrail.build/Objects-normal/x86_64/thoughtrail_vers.o
Kindly advise.
Found the problems:
I opened a xcproject file instead of xcworkspace. Since I am using react-native which in turn uses COCOA, I am required to open the xcworkspace.
Reason for the above error was the POD Target Usable files were not available in the runtime project build directory generated.
So I Copy target support files from PODS Directory to dynamic generated path something like below
/Users/ritz/Library/Developer/Xcode/DerivedData/thoughtrail-blthhaitoghgvzenyxayuwazwzfm/Build/Products/Debug-iphonesimulator
the build moved forward however it failed for some other reason.
So to summarize the problem was basically me opening the xcproject and not xcworkspace.
Hope this will help beginners like me.
I had the same issue, but its why I was Building from Xcode Project, and I have to do it from XCode Workspace.
I was getting this error when trying to build the workspace from the command line. To fix it for me I needed to add -workspace <AppName>.xcworkspace to the end of my build command. I was able to figure this out thanks to the answers above regarding building from the IDE.
The failing command:
xcodebuild clean archive
-scheme releaseScheme
-configuration Release
-archivePath ../builds/<AppName>.xcarchive
-allowProvisioningUpdates
DEVELOPMENT_TEAM=<TeamId>
The final command:
xcodebuild clean archive
-scheme releaseScheme
-configuration Release
-archivePath ../builds/<AppName>.xcarchive
-allowProvisioningUpdates
-workspace <AppName>.xcworkspace
DEVELOPMENT_TEAM=<TeamId>
Related
I am new to React Native and iOS App development. I come across the following error when I try to run an new reactive native project for iOS:
/usr/local/bin/node /usr/local/lib/node_modules/react-native-cli run-ios
error Could not find "Podfile.lock" at /Users/davep/WebstormProjects/untitled3/ios/Podfile.lock. Did you run "pod install" in iOS directory?
info Found Xcode project "untitled3.xcodeproj"
info Building (using "xcodebuild -project untitled3.xcodeproj -configuration Debug -scheme untitled3 -destination id=CAE67ED1-8877-47D6-826E-376DD2D45250")
................
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project untitled3.xcodeproj -configuration Debug -scheme untitled3 -destination id=CAE67ED1-8877-47D6-826E-376DD2D45250
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Using build description from disk
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the untitled3 editor. (in target 'untitled3' from project 'untitled3')
PhaseScriptExecution Start\ Packager /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Script-FD10A7F022414F080027D42C.sh (in target 'untitled3' from project 'untitled3')
cd /Users/davep/WebstormProjects/untitled3/ios
/bin/sh -c /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Script-FD10A7F022414F080027D42C.sh
Connection to localhost port 8081 [tcp/sunproxyadmin] succeeded!
CompileC /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/main.o /Users/davep/WebstormProjects/untitled3/ios/untitled3/main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'untitled3' from project 'untitled3')
cd /Users/davep/WebstormProjects/untitled3/ios
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios9.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Users/davep/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/davep/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DDEBUG=1 -DFB_SONARKIT_ENABLED=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Index/DataStore -iquote /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/untitled3-generated-files.hmap -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/untitled3-own-target-headers.hmap -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/untitled3-all-target-headers.hmap -iquote /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/untitled3-project-headers.hmap -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Products/Debug-iphonesimulator/include -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/DerivedSources-normal/x86_64 -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/DerivedSources/x86_64 -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/DerivedSources -F/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Products/Debug-iphonesimulator -MMD -MT dependencies -MF /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/main.d --serialize-diagnostics /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/main.dia -c /Users/davep/WebstormProjects/untitled3/ios/untitled3/main.m -o /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/main.o
In file included from /Users/davep/WebstormProjects/untitled3/ios/untitled3/main.m:3:
/Users/davep/WebstormProjects/untitled3/ios/untitled3/AppDelegate.h:1:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
CompileC /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/AppDelegate.o /Users/davep/WebstormProjects/untitled3/ios/untitled3/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'untitled3' from project 'untitled3')
cd /Users/davep/WebstormProjects/untitled3/ios
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios9.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Users/davep/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/davep/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DDEBUG=1 -DFB_SONARKIT_ENABLED=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Index/DataStore -iquote /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/untitled3-generated-files.hmap -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/untitled3-own-target-headers.hmap -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/untitled3-all-target-headers.hmap -iquote /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/untitled3-project-headers.hmap -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Products/Debug-iphonesimulator/include -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/DerivedSources-normal/x86_64 -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/DerivedSources/x86_64 -I/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/DerivedSources -F/Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Products/Debug-iphonesimulator -MMD -MT dependencies -MF /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/AppDelegate.d --serialize-diagnostics /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/AppDelegate.dia -c /Users/davep/WebstormProjects/untitled3/ios/untitled3/AppDelegate.m -o /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/AppDelegate.o
In file included from /Users/davep/WebstormProjects/untitled3/ios/untitled3/AppDelegate.m:1:
/Users/davep/WebstormProjects/untitled3/ios/untitled3/AppDelegate.h:1:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/main.o /Users/davep/WebstormProjects/untitled3/ios/untitled3/main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/davep/Library/Developer/Xcode/DerivedData/untitled3-adqqamxzcxmswnfnvithzulzjaop/Build/Intermediates.noindex/untitled3.build/Debug-iphonesimulator/untitled3.build/Objects-normal/x86_64/AppDelegate.o /Users/davep/WebstormProjects/untitled3/ios/untitled3/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening untitled3.xcodeproj. Run CLI with --verbose flag for more details.
I already install the following:
* XCode
* React Native CLI
May I know what could be going wrong? It seems the Pod install could be a problem?
Many thanks for the help!
The project was created and run inside Webstorm. It seems the error will be gone after I run the project in the command line directly. During the process, RN will ask me to install cocopads.
Many thanks for all the comment!
Using xcodebuild in Xcode 11.2.1 to build a c library for iOS produces an error because for some reason Xcode is using the macOS headers even though the SDK is iOS. The same target builds correctly in Xcode. Does this seem like a bug? Or am I missing something?
"/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild" -project "Project.xcodeproj" -scheme "Scheme" -destination "generic/platform=iOS" BUILD_DIR="$root/build" CONFIGURATION_TEMP_DIR="$root/build/temp" OTHER_CFLAGS="-fembed-bitcode" clean build
...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -target armv7-apple-ios8.0 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Wunreachable-code -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DCMAKE_INTDIR=\"Debug-iphoneos\" -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -fembed-bitcode-marker -index-store-path /Users/nick/Library/Developer/Xcode/DerivedData/Project-arktscwurveswebmwvnpcwdblhgf/Index/DataStore -I/Users/nick/Documents/Repos/Project/build/Debug-iphoneos/include -Isrc -Ilib/jsmn -Isrc/Foundation -Isrc/BLE -Isrc/DeviceConfiguration -Isrc/DeviceDefaults -Isrc/DeviceTypes -Isrc/Header-App -I/Users/nick/Documents/Repos/Project/build/temp/Library-iOS.build/DerivedSources-normal/armv7 -I/Users/nick/Documents/Repos/Project/build/temp/Library-iOS.build/DerivedSources/armv7 -I/Users/nick/Documents/Repos/Project/build/temp/Library-iOS.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/nick/Documents/Repos/Project/build/Debug-iphoneos -fembed-bitcode -MMD -MT dependencies -MF /Users/nick/Documents/Repos/Project/build/temp/Library-iOS.build/Objects-normal/armv7/jsmn.d --serialize-diagnostics /Users/nick/Documents/Repos/Project/build/temp/Library-iOS.build/Objects-normal/armv7/jsmn.dia -c /Users/nick/Documents/Repos/Project/source.c -o /Users/nick/Documents/Repos/Project/build/temp/Library-iOS.build/Objects-normal/armv7/jsmn.o
In file included from /Users/nick/Documents/Repos/Project/source.c:1:
In file included from source.h:4:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
DCMAKE_INTDIR=\"Debug-iphoneos\" seems wrong... Maybe you should try specifying your sdk on the xcodebuild command line e.g xcodebuild .... -sdk macosx10.14
Ah, I had set the CPATH environment variable to try to fix a different issue:
export CPATH=`xcrun --show-sdk-path`/usr/include
Removing that fixed it.
Summary
When the build server downloads the project and tires to call carthage bootstrap/update on the project it fails to build Nimble.
Details
I'll manually download the source and run the following
carthage bootstrap Quick Nimble --platform ios --cache-builds
# or
carthage update Quick Nimble --platform ios --cache-builds
Should this occur in the ~/Projects directory all is fine and Carthage is happy.
Should I allow Xcode Bots to download and run it, it fails. So I log into the server and build out of the build directory Xcode Bots has created, which is
~/Library/Caches/XCSBuilder/Bots/8e543991f99daae3015cbc6c419dba56/Source/myProject and I get the following in the log
/***someUserDirectory***/Library/Caches/XCSBuilder/Bots/8e543991f99daae3015cbc6c419dba56/Source/airlib/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBStringify.m:6:9: fatal error: 'Nimble/Nimble-Swift.h' file not found
#import <Nimble/Nimble-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Here's the compileC command
CompileC /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Objects-normal/x86_64/NMBStringify.o /***someUserDirectory***/Library/Caches/XCSBuilder/Bots/8e543991f99daae3015cbc6c419dba56/Source/airlib/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBStringify.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: Nimble-iOS)
cd /***someUserDirectory***/Library/Caches/XCSBuilder/Bots/8e543991f99daae3015cbc6c419dba56/Source/airlib/Carthage/Checkouts/Nimble
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/ModuleCache.noindex -fno-autolink -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fmodule-name=Nimble -fapplication-extension -Wno-trigraphs -fpascal-strings -Os -fno-common -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wnewline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPRODUCT_NAME=Nimble/Nimble -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Nimble-generated-files.hmap -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Nimble-own-target-headers.hmap -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Nimble-all-non-framework-target-headers.hmap -ivfsoverlay /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/all-product-headers.yaml -iquote /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Nimble-project-headers.hmap -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Products/Release-iphonesimulator/include -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/DerivedSources-normal/x86_64 -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/DerivedSources/x86_64 -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/DerivedSources -F/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Products/Release-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -MMD -MT dependencies -MF /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Objects-normal/x86_64/NMBStringify.d --serialize-diagnostics /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Objects-normal/x86_64/NMBStringify.dia -c /***someUserDirectory***/Library/Caches/XCSBuilder/Bots/8e543991f99daae3015cbc6c419dba56/Source/airlib/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBStringify.m -o /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Objects-normal/x86_64/NMBStringify.o
It also gives a similar error for the i386 version of the file. Just change all the x86_64 to i386. So there are two errors for NMBStringify file.
When I run Carthage boostrap/update in the normal projects directory, ~/Projects/myproject/ the build is fine and it prints the following for the same file
CompileC /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Objects-normal/x86_64/NMBStringify.o /***someUserDirectory***/Projects/airlib/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBStringify.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: Nimble-iOS)
cd /***someUserDirectory***/Projects/airlib/Carthage/Checkouts/Nimble
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/ModuleCache.noindex -fno-autolink -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fmodule-name=Nimble -fapplication-extension -Wno-trigraphs -fpascal-strings -Os -fno-common -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wnewline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPRODUCT_NAME=Nimble/Nimble -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Nimble-generated-files.hmap -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Nimble-own-target-headers.hmap -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Nimble-all-non-framework-target-headers.hmap -ivfsoverlay /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/all-product-headers.yaml -iquote /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Nimble-project-headers.hmap -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Products/Release-iphonesimulator/include -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/DerivedSources-normal/x86_64 -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/DerivedSources/x86_64 -I/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/DerivedSources -F/***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Products/Release-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -MMD -MT dependencies -MF /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Objects-normal/x86_64/NMBStringify.d --serialize-diagnostics /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Objects-normal/x86_64/NMBStringify.dia -c /***someUserDirectory***/Projects/airlib/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBStringify.m -o /***someUserDirectory***/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2/Build/Intermediates.noindex/Nimble.build/Release-iphonesimulator/Nimble-iOS.build/Objects-normal/x86_64/NMBStringify.o
Virtually the same but with slightly different pathing. For some reason it can't find the header files required for the Obj-c files in Nimble to build.
For the life of me I don't know why Xcode can't find the header file in one directory yet it can't in another. I have taken the project out of the
More Info
When Carthage fails
The following log output is from a script that deletes the old Carthage directory, this should be removed since we don't upload the Carthage files anymore, and then calls
carthage bootstrap --no-build
carthage bootstrap Quick Nimble --platform ios --cache-builds
this is what the log says
Git prune
Delete Old Carthage Directory
rm: Carthage: No such file or directory
Carthage Bootstrap
*** Checking out MBProgressHUD at "1.1.1"
*** Checking out XCGLogger at "7.0.0"
*** Cloning MBProgressHUD
*** Checking out CocoaAsyncSocket at "7.6.3"
*** Checking out Nimble at "v8.0.2"
*** Checking out Quick at "v2.1.0"
*** Checking out BlueSocket at "1.0.46"
*** Checking out Quick at "v2.1.0"
*** Checking out Nimble at "v8.0.2"
*** No cache found for Nimble, building with all downstream dependencies
*** No cache found for Quick, building with all downstream dependencies
*** xcodebuild output can be found in /var/folders/rc/28t61gwn3c1bcsn1b360d0h40000gq/T/carthage-xcodebuild.HH0nlH.log
*** Building scheme "Nimble-iOS" in Nimble.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/XcodeServer/Library/Caches/XCSBuilder/Bots/8e543991f99daae3015cbc6c419dba56/Source/airlib/Carthage/Checkouts/Nimble/Nimble.xcodeproj -scheme Nimble-iOS -configuration Release -derivedDataPath /Users/XcodeServer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/Nimble/v8.0.2 -sdk iphonesimulator -destination platform=iOS\ Simulator,id=5A944081-C045-401A-889E-72B41BB3C8CA -destination-timeout 3 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build (launched in /Users/XcodeServer/Library/Caches/XCSBuilder/Bots/8e543991f99daae3015cbc6c419dba56/Source/airlib/Carthage/Checkouts/Nimble)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/rc/28t61gwn3c1bcsn1b360d0h40000gq/T/carthage-xcodebuild.HH0nlH.log
This is what happens when I manually do it
Git prune
Delete Old Carthage Directory
rm: Carthage: No such file or directory
Carthage Bootstrap
*** Checking out Quick at "v2.1.0"
*** Checking out SVProgressHUD at "2.2.5"
*** Checking out XCGLogger at "7.0.0"
*** Checking out Nimble at "v8.0.2"
*** Checking out BlueSocket at "1.0.46"
*** Checking out CocoaAsyncSocket at "7.6.3"
*** Checking out Nimble at "v8.0.2"
*** Checking out Quick at "v2.1.0"
*** No cache found for Nimble, building with all downstream dependencies
*** No cache found for Quick, building with all downstream dependencies
*** xcodebuild output can be found in /var/folders/rc/28t61gwn3c1bcsn1b360d0h40000gq/T/carthage-xcodebuild.GnvVo9.log
*** Building scheme "Nimble-iOS" in Nimble.xcodeproj
*** Building scheme "Quick-iOS" in Quick.xcworkspace
I upgraded to XCode 11 and now it builds correctly.
In case the Nimble team is listening, the issue seemed to only pop up when building for release.
I ran into this same issue with Nimble when trying to use Xcode11.2. What fixed it was deleting the Nimble folder from my Carthage/Checkouts folder. That got Carthage to checkout the files again, and from there it built just fine. I'm not sure why that worked, but I suspect folder/file permissions.
This just happened to me. I cleared the Carthage cache and it worked:
rm -rf ~/Library/Caches/org.carthage.CarthageKit
I have a project which will generate framework.
My architecture setting is:
standard architecture(armv7, arm64)
i386
Valid architecture: armv7, arm64, i386.
In iOS 8.4, I can build it successfully without any problem.
However, when I update to iOS 9. I get "Unsupported architecture" error.
It looks like i386 is not supported, how can I make the framework which can be used in simulator?
Here is the error message:
CompileC build/iDock.build/Debug-iphoneos/iDock.build/Objects-normal/i386/iDockControl.o iDock/iDockControl.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/leon/Documents/Jul-27/iDock
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/cy/52qx8n5j5qqfd4g4hsm9t1140000gn/C/com.apple.DeveloperTools/7.0-7A220/Xcode/ModuleCache/Session.modulevalidation
-fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk
-fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.0 -Wno-sign-conversion -fobjc-abi-version=2 -iquote /Users/leon/Documents/Jul-27/iDock/build/iDock.build/Debug-iphoneos/iDock.build/iDock-generated-files.hmap
-I/Users/leon/Documents/Jul-27/iDock/build/iDock.build/Debug-iphoneos/iDock.build/iDock-own-target-headers.hmap
-I/Users/leon/Documents/Jul-27/iDock/build/iDock.build/Debug-iphoneos/iDock.build/iDock-all-target-headers.hmap
-iquote /Users/leon/Documents/Jul-27/iDock/build/iDock.build/Debug-iphoneos/iDock.build/iDock-project-headers.hmap
-I/Users/leon/Library/Developer/Xcode/DerivedData/iDock-gqdfmhxadzmqcshdhlnmlbzodlrp/Build/Products/Debug-iphoneos/include
-I/Users/leon/Documents/Jul-27/iDock/build/iDock.build/Debug-iphoneos/iDock.build/DerivedSources/i386
-I/Users/leon/Documents/Jul-27/iDock/build/iDock.build/Debug-iphoneos/iDock.build/DerivedSources
-F/Users/leon/Library/Developer/Xcode/DerivedData/iDock-gqdfmhxadzmqcshdhlnmlbzodlrp/Build/Products/Debug-iphoneos
-MMD -MT dependencies -MF /Users/leon/Documents/Jul-27/iDock/build/iDock.build/Debug-iphoneos/iDock.build/Objects-normal/i386/iDockControl.d
--serialize-diagnostics /Users/leon/Documents/Jul-27/iDock/build/iDock.build/Debug-iphoneos/iDock.build/Objects-normal/i386/iDockControl.dia
-c /Users/leon/Documents/Jul-27/iDock/iDock/iDockControl.m -o /Users/leon/Documents/Jul-27/iDock/build/iDock.build/Debug-iphoneos/iDock.build/Objects-normal/i386/iDockControl.o While building module 'Foundation' imported from /Users/leon/Documents/Jul-27/iDock/iDock/iDockControl.h:10: While building module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: While building module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11: In file included from <module-includes>:1: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture error Unsupported architecture ^ While building module 'Foundation' imported from /Users/leon/Documents/Jul-27/iDock/iDock/iDockControl.h:10: While building module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: While building module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11: In file included from <module-includes>:3: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/copyfile.h:36: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0/include/stdint.h:63: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/sys/_types.h:33: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported error architecture not supported
Can someone help me to understand this and figure out this problem?
I also faces the same problem with Xcode 7.2 update. found a solution, Hope this helps for you,
Change script line which is used to build for simulator as follows,
xcodebuild -project ${PROJECT_NAME}.xcodeproj -scheme ${PROJECT_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} -destination 'platform=iOS Simulator,name=iPad' clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1
Just run into the same problem while trying to build a project from command line and solved the issue by setting -sdk parameter to iphonesimulator:
xcodebuild .... -sdk iphonesimulator ...
this didn't work for me, I had to also specify
PLATFORM_NAME=iphonesimulator
Select your project:
Under Build Settings > Architectures
Select Standard architectures - $(ARCHS_STANDARD)
When in device test it's ok. But when I want to archive, xcode give the error like this.
error: Could not read profile: No such file or directory
it is the errors
CompileC /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.o jinbi/Views/NavigationMenuView/UIColor+Extension.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /wikimo/project/iyoo-ios-app
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/wikimo/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -fprofile-instr-use=/wikimo/project/iyoo-ios-app/OptimizationProfiles/jinbi.profdata -miphoneos-version-min=6.1 -iquote /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/哎呦瘦了-generated-files.hmap -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/哎呦瘦了-own-target-headers.hmap -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/哎呦瘦了-all-target-headers.hmap -iquote /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/哎呦瘦了-project-headers.hmap -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/BuildProductsPath/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/DerivedSources/armv7 -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/DerivedSources -F/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/BuildProductsPath/Release-iphoneos -include /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/PrecompiledHeaders/jinbi-Prefix-gdlmasukgjdlutbqrcfgpdbwoxhr/jinbi-Prefix.pch -MMD -MT dependencies -MF /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.d --serialize-diagnostics /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.dia -c /wikimo/project/iyoo-ios-app/jinbi/Views/NavigationMenuView/UIColor+Extension.m -o /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.o
because the
/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.o
can not generate. How can I generate?
Targets -> Valid Architectures has already added armv7 architecture
Here is the solution if any one want.....
Go to Project -> Build Setting -> Apple LLVM 6.0-code generation
and clear Optimization Profile File
Clean Your project.....Build your project and archive your project....and you are done....
Endorsing [El Captain][1] response using LLVM 8.0:
Go to Project → Build Setting → Apple LLVM 8.0-code generation
Clear the Optimization Profile File
Clean project
Build project
Select App targets. Right click on the test target and delete it.
Clean your project and Run.
Simply follow this steps:
Clean your project
Remove derived data
Go to Targets -> Valid Architectures & add armv7 architecture
Build & Run your project
Hope it will work for you.
Go to Project → Build Setting → Search "OptimizationProfiles"
Clear the Optimization Profile File
Clean project (Command + K)
Build project (Command + B)