Cordova XCode Build iOS throw clang:错误:无法执行命令:分段错误:11

时间:2016-06-28 15:03:11

标签: ios xcode cordova apache-cordova

我使用Apache Cordova开发了一个移动应用程序。现在我需要构建iOS平台,但是我收到以下错误:

  

clang:错误:无法执行命令:分段错误:11 clang:错误:clang frontend命令因信号失败(使用-v查看调用)Apple LLVM版本7.3.0(clang-703.0.31)目标: x86_64-apple-darwin15.5.0线程模型:posix InstalledDir:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin clang:注意:诊断消息:请向{{3}提交错误报告并包括崩溃回溯,预处理源和关联的运行脚本。 clang:错误:无法执行命令:分段错误:11 clang:注意:诊断消息:生成预处理源时出错。

我已经在Stack Overflow上阅读了有关此错误的更多信息,但没有一个解决了我的问题。我也做了这些步骤:

  • 将xCode升级到7.3.1
  • 禁用BitCode
  • 指定部署目标
  • 清理并构建项目
  • 删除并添加插件
  • 删除并添加iOS平台
  • 删除DerivedData
  • 关闭xCode,加载另一个项目并构建它,然后加载此项目但无法构建!

我能够毫无问题地构建和运行我的应用程序的OSX,Android和浏览器版本!

错误的详细信息:

CompileC /Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Bui ld/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/x86_64/CDVViewController.o Classes/Public/CDVViewController.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd "/Volumes/VMware Shared Folders/zz.vvv.bbb/platforms/ios/CordovaLib"
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /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=c99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/ModuleCache
-fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/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 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -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 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk
-fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=6.0 -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-generated-files.hmap
-I/Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-own-target-headers.hmap
-I/Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-all-target-headers.hmap
-iquote /Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-project-headers.hmap
-I/Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Products/Debug-iphonesimulator/include
-I/Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/DerivedSources/x86_64
-I/Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/DerivedSources
-F/Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Products/Debug-iphonesimulator
-DDEBUG -include /Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/PrecompiledHeaders/CordovaLib_Prefix-dwnzgdewwbvmytankebmwsdayrpm/CordovaLib_Prefix.pch
-MMD -MT dependencies -MF /Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/x86_64/CDVViewController.d
--serialize-diagnostics /Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/x86_64/CDVViewController.dia
-c /Volumes/VMware\ Shared\ Folders/zz.vvv.bbb/platforms/ios/CordovaLib/Classes/Public/CDVViewController.m
-o /Users/vahidfarahmandian/Library/Developer/Xcode/DerivedData/XXX-ewdzeukjxrvcrbeafzrgtkhzjkgu/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/x86_64/CDVViewController.o

1 个答案:

答案 0 :(得分:2)

我终于解决了。

我通过VM中的共享文件夹向Mac OS提供我的Cordova应用程序。我刚刚将我的Cordova应用程序移动到Mac而不是在共享文件夹中提供。然后删除iOS平台并重新添加。

现在我的应用程序在xCode中成功构建。

此外,我在以下链接中发现了一些非常有用的信息,如果上述方法都没有解决问题,这些信息可能会有所帮助: http://stack2.ocim.top/10592601/apple-llvm-compiler-3-1-error-ios-5-xcode-4-3.html

相关问题