简体   繁体   English

科尔多瓦XCode Build iOS抛出clang:错误:无法执行命令:分段错误:11

[英]Cordova XCode Build iOS throw clang: error: unable to execute command: Segmentation fault: 11

I have developed a mobile application using Apache Cordova. 我已经使用Apache Cordova开发了一个移动应用程序。 Now I need to build the iOS platform but I get the following error: 现在,我需要构建iOS平台,但是出现以下错误:

clang: error: unable to execute command: Segmentation fault: 11 clang: error: clang frontend command failed due to signal (use -v to see invocation) Apple LLVM version 7.3.0 (clang-703.0.31) Target: x86_64-apple-darwin15.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script. clang:错误:无法执行命令:分段错误:11 clang:错误:clang前端命令由于信号失败(使用-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:注意:诊断消息:请向http://developer.apple提交错误报告。 .com / bugreporter /,并包含崩溃回溯,预处理的源以及关联的运行脚本。 clang: error: unable to execute command: Segmentation fault: 11 clang: note: diagnostic msg: Error generating preprocessed source(s). 铛:错误:无法执行命令:分段错误:11铛:注意:诊断消息:生成预处理源时出错。

I have read more about this error on Stack Overflow but none of them solved my problem. 我已经阅读了有关Stack Overflow上此错误的更多信息,但没有一个解决了我的问题。 I have done these steps too: 我也完成了以下步骤:

  • Upgrade xCode to 7.3.1 将xCode升级到7.3.1
  • Disable BitCode 禁用BitCode
  • Specify the Deployment Target 指定部署目标
  • Clean and Build the project 清理并构建项目
  • Remove and add plugins 删除并添加插件
  • Remove and add iOS platform 删除并添加iOS平台
  • Remove DerivedData 删除衍生数据
  • Close xCode, load another project and build it, then load this project but failed to build! 关闭xCode,加载另一个项目并进行构建,然后加载该项目但构建失败!

I am able to build and run OSX, Android and Browser version of my application without any problem! 我能够构建并运行我的应用程序的OSX,Android和浏览器版本,没有任何问题!

Error's detailed info: 错误的详细信息:

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

I have solved it finally. 我终于解决了。

I was serving my Cordova app via Shared Folder in VM to Mac OS. 我正在通过VM中的共享文件夹为Mac OS服务我的Cordova应用程序。 I have just moved my Cordova app to Mac instead of serving in Shared Folder. 我刚刚将Cordova应用程序移至Mac,而不是在“共享文件夹”中提供服务。 Then remove the iOS platform and re-add it. 然后删除iOS平台并重新添加。

Now my app builds successfully in xCode. 现在,我的应用程序已成功在xCode中构建。

Also I found some very helpful information in the following link that might be helpful in case none of the above mentioned methods solve the problem: http://stack2.ocim.top/10592601/apple-llvm-compiler-3-1-error-ios-5-xcode-4-3.html 另外,我在以下链接中找到了一些非常有用的信息,这些信息在上述方法均不能解决问题的情况下可能会有所帮助: http : //stack2.ocim.top/10592601/apple-llvm-compiler-3-1-error -ios-5-xcode-4-3.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xcode铛:错误:无法执行命令:分段错误:11 - Xcode clang: error: unable to execute command: Segmentation fault: 11 iOS Xcode 编译错误:无法执行命令:分段错误:11 - iOS Xcode compile error: unable to execute command: Segmentation fault: 11 命令由于信号分段错误11 Xcode 9而失败-iOS模拟器 - command failed due to signal segmentation fault 11 Xcode 9 - iOS simulator Xcode / Swift错误:由于信号而导致命令失败:分段错误:11 - Xcode/Swift error: Command failed due to signal: Segmentation fault: 11 无法执行命令:分段错误:11 swift 前端命令因信号而失败(使用 -v 查看调用) - unable to execute command: Segmentation fault: 11 swift frontend command failed due to signal (use -v to see invocation) 错误 - 分段错误:Xcode 10 中的 11 - Error -Segmentation fault: 11 in Xcode 10 Xcode 8.3编译错误分段错误:11 - Xcode 8.3 compile error Segmentation fault: 11 无法构建Xcode项目:clang错误:链接器命令失败 - Unable to build Xcode Project: clang error: linker command failed Xcode 7.3命令由于信号失败:分段错误:11 Firebase - Xcode 7.3 Command fail due to signal: Segmentation fault: 11 Firebase 由于出现信号,命令失败:分段错误11 — Xcode 8 Swift 3 - Command Failed due to signal: Segmentation Fault 11 — Xcode 8 Swift 3
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM