Build Failed Right out of box Linker Command failed with exit code 1

I just downloaded WP for iOS and opened it in Xcode. I tried running it on the emulator and got a Build Failed. 45 warnings and 1 error.

The error is Linker command failed with exit code 1
Library not found for -lPods

Thanks for the help.

  • Tyler Postle

    Hey Darren,

    Hope you're doing well today and welcome to the WPMU DEV Community!

    Thanks for mentioning the error you had, would you mind also posting the warnings too? I'm going to call in our WP iOS developer on this, @Jack Kitterhing - he will be able to provide more efficient support on this matter :slight_smile:

    Any further information you can provide on your steps leading up to the error will also be helpful in troubleshooting.

    Have a great rest of your day and talk to you soon Darren.

    All the best,
    Tyler

  • Darren

    Ld /Users/darrenhundt/Library/Developer/Xcode/DerivedData/WordPress-crmktsxvftxgzxgvnrvdrnxzppys/Build/Products/Debug-iphonesimulator/Edublogs.app/Edublogs normal i386
    cd /Users/darrenhundt/Downloads/wp-for-ios/ios/WordPress
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:disappointed:Applications/Xcode.app/Contents/Developer/usr/bin:disappointed:usr/bin:disappointed:bin:disappointed:usr/sbin:disappointed:sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/darrenhundt/Library/Developer/Xcode/DerivedData/WordPress-crmktsxvftxgzxgvnrvdrnxzppys/Build/Products/Debug-iphonesimulator -F/Users/darrenhundt/Library/Developer/Xcode/DerivedData/WordPress-crmktsxvftxgzxgvnrvdrnxzppys/Build/Products/Debug-iphonesimulator -F/Users/darrenhundt/Downloads/wp-for-ios/ios/WordPress/../Pods/google-plus-ios-sdk/google-plus-ios-sdk-1.3.0 -F/Users/darrenhundt/Downloads/wp-for-ios/ios/WordPress/Classes -F/Users/darrenhundt/Downloads/wp-for-ios/ios/WordPress -filelist /Users/darrenhundt/Library/Developer/Xcode/DerivedData/WordPress-crmktsxvftxgzxgvnrvdrnxzppys/Build/Intermediates/WordPress.build/Debug-iphonesimulator/WordPress.build/Objects-normal/i386/Edublogs.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-AFNetworking -lPods-CTidy -lPods-DTCoreText -lPods-DTFoundation -lPods-JSONKit -lPods-MGImageUtilities -lPods-Mixpanel -lPods-NSObject-SafeExpectations -lPods-NSURL+IDN -lPods-Quantcast-Measure -lPods-Reachability -lPods-SFHFKeychainUtils -lPods-SSKeychain -lPods-SVProgressHUD -lPods-UIDeviceIdentifier -lPods-WordPressApi -lPods-google-plus-ios-sdk -lPods-wpxmlrpc -liconv -lsqlite3 -lxml2 -lz -framework Accelerate -framework CoreGraphics -framework CoreTelephony -framework CoreText -framework Foundation -framework GoogleOpenSource -framework GooglePlus -framework ImageIO -framework MediaPlayer -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -weak_framework AdSupport -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework Social -framework MobileCoreServices -framework SystemConfiguration -framework AudioToolbox -framework CoreGraphics -framework UIKit -framework QuartzCore -weak_framework Accounts -framework AddressBook -framework MediaPlayer -framework CoreMedia -framework AVFoundation -lz -framework Foundation -framework Security -framework MapKit -framework CoreLocation -framework CoreData -framework CFNetwork -weak_framework AssetsLibrary -framework MessageUI -liconv -framework ImageIO -lPods -framework Crashlytics -Xlinker -dependency_info -Xlinker /Users/darrenhundt/Library/Developer/Xcode/DerivedData/WordPress-crmktsxvftxgzxgvnrvdrnxzppys/Build/Intermediates/WordPress.build/Debug-iphonesimulator/WordPress.build/Objects-normal/i386/Edublogs_dependency_info.dat -o /Users/darrenhundt/Library/Developer/Xcode/DerivedData/WordPress-crmktsxvftxgzxgvnrvdrnxzppys/Build/Products/Debug-iphonesimulator/Edublogs.app/Edublogs

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

  • Jack Kitterhing

    Hi there @Darren,

    Hope you're well today and thanks for your patience on this.

    Looks like Pods isn't being included in the build.

    Can you check the pods root path in xcode please? To do this, click "pods" > build settings > and where you see "PODS_ROOT" double click that, which should show something like

    ${SRCROOT}/../Pods

    If this all looks good, the issue will be pods isn't being installed, run pods install ( pod install) There's a handy guide on this here http://www.binpress.com/tutorial/cocoapods-dependancy-management-for-xcode/139

    Thanks!

    Kind Regards
    Jack.

  • Darren

    OK. I checked the PODS_ROOT and it was set to ${SRCROOT}/../Pods
    I did run pod install in the directory with the workspace file.
    Here is the output from that.

    Analyzing dependencies

    CocoaPods 0.34.4 is available.
    To update use: sudo gem install cocoapods

    For more information see http://blog.cocoapods.org
    and the CHANGELOG for this version http://git.io/BaH8pQ.

    Downloading dependencies
    Using AFNetworking (1.2.0)
    Using CTidy (0.3.0)
    Using DTCoreText (1.6.10)
    Using DTFoundation (1.6.3)
    Using JSONKit (1.5pre)
    Using MGImageUtilities (0.0.1)
    Using Mixpanel (2.3.2)
    Using NSObject-SafeExpectations (0.0.1)
    Using NSURL+IDN (0.1)
    Using OHHTTPStubs (1.2.2)
    Using Quantcast-Measure (1.4.0)
    Using Reachability (3.0.0)
    Using SFHFKeychainUtils (0.0.1)
    Using SSKeychain (0.2.1)
    Using SVProgressHUD (0.9)
    Using UIDeviceIdentifier (0.1)
    Using WordPressApi (0.0.1)
    Using google-plus-ios-sdk (1.3.0)
    Using wpxmlrpc (0.4)
    Generating Pods project
    Integrating client project

    [!] The WordPress [Debug] target overrides the OTHER_CFLAGS build setting defined in `../Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the $(inherited) flag, or
    - Remove the build settings from the target.

    [!] The WordPress [Release] target overrides the GCC_PREPROCESSOR_DEFINITIONS build setting defined in `../Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the $(inherited) flag, or
    - Remove the build settings from the target.

    [!] The WordPress [Release] target overrides the OTHER_CFLAGS build setting defined in `../Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the $(inherited) flag, or
    - Remove the build settings from the target.

    [!] The WordPress [Distribution] target overrides the OTHER_CFLAGS build setting defined in `../Pods/Target Support Files/Pods/Pods.distribution.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the $(inherited) flag, or
    - Remove the build settings from the target.

    could it be some of these warnings are preventing a good build?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.