Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link error attempting to build app with Cocoapods using xcodebuild on Jenkins

I'm trying to set up a Jenkins CI instance for our app development project. I have jobs working that run logic and application tests using the Debug configuration but I'm struggling to build the IPA as I get a linkage error during compilation.

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The app uses Cocoapods and I'm building with the Jenkins XCode plugin.

I searched for similar problems and tried/verified a bunch of things:

  • I am using a workspace.
  • I'm running pod install before the xcodebuild step.
  • I've checked that architectures on the project itself, the target and Pods are the same – standard (armv7, armv7s) – as suggested by this answer
  • I tried various solutions from this GitHub thread
  • I tried various settings for Derived Data locations as per this answer and similar ones
  • The Podfile specifies platform :ios, :deployment_target => "6.0"

At that point I'm at a loss for what more to try.

like image 574
Rob Fletcher Avatar asked Aug 05 '13 11:08

Rob Fletcher


1 Answers

The 'Build Output Directory' setting can also cause this.

Changing the value of the 'Build Output Directory' from a relative path to a fully specified path fixed it for me.

E.g. instead of 'MyOutputDirectory' use '/Users/Shared/Jenkins/home/jobs/JenkinsProject/workspace/MyOutputDirectory'

like image 53
Stephanus Mostert Avatar answered Oct 07 '22 09:10

Stephanus Mostert