Xcode 7 - 在attempt_symlinks阶段构建框架失败

时间:2015-09-21 19:05:43

标签: ios objective-c xcode

更新到Xcode后运行到此7.从命令行和Xcode本身构建静态框架并收到以下错误:

UFW (M iphoneos): INFO: Cmd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Products/Debug-iphoneos -filelist /Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Objects-normal/armv7/SDK_I_AM_BUILDING.LinkFileList -o /Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Objects-normal/armv7/SDK_I_AM_BUILDING.ufwbuild
UFW (M iphoneos): INFO: Cmd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only arm64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Products/Debug-iphoneos -filelist /Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Objects-normal/arm64/SDK_I_AM_BUILDING.LinkFileList -o /Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Objects-normal/arm64/SDK_I_AM_BUILDING.ufwbuild
UFW (M iphoneos): INFO: Cmd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static /Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Objects-normal/armv7/SDK_I_AM_BUILDING.ufwbuild /Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Objects-normal/arm64/SDK_I_AM_BUILDING.ufwbuild -o /Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Products/Debug-iphoneos/SDK_I_AM_BUILDING.framework/SDK_I_AM_BUILDING
UFW (M iphoneos): ERROR: Build failed
Traceback (most recent call last):
  File "/Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Script-0BCB59941B65EF6A005216E2.sh", line 812, in <module>
    run_build()
  File "/Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Script-0BCB59941B65EF6A005216E2.sh", line 787, in run_build
    add_symlinks_to_framework(project)
  File "/Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Script-0BCB59941B65EF6A005216E2.sh", line 675, in add_symlinks_to_framework
    attempt_symlink(os.path.join(base_dir, "Versions", "Current"), os.environ['FRAMEWORK_VERSION'])
  File "/Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Intermediates/SDK_I_AM_BUILDING.build/Debug-iphoneos/SDK_I_AM_BUILDING.build/Script-0BCB59941B65EF6A005216E2.sh", line 493, in attempt_symlink
    os.stat(os.path.abspath(os.path.join(link_path, "..", link_to)))
OSError: [Errno 2] No such file or directory: '/Users/ME/Library/Developer/Xcode/DerivedData/SDK_I_AM_BUILDING-bkuozmamressjqcrnhntirossihk/Build/Products/Debug-iphoneos/SDK_I_AM_BUILDING.framework/Versions/A'
Command /bin/sh failed with exit code 1

这似乎是have been an issue previously with framework that were using iOS-Universal-Framework,但由于我们没有使用它,而且这个问题是由Xcode 7的更新引入的,我认为这不是我的问题的一部分。

有没有人遇到过Xcode 7这个问题了吗?有关此类问题的进一步调试的提示吗?

1 个答案:

答案 0 :(得分:0)

这似乎是Xcode 6框架项目在更新到Xcode 7时无法正确更新的问题。

我的团队成员创建了一个新的Xcode 7静态框架项目,并复制了现有项目中的所有内容。然后,他们对两个project.pbxproj文件进行了区分,并将所有相关更改复制到现有项目中。

有很多变化因此在这里发布所有内容并不简单。如果您遇到此问题,我建议您完成上述过程。