0

我遇到了这个问题......在使用 xcodebuild 分别成功构建 iOS 6.0 (Xcode 4.5) 项目后,sourceanalyzer 首先报告缺少几个类的 .nst 文件,包括 stdarg.h 和类似文件。似乎 sourceanalyzer 看不到 iPhone SDK 的标头搜索路径。然而,Fortify 似乎如此罕见,以至于我还没有找到任何答案,尤其是关于与各种 Xcode 版本的兼容性等方面。有人吗?

$ sourceanalyzer -b Forty xcodebuild -configuration Debug -sdk iphoneos6.1

输出:

Build settings from command line:
SDKROOT = iphoneos6.1

=== BUILD NATIVE TARGET fortifyTest OF PROJECT fortifyTest WITH CONFIGURATION Debug ===
Check dependencies

ProcessPCH     /var/folders/yp/2l8w2hpd08199zstwqnxnvs80000gp/C/com.apple.Xcode.502/SharedPrecompiledHeaders/fortifyTest-Prefix-gfjvmaafdrnknjehmxvutbaqdpny/fortifyTest-Prefix.pch.pth fortifyTest/fortifyTest-Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/sychram/Repositories/fortifyTest
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:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Applications/HP_Fortify/HP_Fortify_SCA_and_Apps_3.70/bin"
/Users/sychram/.fortify/sca5.14/build/Forty/build717537620538182813/clang -x objective-c-header -arch armv7 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-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 -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -miphoneos-version-min=6.0 -iquote /Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/fortifyTest-generated-files.hmap -I/Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/fortifyTest-own-target-headers.hmap -I/Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/fortifyTest-all-target-headers.hmap -iquote /Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/fortifyTest-project-headers.hmap -I/Users/sychram/Repositories/fortifyTest/build/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/DerivedSources/armv7 -I/Users/sychram/Repositories/fortifyTest/build/fortifyTest.build/Debug-iphoneos/fortifyTest.build/DerivedSources -F/Users/sychram/Repositories/fortifyTest/build/Debug-iphoneos --serialize-diagnostics /var/folders/yp/2l8w2hpd08199zstwqnxnvs80000gp/C/com.apple.Xcode.502/SharedPrecompiledHeaders/fortifyTest-Prefix-gfjvmaafdrnknjehmxvutbaqdpny/fortifyTest-Prefix.pch.dia -c /Users/sychram/Repositories/fortifyTest/fortifyTest/fortifyTest-Prefix.pch -o /var/folders/yp/2l8w2hpd08199zstwqnxnvs80000gp/C/com.apple.Xcode.502/SharedPrecompiledHeaders/fortifyTest-Prefix-gfjvmaafdrnknjehmxvutbaqdpny/fortifyTest-Prefix.pch.pth -MMD -MT dependencies -MF /var/folders/yp/2l8w2hpd08199zstwqnxnvs80000gp/C/com.apple.Xcode.502/SharedPrecompiledHeaders/fortifyTest-Prefix-gfjvmaafdrnknjehmxvutbaqdpny/fortifyTest-Prefix.pch.d
[error]: Translator execution failed.  Please consult the Troubleshooting section of the    User Manual. 
Translator returned status 1:

In file included from /Users/sychram/Repositories/fortifyTest/fortifyTest/fortifyTest-Prefix.pch:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/sys/types.h:78:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/machine/types.h:35:10: fatal error: 'i386/types.h' file not found
#include "i386/types.h"
     ^
1 error generated.
4

2 回答 2

0

在最新版本 3.7 中,fortify 仅支持 AFAIK 的 xcode 版本 4.1、4.2、4.2.1、4.3。

于 2013-02-06T13:15:39.623 回答
0

目前支持带有 SCA 版本 4.02 的 xcode 4.6。但我仍在等待 xcode 5.x 得到 fortify 的支持,我将能够扫描基于 iOS7 的应用程序。因为 2 月份提交到 App Store 的应用程序必须使用最新版本的 Xcode 5 构建,并且必须针对 iOS 7 进行优化。

于 2014-02-26T07:12:23.233 回答