0

我正在尝试为 CI 设置我的第一个 Bot。该机器人成功地从 git 下载了源代码树,但无法构建应用程序(IOS7,模拟器模式),我可以在常规 Xcode 5.0.1 环境中构建和运行它而不会出现任何问题。

特别是 Bot 在 ld 阶段失败(见下面的摘录)。正如我可以从日志文件中建议的那样,ld 找不到定义 CA.. 函数的 QuartzCore 框架。

编译器从框架中找到了所有头文件,因此,乍一看路径配置正常,但 ld 找不到库本身要链接...

我怀疑这是权限或环境设置的一个小错误。你能指点我在哪里挖吗?

提前致谢。

问候, 弗拉基米尔

+++ +++ +++
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Library/Server/Xcode/Data/BotRuns/Cache/c5e74f8f-f2c8-f2c8-9bba-cc3ce564b8fb/DerivedData/Build/Products/Debug-iphonesimulator -F/Library/Server/Xcode/Data/BotRuns/Cache/c5e74f8f-f2c8-f2c8-9bba-cc3ce564b8fb/DerivedData/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Library/Server/Xcode/Data/BotRuns/Cache/c5e74f8f-f2c8-f2c8-9bba-cc3ce564b8fb/DerivedData/Build/Intermediates/SBK.build/Debug-iphonesimulator/SBKTests.build/Objects-normal/i386/SBKTests.LinkFileList -bundle_loader /Library/Server/Xcode/Data/BotRuns/Cache/c5e74f8f-f2c8-f2c8-9bba-cc3ce564b8fb/DerivedData/Build/Products/Debug-iphonesimulator/SBK.app/SBK -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework CoreText -framework SenTestingKit -framework UIKit -framework Foundation -framework CoreData -Xlinker -dependency_info -Xlinker /Library/Server/Xcode/Data/BotRuns/Cache/c5e74f8f-f2c8-f2c8-9bba-cc3ce564b8fb/DerivedData/Build/Intermediates/SBK.build/Debug-iphonesimulator/SBKTests.build/Objects-normal/i386/SBKTests_dependency_info.dat -o /Library/Server/Xcode/Data/BotRuns/Cache/c5e74f8f-f2c8-f2c8-9bba-cc3ce564b8fb/DerivedData/Build/Products/Debug-iphonesimulator/SBKTests.octest/SBKTests Undefined symbols for architecture i386:

"_CATransform3DMakeScale", referenced from:       -[MBSwitch showFillLayer:animated:] in MBSwitch.o

"_CGAffineTransformIdentity", referenced from:       -[TTTAttributedLabel drawTextInRect:] in TTTAttributedLabel.o

"_CGContextAddLineToPoint", referenced from:       -[TTTAttributedLabel drawStrike:inRect:context:] in TTTAttributedLabel.o

    "_CGContextAddPath", referenced from:

. . . . [skip ] . . . .

ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
** TEST FAILED **
The following build commands failed:
Ld /Library/Server/Xcode/Data/BotRuns/Cache/c5e74f8f-f2c8-f2c8-9bba-cc3ce564b8fb/DerivedData/Build/Products/Debug-iphonesimulator/SBKTests.octest/SBKTests normal i386 (1 failure)
+++ +++ +++
4

1 回答 1

5

解决了!

这真是微不足道的问题。

Xcode bot 尝试构建包含在架构中的所有目标。就我而言,这是项目本身和单元测试目标。由于尚未开发测试,因此未编译此目标。但是 bot 试图编译它......所以链接到“主要目标”的所有框架也应该链接到测试目标。

于 2013-11-05T06:29:49.683 回答