Update to iOS 9 error: i386 Unsupported architecture - ios

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)

Related

Unrecognized module map file Release-iphonesimulator/YogaKit/YogaKit.modulemap' not found

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>

Carthage fails to build Nimble: cannot import <Nimble/Nimble-Swift.h> for obj-c file for Xcode bots

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

Ld linker fails with absolute addressing error even though PIE is enabled

For the past few days I've dealing with an issue I couldn't get my head around. I'm trying to build an old (6 years!) iOS game project of mine and the linker fails with the following error:
Absolute addressing not allowed in arm64 code but used in '-[Snip snap]' referencing '_NSFileModificationDate' for architecture arm64
The referred class does call NSDictionary -objectForKey: with NSFileModificationDate as parameter. It's an Objective-C++ source file since it does include C++ code.
So as I far as I understand, the linker considers that I compiled my sources to be position-dependent and fails, as intended with arm64. But why is that?
What I've tried or checked so far:
Build settings:
Linking > Generate Position-Dependent Executable: NO
Linking > Other Linker Flags: -all_load -ObjC
Apple Clang - Code Generation > Generate Position-Dependent Code: NO
do clean and delete DerivedData folder before rebuilding after any changes
removed all third-party both static and dynamic libraries. I'm just using a few Apple frameworks
removed any source files which were including asm code
looked for any unknown-to-me preprocessor directives
recreated the whole project from scratch and copying my source files in it, to make sure my older project has broken settings
any .m or .mm source files which includes a constant just like that NSFileModificationDate will fail at linking
otool -hv gives:
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 ARM64 ALL 0x00 OBJECT 4 3000 SUBSECTIONS_VIA_SYMBOLS
Here is the compilation command for the faulty file (sorry, that's verbose):
CompileC SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/Objects-normal/arm64/Snip.o SNIPDesktop/SNIP/SNIP/Classes/App/Snip.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target: SNIP)
cd SNIPDesktop/SNIP/SNIP
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++14 -stdlib=libc++ -fmodules -gmodules -fmodules-cache-path=SNIPLibrary/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=SNIPLibrary/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 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -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 -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -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 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-c++11-extensions -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -miphoneos-version-min=12.0 -g -fvisibility-inlines-hidden -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -fembed-bitcode-marker -index-store-path SNIP/Index/DataStore -iquote SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/SNIP-generated-files.hmap -ISNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/SNIP-own-target-headers.hmap -ISNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/SNIP-all-target-headers.hmap -iquote SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/SNIP-project-headers.hmap -ISNIP/Build/Products/Debug-iphoneos/include -ISNIPDesktop/SNIP/SNIP/External -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/libxml2 -ISNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/DerivedSources/arm64 -ISNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/DerivedSources -FSNIP/Build/Products/Debug-iphoneos -include SNIP/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/12134743132148408221/SNIP_prefix.pch -MMD -MT dependencies -MF SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/Objects-normal/arm64/Snip.d --serialize-diagnostics SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/Objects-normal/arm64/Snip.dia -c SNIPDesktop/SNIP/SNIP/Classes/App/Snip.mm -o SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/Objects-normal/arm64/Snip.o
What am I missing? What other clues should I look for? Is there any warning messages I should check?
Thanks for your much-appreciated help!

Archive apple LLVM 6.0 error could not read profile

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)

Using HP Fortify and Xcode

I'm having this issue... after successfuly building an iOS 6.0 (Xcode 4.5) project separately using xcodebuild, the sourceanalyzer first reports missing .nst files for couple classes including stdarg.h and similar. Seems like sourceanalyzer cannot see the iPhone SDK's Header Search Paths. However Fortify seems so rare, that I haven't spotted any answer yet, especially regards to compatibility with various Xcode versions, etc. Anyone?
$ sourceanalyzer -b Forty xcodebuild -configuration Debug -sdk iphoneos6.1
Output:
Build settings from command line:
SDKROOT = iphoneos6.1
=== BUILD NATIVE TARGET fortifyTest OF PROJECT fortifyTest WITH CONFIGURATION Debug ===
Check dependencies
ProcessPCH /var/folders/yp/2l8w2hpd08199zstwqnxnvs80000gp/C/com.apple.Xcode.502/SharedPrecompiledHeaders/fortifyTest-Prefix-gfjvmaafdrnknjehmxvutbaqdpny/fortifyTest-Prefix.pch.pth fortifyTest/fortifyTest-Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/sychram/Repositories/fortifyTest
setenv LANG en_US.US-ASCII
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Applications/HP_Fortify/HP_Fortify_SCA_and_Apps_3.70/bin"
/Users/sychram/.fortify/sca5.14/build/Forty/build717537620538182813/clang -x objective-c-header -arch armv7 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-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 -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -miphoneos-version-min=6.0 -iquote /Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/fortifyTest-generated-files.hmap -I/Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/fortifyTest-own-target-headers.hmap -I/Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/fortifyTest-all-target-headers.hmap -iquote /Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/fortifyTest-project-headers.hmap -I/Users/sychram/Repositories/fortifyTest/build/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/DerivedSources/armv7 -I/Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/DerivedSources -F/Users/sychram/Repositories/fortifyTest/build/Debug-iphoneos --serialize-diagnostics /var/folders/yp/2l8w2hpd08199zstwqnxnvs80000gp/C/com.apple.Xcode.502/SharedPrecompiledHeaders/fortifyTest-Prefix-gfjvmaafdrnknjehmxvutbaqdpny/fortifyTest-Prefix.pch.dia -c /Users/sychram/Repositories/fortifyTest/fortifyTest/fortifyTest-Prefix.pch -o /var/folders/yp/2l8w2hpd08199zstwqnxnvs80000gp/C/com.apple.Xcode.502/SharedPrecompiledHeaders/fortifyTest-Prefix-gfjvmaafdrnknjehmxvutbaqdpny/fortifyTest-Prefix.pch.pth -MMD -MT dependencies -MF /var/folders/yp/2l8w2hpd08199zstwqnxnvs80000gp/C/com.apple.Xcode.502/SharedPrecompiledHeaders/fortifyTest-Prefix-gfjvmaafdrnknjehmxvutbaqdpny/fortifyTest-Prefix.pch.d
[error]: Translator execution failed. Please consult the Troubleshooting section of the User Manual.
Translator returned status 1:
In file included from /Users/sychram/Repositories/fortifyTest/fortifyTest/fortifyTest-Prefix.pch:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/sys/types.h:78:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/machine/types.h:35:10: fatal error: 'i386/types.h' file not found
#include "i386/types.h"
^
1 error generated.
AFAIK only xcode versions 4.1, 4.2, 4.2.1, 4.3 are supported by fortify in the latest release 3.7.
Currently there is support for xcode 4.6 with SCA version 4.02. But I am still waiting for xcode 5.x to support by fortify, that I will be able to scan apps based on iOS7. since february apps submitted to the App Store must be built with the latest version of Xcode 5 and must be optimized for iOS 7.

Resources