2016-09-29 90 views
2

我試圖在OS X下提交掃描。procedure I am following在32位和64位Linux下工作良好,類似的過程在Winows nmake。在OS X cov-build未能與:掃描服務和「此平臺不被Coverity支持」

$ CXXFLAGS="-DNDEBUG -g2 -O3" cov-build --dir cov-int make -j 2 

Coverity Build Capture (64-bit) version 8.5.0.3 on Darwin 12.6.0 x86_64 
Internal version numbers: db70178643 p-kent-push-26368.949 

Platform info: 
Sysname = Darwin 
Release = 12.6.0 
Machine = x86_64 

[ERROR] This platform is not supported by Coverity. 
[ERROR] See documentation for the list of supported platforms. 

不同的OS X機器會產生同樣的錯誤:

$ CXXFLAGS="-DNDEBUG -g2 -O3" cov-build --dir cov-int make -j 2 

Coverity Build Capture (64-bit) version 8.5.0.3 on Darwin 13.4.0 x86_64 
Internal version numbers: db70178643 p-kent-push-26368.949 

Platform info: 
Sysname = Darwin 
Release = 13.4.0 
Machine = x86_64 

[ERROR] This platform is not supported by Coverity. 
[ERROR] See documentation for the list of supported platforms. 

我無法查找的文檔:

$ cov-build --help 
Coverity Build Capture (64-bit) version 8.5.0.3 on Darwin 12.6.0 x86_64 
Internal version numbers: db70178643 p-kent-push-26368.949 

No help found for 'cov-build' 

Coverity Data Sheet狀態OS X被支持,並且一個press release states OS X 10.8 is supported

  • AIX
  • FreeBSD的
  • HP-UX
  • Linux的
  • 的Mac OS X
  • NetBSD的
  • 的Solaris
  • 的Windows

爲什麼我會收到[ERROR] This platform is not supported by Coverity,我該如何解決?

+1

可能值得嘗試'export COVERITY_UNSUPPORTED = 1',儘管我還沒有嘗試過很長一段時間。 –

回答

2

問題是Mac OSX 10.8在您使用的Coverity版本中不受支持。不幸的是,蘋果通過操作系統版本打破與Coverity的兼容性有些普遍。

您可以導出COVERITY_UNSUPPORTED = 1。這將繞過平臺支持檢查,但不保證事情按預期工作。你確實有很好的成功機率。

+0

再次感謝迦勒。我們發現我們需要您的'COVERITY_UNSUPPORTED = 1'的工作量,我們需要避免OS X 10.8的Xcode編譯器。一旦我們轉移到MacPorts Clang 3.7,事情就像預期的那樣。 OS X爲我們的平臺提供了我們的食譜。另請參閱我們wiki上的[Coverity Scan Build說明性說明](http://cryptopp.com/wiki/Coverity_Scan)。 – jww

+0

我的道歉,我把Darwin 12.6映射到OSX 12的心理錯誤。這裏的問題是,Coverity不再支持我們的8.0版本的OSX 10.8。其餘的建議保持不變 - 設置env var並查看會發生什麼。編譯器支持是一個單獨的問題 - 我很高興看到您找到了適合您的解決方案。 – Caleb

+0

我試圖在OS X 10.9上運行Coverity 8.5.0.5,它顯示了同樣的症狀,僅供參考。 – Bombe

0

這建立在Flash Sheridan和Caleb的建議基礎上。平臺的問題較少,編譯器的問題較多。 Xcode 5.0和5.1生成掃描版本失敗:

CXXFLAGS="-DNDEBUG -g2 -O3" cov-build --dir cov-int make -j 2 
... 

cat cov-int/build-log.txt 
... 

"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../ 
lib/clang/5.0/include/stddef.h", line 29: error #109: 

expression preceding parentheses of apparent call must have 

(pointer-to-) function type 

#if !defined(_PTRDIFF_T) || __has_feature(modules) 


"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../ 
lib/clang/5.0/include/stddef.h", line 31: error #59: 

function call is not allowed in a constant expression 

#if !__has_feature(modules) 
... 

第二個解決方法取決於Flash Sheridan和Caleb的解決方法。它增加了「使用不同的編譯器」。下面,我們使用MacPorts Clang 3.7來執行掃描構建。

$ CXX=/opt/local/bin/clang++-mp-3.7 COVERITY_UNSUPPORTED=1 CXXFLAGS="-DNDEBUG -g3 -O2" cov-build --dir cov-int make -j 8 
Coverity Build Capture (64-bit) version 8.5.0.3 on Darwin 12.6.0 x86_64 
Internal version numbers: db70178643 p-kent-push-26368.949 

/opt/local/bin/clang++-mp-3.7 -DNDEBUG -g3 -O2 -fPIC -march=native -pipe -c cryptlib.cpp 
/opt/local/bin/clang++-mp-3.7 -DNDEBUG -g3 -O2 -fPIC -march=native -pipe -c cpu.cpp 
... 

Emitted 134 C/C++ compilation units (100%) successfully 

134 C/C++ compilation units (100%) are ready for analysis 
The cov-build utility completed successfully. 

任何有興趣,我們是一個自由和開放源碼軟件項目,我們利用Coverity Scan Service的不收取任何費用。但是,文檔很輕鬆。

如果您想要爲Unix,Linux,OS X和Windows執行掃描構建的說明性說明,請參閱Crypto++ wiki | Coverity Scan