【问题标题】:MapKit framework linkage error: Reason: no suitable image found. Did find mach-o, but wrong filetypeMapKit 框架链接错误:原因:找不到合适的图像。确实找到了 mach-o,但文件类型错误
【发布时间】:2014-04-02 20:06:02
【问题描述】:

我正在尝试在 Travis 上建立 https://github.com/EvgenyKarkan/EKAlgorithms 存储库。我正在试验这个 repo 的 fork。

在 EKAlgorithmsApp 内部,我有 OS X Cocoa Unit Testing Bundle 测试目标,它在我的本地机器上运行良好。然而,在 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


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

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

【问题讨论】:

    标签: travis-ci


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-03
      • 1970-01-01
      • 1970-01-01
      • 2023-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多