1

Getting a link failure when trying to push the latest Ensembles podspec. The spec is unchanged, but Cocoapods was updated to 0.39.0. Xcode no doubt changed too, which is likely the culprit, but I can't interpret the error.

 -> Ensembles (1.4.3)
- ERROR | [Ensembles/Dropbox] xcodebuild: Returned an unsuccessful exit code.
- NOTE  | [Ensembles/Dropbox] xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)
- NOTE  | [iOS] [Ensembles/Dropbox] xcodebuild:  fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/i386/Ensembles (No such file or directory)
- NOTE  | [iOS] [Ensembles/Dropbox] xcodebuild:  error: cannot parse the debug map for "/var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Release-iphonesimulator/Ensembles.framework/Ensembles": No such file or directory

I'm not sure if a link failure is causing the other errors, or that the lipo error is causing the link failure. I can't find any more info about the linker exit failure.

Anyone have any idea what might cause this, and what a solution could be?

Update

I did manage to find what I think is the root error:

Ld /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/x86_64/Ensembles normal x86_64 cd /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/Pods export IPHONEOS_DEPLOYMENT_TARGET=6.0 ... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk -L/var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Release-iphonesimulator -F/var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Release-iphonesimulator -filelist /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/x86_64/Ensembles.LinkFileList -install_name @rpath/Ensembles.framework/Ensembles -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -mios-simulator-version-min=6.0 -Xlinker -objc_abi_version -Xlinker 2 -framework CoreData -fobjc-arc -fobjc-link-runtime -framework CoreData -framework Foundation -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/x86_64/Ensembles_dependency_info.dat -o /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/x86_64/Ensembles ld: warning: embedded dylibs/frameworks only run on iOS 8 or later Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_DBRestClient", referenced from: objc-class-ref in CDEDropboxCloudFileSystem.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

It looks like Cocoapods is trying to create a dynamic library, and that is somehow not working with the oldish Dropbox library for the iPhone simulator architectures. Anyone know of changes in this area, and perhaps a way to prevent Cocoapods using dynamic libraries?

Drew McCormack
  • 3,490
  • 1
  • 19
  • 23
  • all seem like follow-up errors that happen because xcodebuild failed before. Can you run xcodebuild manually / can you show the pod command AND run it verbose? – Daij-Djan Nov 30 '15 at 11:00
  • I did run it verbose, but don't see any errors. Project is here https://github.com/drewmccormack/ensembles It can be tested by issuing `pod lib lint` in the root dir. – Drew McCormack Nov 30 '15 at 18:06

2 Answers2

0

I found the problem: It seems that Cocoapods has started building dynamic frameworks instead of static libraries by default. Apparently linking to the old Dropbox pod I am using was a problem.

To use static libraries instead, you just pass --use-libraries to the pod trunk push or pod lib lint command you are running.

Drew McCormack
  • 3,490
  • 1
  • 19
  • 23
0

pod lib lint command will check the options in *.podspec file. In my case the problem showed like this :

->  MySDK git:(master) ✗ pod lib lint --allow-warnings
 -> MySDK (0.0.1)
    - WARN  | description: The description is shorter than the summary.
    - ERROR | [OSX] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | [OSX] xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)

The [OSX] flag showed that pod lib lint command tried to build a project according your *.podspec file but when building the project in OSX platform something wrong happened.

My solution is add the s.platform = :ios, "5.0" in podspec file.

After that, run pod lib lint everything turned OK.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
lynulzy
  • 561
  • 7
  • 19