MapKit框架链接错误:原因:找不到合适的图像。找到mach-o,但文件类型错误

时间:2014-04-02 11:15:34

标签: travis-ci

我正在尝试设置要在Travis上构建的https://github.com/EvgenyKarkan/EKAlgorithms存储库。我正在试验这个回购的分支。

在EKAlgorithmsApp内部我有OS X可可单元测试捆绑测试目标,它在我的本地机器上运行得非常好。但是在Travis上,我看到了一个奇怪的错误消息,它阻止了项目的成功构建:

2014-04-01 14:08:55.287 xctest[1551:303] The test bundle at /Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest could not be loaded because an unanticipated error occurred: Error Domain=NSCocoaErrorDomain Code=3587 "The bundle “EKAlgorithmsSpecs.xctest” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs): Library not loaded: /System/Library/Frameworks/MapKit.framework/Versions/A/MapKit

Referenced from: /Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs

Reason: no suitable image found. Did find:

/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/MapKit.framework/Versions/A/MapKit: mach-o, but wrong filetype) UserInfo=0x100402870 {NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs, NSDebugDescription=dlopen_preflight(/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs): Library not loaded: /System/Library/Frameworks/MapKit.framework/Versions/A/MapKit

Referenced from: /Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs

Reason: no suitable image found. Did find:

/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/MapKit.framework/Versions/A/MapKit: mach-o, but wrong filetype, NSBundlePath=/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest, NSLocalizedDescription=The bundle “EKAlgorithmsSpecs.xctest” couldn’t be loaded because it is damaged or missing necessary resources.}

2014-04-01 14:08:55.295 xctest[1553:203] *** NSTask: Task create for path '/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs' failed: 22, "Invalid argument". Terminating temporary process.

** TEST SUCCEEDED **

The command "make ci" exited with 0.

Done. Your build exited with 0.

这是最后一个构建日志之一 - 底部出现此错误。

https://travis-ci.org/stanislaw/EKAlgorithms/builds/22054216#L751


我尝试按照类似主题What leads to a no suitable image found error on Mac OS X?中的建议设置ARCHPREFERENCE=x86_64,但仍然出现错误但有点不同:

2014-04-02 04:10:15.680 xctest[1530:303] The test bundle at /Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest could not be loaded because an unanticipated error occurred: Error Domain=NSCocoaErrorDomain Code=3587 "The bundle “EKAlgorithmsSpecs.xctest” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs): Library not loaded: /System/Library/Frameworks/MapKit.framework/Versions/A/MapKit

Referenced from: /Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs

Reason: image not found) UserInfo=0x10010caa0 {NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs, NSDebugDescription=dlopen_preflight(/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs): Library not loaded: /System/Library/Frameworks/MapKit.framework/Versions/A/MapKit

Referenced from: /Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs

Reason: image not found, NSBundlePath=/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest, NSLocalizedDescription=The bundle “EKAlgorithmsSpecs.xctest” couldn’t be loaded because it is damaged or missing necessary resources.}

2014-04-02 04:10:15.688 xctest[1532:203] *** NSTask: Task create for path '/Users/travis/Library/Developer/Xcode/DerivedData/EKAlgorithmsApp-gsexyadvxwaizwcyfyqalajrgzrr/Build/Products/Debug/EKAlgorithmsSpecs.xctest/Contents/MacOS/EKAlgorithmsSpecs' failed: 22, "Invalid argument". Terminating temporary process.

** TEST SUCCEEDED **

以下是此备选方案的构建日志:https://travis-ci.org/stanislaw/EKAlgorithms/builds/22094380#L743

1 个答案:

答案 0 :(得分:0)

我找到了答案:事实上Travis构建的机器还不支持Mac OS X 10.9。目前它们是10.8.5,但列出了10.9个SDK - 这就是我混淆的原因。