Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
826 views
in Technique[技术] by (71.8m points)

xcode - Apple LLVM Compiler 3.1 error clang

I'm trying to make an archive (ipa) for my iOS (iPhone) app but I'm receiving a strange error:

Apple LLVM Compiler 3.1 error clang: error: no such file or directory: 'armv6'

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

Does anyone know how i can fix this?

http://i.imgur.com/PKOHx.png

ProcessPCH /Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/PrecompiledHeaders/myapp-Prefix-cgigtilzpjcadpbgpxbabnqczfxd/myapp-Prefix.pch.pth

     myapp/myapp-Prefix.pch normal armv7 objective-c
     com.apple.compilers.llvm.clang.1_0.compiler
             cd /Users/wazapi/Downloads/myapp
             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:/usr/bin:/bin:/usr/sbin:/sbin"
             /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
     -x objective-c-header -arch armv7 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wmissing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
     -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-conversion -Wno-sign-conversion -mthumb "-DIBOutlet=__attribute__((iboutlet))"
     "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))"
     "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=5.0
     -iquote /Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/myapp.build/myapp-generated-files.hmap
     -I/Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/myapp.build/myapp-own-target-headers.hmap
     -I/Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/myapp.build/myapp-all-target-headers.hmap
     -iquote /Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/myapp.build/myapp-project-headers.hmap
     -I/Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/BuildProductsPath/Release-iphoneos/include
     -I/Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/myapp.build/DerivedSources/armv7
     -I/Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/myapp.build/DerivedSources
     -F/Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/BuildProductsPath/Release-iphoneos
     -F/Users/wazapi/Downloads/myapp armv6 --serialize-diagnostics /Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/PrecompiledHeaders/myapp-Prefix-cgigtilzpjcadpbgpxbabnqczfxd/myapp-Prefix.pch.dia
     -c /Users/wazapi/Downloads/myapp/myapp/myapp-Prefix.pch -o /Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/PrecompiledHeaders/myapp-Prefix-cgigtilzpjcadpbgpxbabnqczfxd/myapp-Prefix.pch.pth
     -MMD -MT dependencies -MF /Users/wazapi/Library/Developer/Xcode/DerivedData/myapp-hjzccpnbaymgcufalpjtfeuqvjvu/Build/Intermediates/ArchiveIntermediates/myapp/PrecompiledHeaders/myapp-Prefix-cgigtilzpjcadpbgpxbabnqczfxd/myapp-Prefix.pch.d
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

OK, what you need to do is go to build settings and scroll down to :

Apple LLVM Compiler 3.1 - Language

Search in the table for 'other c flags'. What you see is armv6? Right? :)

Change armv6 to: -DNS_BLOCK_ASSERTIONS=1

Good luck, Nathan


  1. Click on your project (Usually on top of your in-Xcode-file-browser - blue Xcode icon).
  2. Go to [Your project] under Targets.
  3. Click on the Build Settings.
  4. Search in the search box for: 'other c flag'. (On mine there were three options - disregard all options except the bold 'Other C Flags.')
  5. Click on the third column of 'Other C Flags' and enter: '-DNS_BLOCK_ASSERTIONS=1'

Image of what It should Look like when you're done

That should do it :)

(I also had some files missing, look at your build log and make sure there are no other errors above the one mentioned for this question)

Good luck!

P.S. - May Xcode die a slow and painful death!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...