Skip to content

Build Failure #94

Closed
Closed

Description

@claytonrcarter

I last pulled and built the project in early April, and it all went fine. This morning I was trying to see if updating my build would fix #86 for me, but I ran into multiple issues while following the instructions at https://github.com/gitx/gitx/wiki/Build-instructions. I just pulled from master and my HEAD is at 241e39c:

$ git pull gitx master                                                                        
From https://github.com/gitx/gitx
 * branch            master     -> FETCH_HEAD
Already up-to-date.
$ git submodule update --init --recursive
$ cd External/objective-git/                                                                  
$ script/bootstrap                                                              
*** Updating submodules...
*** Checking dependencies...
$ script/update_libgit2                                                         
No update needed.
$ cd ../..                                                                      
$ Scripts/build.py build release                                                              master
mvers: 0.15.2298 dev
vers:  0.15.2298
Setting CFBundleShortVersionString of project GitX to:
    0.15.2298 dev.

Updating CFBundleShortVersionString in Info.plist(s)...

Updated CFBundleShortVersionString in "GitX.xcodeproj/../Resources/Info-gitx.plist" to 0.15.2298 dev
Updated CFBundleShortVersionString in "GitX.xcodeproj/../Resources/Info.plist" to 0.15.2298 dev
Setting version of project GitX to:
    0.15.2298.

Also setting CFBundleVersion key (assuming it exists)

Updating CFBundleVersion in Info.plist(s)...

Updated CFBundleVersion in "GitX.xcodeproj/../Resources/Info-gitx.plist" to 0.15.2298
Updated CFBundleVersion in "GitX.xcodeproj/../Resources/Info.plist" to 0.15.2298


** BUILD FAILED **


The following build commands failed:
	CompileXIB Resources/XIBs/PBGitCommitView.xib
(1 failure)
error: Command '['xcrun', 'xcodebuild', '-workspace', 'GitX.xcworkspace', '-scheme', 'GitX', '-configuration', 'Release', 'build', 'BUILD_DIR=/Users/crcarter/Software/Other/GitX/gitx/build']' returned non-zero exit status 65

I have tried the build script again and again, and sometimes I get errors related to CpResource XYZ.pdf where XYZ has been PushTemplate (as below), but I've also seen new_file, RemoteTemplate and, I believe, empty_file)

...
2017-05-02 09:40:40.491 xcodebuild[77184:7324309]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-9523/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/Runtime/PBXTargetBuildContext.mm:739
Details:  unexpected successful exit code from cancelled command <C0038:'CpResource PushTemplate.pdf':P4>
Object:   <PBXTargetBuildContext: 0x7faf4590b860>
Method:   -createCommandInvocationRecordFromInvocation:
Thread:   <NSThread: 0x7faf461ad750>{number = 11, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **


The following build commands failed:
	CompileXIB Resources/XIBs/PBGitCommitView.xib
(1 failure)
error: Command '['xcrun', 'xcodebuild', '-workspace', 'GitX.xcworkspace', '-scheme', 'GitX', '-configuration', 'Release', 'build', 'BUILD_DIR=/Users/crcarter/Software/Other/GitX/gitx/build']' returned non-zero exit status 65

As I said, I was able to build w/o issue last month. Any ideas about what's going on?

Activity

  1. ksuther commented on May 2, 2017

    @ksuther
    Contributor

    Have you tried building the workspace from within Xcode? I've been able to build without any trouble.

  2. claytonrcarter commented on May 3, 2017

    @claytonrcarter
    CollaboratorAuthor

    Ah, thanks. Still failing, but at least it gave me a clue: my Xcode is outdated. I'll update and give it another whirl.

  3. james-rabbit commented on May 16, 2017

    @james-rabbit

    I am stuck on this exact same error with the latest Xcode.

  4. claytonrcarter commented on May 16, 2017

    @claytonrcarter
    CollaboratorAuthor

    I ended up getting it to work. I still had xcode 7, and had to upgrade to Sierra in order to get xcode 8 to install. After that, it built fine.

    ... an OS upgrade just to use gitx ... that's love for you ...

  5. james-rabbit commented on May 16, 2017

    @james-rabbit

    Thanks, unfortunately it didn't work for me.
    I'm using Sierra 10.12.5 and Xcode 8.3.2 but I still have this issue. I wonder what changed for you.

  6. ksuther commented on May 16, 2017

    @ksuther
    Contributor

    What error do you get if you use xcodebuild or build from within Xcode?

  7. james-rabbit commented on May 16, 2017

    @james-rabbit

    I haven't tried those yet, let me see....

    XCode:
    ObjectiveGit-Mac is has a linker error with "Library not found for -lcrypto"

    xcodebuild:
    Same thing,

    Ld build/Release/ObjectiveGit.framework/Versions/A/ObjectiveGit normal x86_64
        cd /Users/james/code/gitx/External/objective-git
        export MACOSX_DEPLOYMENT_TARGET=10.8
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -L/Users/james/code/gitx/External/objective-git/build/Release -L. -LExternal -F/Users/james/code/gitx/External/objective-git/build/Release -filelist /Users/james/code/gitx/External/objective-git/build/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit.LinkFileList -install_name @rpath/ObjectiveGit.framework/ObjectiveGit -Xlinker -rpath -Xlinker @executable_path/../Frameworks -Xlinker -rpath -Xlinker @loader_path/../Frameworks -mmacosx-version-min=10.8 -Xlinker -object_path_lto -Xlinker /Users/james/code/gitx/External/objective-git/build/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit_lto.o -fobjc-arc -fobjc-link-runtime -fapplication-extension -lgit2 -force_load External/libgit2.a /usr/local/lib/libssh2.a -lcrypto -lssl -lcurl -liconv -framework Cocoa -lz -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/james/code/gitx/External/objective-git/build/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit_dependency_info.dat -o /Users/james/code/gitx/External/objective-git/build/Release/ObjectiveGit.framework/Versions/A/ObjectiveGit
    ld: library not found for -lcrypto
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    ** BUILD FAILED **
    
    
    The following build commands failed:
    	Ld build/Release/ObjectiveGit.framework/Versions/A/ObjectiveGit normal x86_64
    (1 failure)
    
  8. ksuther commented on May 16, 2017

    @ksuther
    Contributor

    Take a look at #52, that seems like a similar error.

  9. james-rabbit commented on May 16, 2017

    @james-rabbit

    Thanks that looks to be the same.
    I'll try adding a symlink to openssl in /usr/local/opt/ so it's where Objective-Git expects it.

  10. james-rabbit commented on May 16, 2017

    @james-rabbit

    homebrew installs openssl as keg-only, so I had to do:
    ln -s /usr/local/Cellar/openssl/1.0.2k /usr/local/opt/openssl

    Now building in Xcode works (yay), but the script is still broken the same as before.

  11. tiennou commented on Jul 10, 2017

    @tiennou
    Contributor

    @beporter Relevant issues for your build failure. HTH !

  12. beporter commented on Jul 10, 2017

    @beporter

    Thank you @tiennou. I'd read this thread but totally missed that I too had the ld: library not found for -lcrypto issue since it was buried in Xcode's error output.

    gitx crypto build error

    In order to leave a further breadcrumb for others, here are some notes about my build process:

    I have all my dependencies and build tools installed via MacPorts (yes, I'm old fashioned):

    $ sudo port install openssl python36 py36-pip
    Password:
    [*snip*]
    
    $ sudo port select python python36
    Selecting 'python36' for 'python' succeeded. 'python36' is now active.
    
    $ which python
    /opt/local/bin/python
    
    $ python --version
    Python 3.6.1
    
    $ sudo port select pip pip36
    Selecting 'pip36' for 'pip' succeeded. 'pip36' is now active.
    
    $ which pip
    /opt/local/bin/pip
    
    $ pip --version
    pip 9.0.1 from /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (python 3.6)
    

    Then as the installation wiki notes I installed the argh package:

    $ sudo pip install argh
    [*snip*]
    

    Here's the part that wasn't clear from all the issues I had read. I had to point Xcode to the MacPorts-installed copy of the OpenSSL libraries.

    1. $ open GitX.xcworkspace (Launches the Xcode project.)
    2. Go to View > Navigators > Show Project Navigator
    3. In the sidebar on the left, navigate down the hierarchy through GitX > External Sources and select ObjectGitFramework.xcodeproj.
    4. In the center pane, click the non-button towards the top labeled Build Settings.
    5. Scroll down to the Search Paths section.
    6. Change the Library Search Paths setting and add the following path: /opt/local/lib.
    7. From the menu, select Product > Build For... > Running.
    8. Assuming that succeeds, the binary should be in /Users/$USER/Library/Developer/Xcode/DerivedData/GitX-somethingsomething/Build/Products/Debug/.

    I hereby release any and all all rights to the content in this post in the hope that it can be somehow integrated into the Build Instructions to help others.

  13. millerdev commented on Jul 4, 2018

    @millerdev

    Had the same error library not found for -lcrypto output from

    xcrun xcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release build BUILD_DIR=build
    

    Here's a slightly easier workaround for building with MacPorts-installed dependencies that is more compatible with the command-line build instructions (no need to open Xcode):

    sudo mkdir -p /usr/local/opt/openssl
    sudo ln -s /opt/local/lib /usr/local/opt/openssl/lib
    
    Scripts/build.py build release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions