2017-02-22 86 views
1

我最近升級了我的OSX從El Capitan到Sierra。當我的一個項目使用clang ++時,升級開始產生編譯器錯誤。我在其他不會產生相同錯誤的項目上嘗試過。這是錯誤信息。編譯器錯誤鐺++ 8.0 - 分段錯誤 - 在Mac OSX Sierra 10.12.3

clang++ -v -O3 -std=c++11 -stdlib=libc++ -g -Wall -I/Users/kevincha/projects/git_hub/DRAMPower/src -I/usr/local/include -I/usr/local/Cellar/boost/1.63.0/include -DRAMULATOR -o ramulator src/Main.cpp obj/ALDRAM.o obj/Cache.o obj/Config.o obj/Controller.o obj/DDR3.o obj/DDR4.o obj/DSARP.o obj/GDDR5.o obj/HBM.o obj/LPDDR4.o obj/Packet.o obj/Processor.o obj/Refresh.o obj/SALP.o obj/StatType.o obj/TLDRAM.o obj/WideIO.o obj/WideIO2.o 
Apple LLVM version 8.0.0 (clang-800.0.42.1) 
Target: x86_64-apple-darwin16.4.0 
Thread model: posix 
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin 
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.12.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name Main.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 274.2 -v -dwarf-column-info -debug-info-kind=standalone -dwarf-version=2 -debugger-tuning=lldb -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0 -I /Users/kevincha/projects/git_hub/DRAMPower/src -I /usr/local/include -I /usr/local/Cellar/boost/1.63.0/include -D RAMULATOR -stdlib=libc++ -O3 -Wall -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/kevincha/projects/git_hub/ramulator_power -ferror-limit 19 -fmessage-length 270 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.12.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /var/folders/cn/jclpg1w53fd_gbsnwtjzsc7w0000gn/T/Main-4d31a3.o -x c++ src/Main.cpp 
clang -cc1 version 8.0.0 (clang-800.0.42.1) default target x86_64-apple-darwin16.4.0 
ignoring nonexistent directory "/usr/include/c++/v1" 
ignoring duplicate directory "/usr/local/include" 
as it is a non-system directory that duplicates a system directory 
#include "..." search starts here: 
#include <...> search starts here: 
/Users/kevincha/projects/git_hub/DRAMPower/src 
/usr/local/Cellar/boost/1.63.0/include 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1 
/usr/local/include 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include 
/usr/include 
/System/Library/Frameworks (framework directory) 
/Library/Frameworks (framework directory) 
End of search list. 
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 8.0.0 (clang-800.0.42.1) 
Target: x86_64-apple-darwin16.4.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: note: diagnostic msg: 
******************** 

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: 
Preprocessed source(s) and associated run script(s) are located at: 
clang: note: diagnostic msg: /var/folders/cn/jclpg1w53fd_gbsnwtjzsc7w0000gn/T/Main-ae92f3.cpp 
clang: note: diagnostic msg: /var/folders/cn/jclpg1w53fd_gbsnwtjzsc7w0000gn/T/Main-ae92f3.sh 
clang: note: diagnostic msg: 

******************** 
make: *** [ramulator] Error 254 
+0

是什麼樣的信息裏面的兩個文件中提到'診斷msg'? –

+1

看起來像一個編譯器錯誤。我建議你向編譯器製造商提交他們要求的文件(它在你的消息日誌的底部)提交一個錯誤報告。我不確定還有什麼可以做的,但我可能是錯的。 –

+0

我會嘗試其他編譯器,如g ++,因爲如果它是一個編譯器錯誤,那麼它可能不會立即修復。 – Jonas

回答

1

這是一個鏗鏘編譯器錯誤,現在固定在最新的(測試版)的Xcode:

Xcode 8.3 beta 3 (8W132p) 
Posted Date: Feb 20th, 2017 

https://developer.apple.com/download/

+0

太棒了。這個測試版本修復了這個問題! – kc2uno