Skip to content

failures building with xcode 13.2.1  #239

Closed

Description

@stepheneb
$ python3 Scripts/build.py debug
Building scheme GitX (debug), please wait…
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:x86_64, id:814000F5-DD10-5CC1-8C15-8F62969B6571 }
{ platform:macOS, name:Any Mac }
** BUILD FAILED **


The following build commands failed:
	Ld /Users/stephen/dev/macos/gitx/build/Debug/ObjectiveGit.framework/Versions/A/ObjectiveGit normal (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
(1 failure)
Traceback (most recent call last):
  File "/Users/stephen/dev/macos/gitx/Scripts/helpers.py", line 50, in xcodebuild
    output = check_string_output(cmd)
  File "/Users/stephen/dev/macos/gitx/Scripts/helpers.py", line 22, in check_string_output
    return subprocess.check_output(command).decode('utf-8').strip()
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xcrun', 'xcodebuild', '-workspace', 'GitX.xcworkspace', '-scheme', 'GitX', '-configuration', 'Debug', 'build', 'BUILD_DIR=/Users/stephen/dev/macos/gitx/build']' returned non-zero exit status 65.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/stephen/dev/macos/gitx/Scripts/build.py", line 40, in <module>
    args.func(args)
  File "/Users/stephen/dev/macos/gitx/Scripts/build.py", line 31, in build_cmd
    build(project)
  File "/Users/stephen/dev/macos/gitx/Scripts/build.py", line 14, in build
    helpers.xcodebuild(project.scheme(), project.workspace(), project.current_build_config(), ["build"], project.build_base_dir())
  File "/Users/stephen/dev/macos/gitx/Scripts/helpers.py", line 53, in xcodebuild
    raise BuildError(str(e))
helpers.BuildError: Command '['xcrun', 'xcodebuild', '-workspace', 'GitX.xcworkspace', '-scheme', 'GitX', '-configuration', 'Debug', 'build', 'BUILD_DIR=/Users/stephen/dev/macos/gitx/build']' returned non-zero exit status 65.

Activity

  1. stepheneb commented on Jan 9, 2022

    @stepheneb
    ContributorAuthor

    At least some of the issues seem to relate to unsupported MACOSX_DEPLOYMENT_TARGET values. Here's some testing running in a github action on Xcode 12.4 -- this workflow based on BuildPR.yml
    https://github.com/stepheneb/gitx/blob/macos-release/.github/workflows/macos-release.yml

    The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.8, but the range of supported deployment target versions is 10.9 to 11.1.99. (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')

    instances of MACOSX_DEPLOYMENT_TARGET values throughout project

    $ ack MACOSX_DEPLOYMENT_TARGET
    GitX.xcodeproj/project.pbxproj
    1731:				MACOSX_DEPLOYMENT_TARGET = 10.11;
    1751:				MACOSX_DEPLOYMENT_TARGET = 10.11;
    1801:				MACOSX_DEPLOYMENT_TARGET = 10.11;
    1849:				MACOSX_DEPLOYMENT_TARGET = 10.11;
    
    External/objective-git/Carthage/Checkouts/Quick/Quick.xcodeproj/project.pbxproj
    2136:				MACOSX_DEPLOYMENT_TARGET = 10.10;
    2156:				MACOSX_DEPLOYMENT_TARGET = 10.10;
    2283:				MACOSX_DEPLOYMENT_TARGET = 10.10;
    2303:				MACOSX_DEPLOYMENT_TARGET = 10.10;
    2406:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    2459:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    2486:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    2513:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    2539:				MACOSX_DEPLOYMENT_TARGET = 10.10;
    2559:				MACOSX_DEPLOYMENT_TARGET = 10.10;
    
    External/objective-git/Carthage/Checkouts/Quick/Externals/Nimble/Nimble.xcodeproj/project.pbxproj
    1794:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    1850:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    
    External/objective-git/Carthage/Checkouts/ZipArchive/ObjectiveCExample/ObjectiveCExample.xcodeproj/project.pbxproj
    856:				MACOSX_DEPLOYMENT_TARGET = 10.8;
    908:				MACOSX_DEPLOYMENT_TARGET = 10.8;
    
    External/objective-git/Carthage/Checkouts/ZipArchive/ZipArchive.xcodeproj/project.pbxproj
    818:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    840:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    
    External/objective-git/Carthage/Checkouts/Nimble/Nimble.xcodeproj/project.pbxproj
    1840:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    1898:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    
    External/objective-git/script/ios_build_functions.sh
    22:    MACOSX_DEPLOYMENT_TARGET=""
    
    External/objective-git/ObjectiveGitFramework.xcodeproj/project.pbxproj
    1763:				MACOSX_DEPLOYMENT_TARGET = 10.8;
    1802:				MACOSX_DEPLOYMENT_TARGET = 10.8;
    1883:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    1904:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    1935:				MACOSX_DEPLOYMENT_TARGET = 10.8;
    1992:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    2155:				MACOSX_DEPLOYMENT_TARGET = 10.8;
    2212:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    
    External/MAKVONotificationCenter/MAKVONotificationCenter.xcodeproj/project.pbxproj
    494:				MACOSX_DEPLOYMENT_TARGET = 10.7;
    507:				MACOSX_DEPLOYMENT_TARGET = 10.7;
    
    External/MGScopeBar/MGScopeBar.xcodeproj/project.pbxproj
    361:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    391:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    414:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    433:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    473:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    509:				MACOSX_DEPLOYMENT_TARGET = 10.9;
    
    External/Sparkle/Configurations/ConfigUnitTest.xcconfig
    12:MACOSX_DEPLOYMENT_TARGET = 10.9
    
    External/Sparkle/Configurations/ConfigGenerateAppcast.xcconfig
    6:MACOSX_DEPLOYMENT_TARGET = 10.11
    
    External/Sparkle/Configurations/ConfigUITest.xcconfig
    7:MACOSX_DEPLOYMENT_TARGET = 10.11
    
    External/Sparkle/Configurations/ConfigCommon.xcconfig
    29:MACOSX_DEPLOYMENT_TARGET = 10.9
    
    External/Sparkle/Configurations/ConfigGenerateKeys.xcconfig
    6:MACOSX_DEPLOYMENT_TARGET = 10.11
    
    External/Sparkle/Sparkle/Autoupdate/Autoupdate-Info.plist
    24:	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
    
  2. hannesa2 commented on Jan 9, 2022

    @hannesa2
    Contributor

    I see the CI is broken on changes runner setup. I currently try to make it run again https://github.com/hannesa2/gitx/runs/4751937533?check_suite_focus=true but till now, I failed

  3. hannesa2 commented on Jan 9, 2022

    @hannesa2
    Contributor

    But at time of merge, it was working

  4. hannesa2 commented on Jan 9, 2022

    @hannesa2
    Contributor

    If you find/solve the root cause, please make a pull request

  5. stepheneb commented on Jan 9, 2022

    @stepheneb
    ContributorAuthor

    I tried a few things and haven't solved the problem.

    Tried running the workflow after each of these commits in my master branch:
    stepheneb/gitx@f642edc...ba7482f

    At the beginning of the Build Project step in the runner I'm still getting this error ... hmmm

        The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.8, but the range of supported deployment target versions is 10.9 to 11.1.99. (in target 'libgit2' from project 'ObjectiveGitFramework')
    ▸ Running script 'libgit2'
    
  6. hannesa2 commented on Jan 9, 2022

    @hannesa2
    Contributor

    I tried few things as well and I've an additional challenge, because I use a M1, so I moved back to my old x86 mac....

    First I tried to build current master, which built in the past. But in the meantime I updated locally macOS to 12 Monterey, XCode, brew openssl, ....

    Building gitx on master is failing, so I tried to build in advance submodule objective-git master branch (it was working in the past gitx/objective-git#17) but here I run

    • locally on my x86 into

    image

    image

    I've still no clue what's wrong here ....

  7. janeklb commented on Jan 17, 2022

    @janeklb

    Trying this out too. My progress so far on a MBP 2019 w/ Monterey 12.1 + latest xcode 12.3.1:

    • attempting build with python Scripts/build release
    • output has error similar to @stepheneb reported in first first post:
      ...
      helpers.BuildError: Command '['xcrun', 'xcodebuild', '-workspace', 'GitX.xcworkspace', '-scheme', 'GitX', '-configuration', 'Debug', 'build', 'BUILD_DIR=/Users/stephen/dev/macos/gitx/build']' returned non-zero exit status 65.
      
    • Tried executing that command directly:
      xcrun xcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release build BUILD_DIR=/Users/janeklb/git/gitx/gitx/build
      
    • This provides more output.. i now saw the MACOSX_DEPLOYMENT_TARGET errors:
      /Users/janeklb/git/gitx/gitx/External/objective-git/ObjectiveGitFramework.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.8, but the range of supported deployment target versions is 10.9 to 12.2. (in target 'libgit2' from project 'ObjectiveGitFramework')
      /Users/janeklb/git/gitx/gitx/External/objective-git/ObjectiveGitFramework.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.8, but the range of supported deployment target versions is 10.9 to 12.2. (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
      ** BUILD FAILED **
      
    • Updated all MACOSX_DEPLOYMENT_TARGET to 10.12 inside External/objective-git/ObjectiveGitFramework.xcodeproj/project.pbxproj (not sure if this is the right thing to do.. im just taking a shot in the dark)
    • Ran xcrun xcodebuild ... again
    • Failed again, this time with the following error (had to to combing through the output as most of it was seemingly normal)
      ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
      ld: warning: directory not found for option '-L/Users/janeklb/git/gitx/gitx/External/objective-git/External/build/lib'
      ld: library not found for -lcrypto
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      
  8. janeklb commented on Jan 17, 2022

    @janeklb

    Further findings:

    • I do have /usr/local/opt/[email protected]/lib
    • not sure how to produce a ./External/objective-git/External/build/lib directory (need to build objective-git?)
    • not sure where crypto is supposed to come from (from the library not found for -lcrypto message)

    Also tried using the GH actions BuildPR manifest (using the updated MACOS_DEPLOYMENT_TARGET values etc.) and had very similar result:

    ...
    ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
    ld: warning: directory not found for option '-L/Users/janeklb/git/gitx/gitx/External/objective-git/External/build/lib'
    ld: library not found for -lcrypto
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    ** ARCHIVE FAILED **
    
    
    The following build commands failed:
    	Ld /Users/janeklb/Library/Developer/Xcode/DerivedData/GitX-aqlqktsdnvbaaafnhydtdvkmtcll/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/UninstalledProducts/macosx/ObjectiveGit.framework/Versions/A/ObjectiveGit normal (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
    
  9. hannesa2 commented on Jan 18, 2022

    @hannesa2
    Contributor

    Unfortunately on CI there is no XCode 13.2.1
    image
    https://github.com/gitx/gitx/runs/4849764516?check_suite_focus=true

    In my point of view a build with python3 Scripts/build.py is obsolete.
    Please have a look to https://github.com/gitx/gitx/blob/master/.github/workflows/BuildPR.yml#L26-L28 to see how to build without python.

    Btw, on Jan 24.2022 there will be here a change to 13.2.1 as default actions/runner-images#4800

  10. hannesa2 commented on Jan 18, 2022

    @hannesa2
    Contributor
    • Updated all MACOSX_DEPLOYMENT_TARGET to 10.12 inside External/objective-git/ObjectiveGitFramework.xcodeproj/project.pbxproj (not sure if this is the right thing to do.. im just taking a shot in the dark)

    @janeklb There is no need for a shot in the dark. I fixed the CI, that's why you can create a pull request and see if it build

    Btw, I bump target to 10.9 #238 and #243

  11. justincbeck commented on Jan 18, 2022

    @justincbeck

    Thanks for all your hard work on this. Two questions:

    • Are the wiki build instructions up to date? I am unable to build this following those after this patch.
    • Why does the CI build not produce artifacts? Seems like it's successfully building.

    Thanks again... You guys rock.

  12. hannesa2 commented on Jan 18, 2022

    @hannesa2
    Contributor
    • Are the wiki build instructions up to date? I am unable to build this following those after this patch.

    Sorry I don't know

    • Why does the CI build not produce artifacts? Seems like it's successfully building.

    To be honest it's close to a must have and I would love to have a dmg file on each release/pull request but the thing is the signing and currently I don't have an apple account. Ok, this all can be fixed, but it's related to the future.
    If you are able to solve this (or parts), please feel free to make a pull request.

  13. justincbeck commented on Jan 18, 2022

    @justincbeck
    • Are the wiki build instructions up to date? I am unable to build this following those after this patch.

    Sorry I don't know

    • Why does the CI build not produce artifacts? Seems like it's successfully building.

    To be honest it's close to a must have and I would love to have a dmg file on each release/pull request but the thing is the signing and currently I don't have an apple account. Ok, this all can be fixed, but it's related to the future. If you are able to solve this (or parts), please feel free to make a pull request.

    FWIW, I also tried (just not very hard) to follow the build file but it still fails that way too. Thanks for responding, if I can make some time I'll see if I can get the CI build to produce artifacts.

  14. hannesa2 commented on Jan 18, 2022

    @hannesa2
    Contributor

    In short, this should work

    git clone [email protected]:gitx/gitx.git
    cd gitx
    git submodule update --init --recursive
    cd External/objective-git && script/bootstrap && script/update_libgit2 && cd ../..
    xcodebuild -workspace GitX.xcworkspace -scheme GitX archive
    
  15. justincbeck commented on Jan 18, 2022

    @justincbeck

    Further findings:

    • I do have /usr/local/opt/[email protected]/lib
    • not sure how to produce a ./External/objective-git/External/build/lib directory (need to build objective-git?)
    • not sure where crypto is supposed to come from (from the library not found for -lcrypto message)

    Also tried using the GH actions BuildPR manifest (using the updated MACOS_DEPLOYMENT_TARGET values etc.) and had very similar result:

    ...
    ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
    ld: warning: directory not found for option '-L/Users/janeklb/git/gitx/gitx/External/objective-git/External/build/lib'
    ld: library not found for -lcrypto
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    ** ARCHIVE FAILED **
    
    
    The following build commands failed:
    	Ld /Users/janeklb/Library/Developer/Xcode/DerivedData/GitX-aqlqktsdnvbaaafnhydtdvkmtcll/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/UninstalledProducts/macosx/ObjectiveGit.framework/Versions/A/ObjectiveGit normal (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
    

    I am stuck here as well in case you made any progress.

  16. 23 remaining items

  17. stepheneb commented on Feb 7, 2022

    @stepheneb
    ContributorAuthor

    I'm running macos 11.6.3.

    $ xcodebuild -version
    Xcode 13.2.1
    Build version 13C100
    

    Just cloned and started a build using these commands

    git clone [email protected]:gitx/gitx.git && cd gitx && git submodule update --init --recursive
    cd External/objective-git && script/bootstrap && script/update_libgit2 && cd ../.. && xcodebuild -workspace GitX.xcworkspace -scheme GitX archive
    

    Ended with this failure:

    Ld /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-gztcjdzogxtmztbbmlvbjuuolufh/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/UninstalledProducts/macosx/ObjectiveGit.framework/Versions/A/ObjectiveGit normal (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
        cd /Users/stephen/dev/temp/gitx/External/objective-git
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.9 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -L/Users/stephen/Library/Developer/Xcode/DerivedData/GitX-gztcjdzogxtmztbbmlvbjuuolufh/Build/Intermediates.noindex/ArchiveIntermediates/GitX/BuildProductsPath/Release -L. -LExternal -L/usr/local/opt/openssl/lib -L/Users/stephen/dev/temp/gitx/External/objective-git/External/build/lib -F/Users/stephen/Library/Developer/Xcode/DerivedData/GitX-gztcjdzogxtmztbbmlvbjuuolufh/Build/Intermediates.noindex/ArchiveIntermediates/GitX/BuildProductsPath/Release -filelist /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-gztcjdzogxtmztbbmlvbjuuolufh/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit.LinkFileList -install_name @rpath/ObjectiveGit.framework/ObjectiveGit -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../Frameworks -Xlinker -object_path_lto -Xlinker /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-gztcjdzogxtmztbbmlvbjuuolufh/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/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 -lz -liconv -lgit2 -framework Cocoa -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-gztcjdzogxtmztbbmlvbjuuolufh/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit_dependency_info.dat -o /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-gztcjdzogxtmztbbmlvbjuuolufh/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/UninstalledProducts/macosx/ObjectiveGit.framework/Versions/A/ObjectiveGit
    ld: warning: directory not found for option '-L/Users/stephen/dev/temp/gitx/External/objective-git/External/build/lib'
    ld: warning: dylib (/usr/local/opt/openssl/lib/libcrypto.dylib) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: dylib (/usr/local/opt/openssl/lib/libssl.dylib) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: linking against a dylib which is not safe for use in application extensions: /usr/local/opt/openssl/lib/libcrypto.dylib
    ld: warning: linking against a dylib which is not safe for use in application extensions: /usr/local/opt/openssl/lib/libssl.dylib
    ld: warning: object file (/usr/local/lib/libssh2.a(agent.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(channel.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(global.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(hostkey.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(session.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(userauth.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(misc.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(openssl.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(kex.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(packet.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(transport.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(keepalive.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(comp.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(mac.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(pem.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(bcrypt_pbkdf.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(crypt.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(blowfish.o)) was built for newer macOS version (11.0) than being linked (10.9)
    Undefined symbols for architecture x86_64:
      "_EVP_PKEY_id", referenced from:
          __libssh2_ed25519_new_private_frommemory in libssh2.a(openssl.o)
          __libssh2_pub_priv_keyfile in libssh2.a(openssl.o)
          __libssh2_pub_priv_keyfilememory in libssh2.a(openssl.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    ** ARCHIVE FAILED **
    
    
    The following build commands failed:
    	Ld /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-gztcjdzogxtmztbbmlvbjuuolufh/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/UninstalledProducts/macosx/ObjectiveGit.framework/Versions/A/ObjectiveGit normal (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
    (1 failure)
    
  18. hannesa2 commented on Feb 7, 2022

    @hannesa2
    Contributor

    Thanks to @claytonrcarter we have now artifacts for x86 build on CI. #256
    Even with Xcode 13.2.1 , but we don't know why it's not working locally. Any ideas ?

  19. claytonrcarter commented on Feb 7, 2022

    @claytonrcarter
    Collaborator

    The prebuilt binaries aren't perfect, but they'll do in a pinch. (They're x86 only ATM, sorry)

    To use them, go to https://github.com/gitx/gitx/actions?query=branch%3Amaster and click on the first workflow run, at the top of the list, to open the summary of that run. Now look for the section (near bottom of page) for the "Artifacts" and select which ever one you want. It will download a zip which extracts a dmg which contains the app. 🙄 You'll have to option+click and select "Open" to force it to open.

  20. janeklb commented on Feb 7, 2022

    @janeklb

    Thanks to @claytonrcarter we have now artifacts for x86 build on CI. #256 Even with Xcode 13.2.1 , but we don't know why it's not working locally. Any ideas ?

    I'm fresh out of ideas, but im not convinced that it's an Xcode 13.2.1 issue anymore. Has anyone had any success building it with an older version of Xcode?

  21. janeklb commented on Feb 7, 2022

    @janeklb

    @claytonrcarter the binaries produced by your changes are working for me too!

    I noticed some interesting stuff though.. dunno what / why, but leaving it here as it seemed interesting

    • The "old" version has a significantly larger filesize (this might be totally expected given some optimisations, or some dependencies that were removed since the last binary was published.. which seems like 2018)
    • The old version has a newer version number 0.16... vs 0.13 in the newly published version
      image
  22. hannesa2 commented on Feb 8, 2022

    @hannesa2
    Contributor

    Indeed it's suspect, I guess it's somehow related to
    image

    To avoid this, I created #257

  23. claytonrcarter commented on Feb 8, 2022

    @claytonrcarter
    Collaborator

    Can someone help me reproduce some things?

    • Can you try building via the Xcode GUI?
      • I just tried and it was able to build successfully, both the Debug and Release configurations.
    • Can you run sudo xcode-select -r ; sudo xcode-select -s /Applications/Xcode.app (or whereever your Xcode 13.2.1 is installed)
      • After doing this, I was able to successfully run both xcodebuild ... archive and xcodebuild ... build
      • I may have had to run xcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release clean, but I forget
      • I was not able to run xcodebuild ... build BUILD_DIR=./build
      • This worked: xcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release archive
      • This worked: xcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release build
      • This did not: xcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release build BUILD_DIR=./build

    I'm just fumbling in the dark when it comes to Xcode, but CI is succeeding w/o fail and the only thing that it appears to be doing differently is running xcode-select -s .... Perhaps that's the magic word we've been looking for?

  24. stepheneb commented on Feb 8, 2022

    @stepheneb
    ContributorAuthor

    @claytonrcarter

    Am also an infrequent user of xxcode. I just pulled master and opened GitX.xcodeproj in xcode 13.2.1 on macos 11.6.3

    Selected Product > Build for running and got an Undefined symbols for architecture x86_64: "_EVP_PKEY_id", building objective-git.

    Maybe related to: usr/local/opt/openssl/lib/libssl.dylib) was built for newer macOS version (11.0) than being linked (10.9) ???

    Ld /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-hcptuxstkjbjdcaidxwypxfeqcny/Build/Products/Debug/ObjectiveGit.framework/Versions/A/ObjectiveGit normal (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
        cd /Users/stephen/dev/macos/gitx/External/objective-git
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.9 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -L/Users/stephen/Library/Developer/Xcode/DerivedData/GitX-hcptuxstkjbjdcaidxwypxfeqcny/Build/Products/Debug -L. -LExternal -L/usr/local/opt/openssl/lib -L/Users/stephen/dev/macos/gitx/External/objective-git/External/build/lib -F/Users/stephen/Library/Developer/Xcode/DerivedData/GitX-hcptuxstkjbjdcaidxwypxfeqcny/Build/Products/Debug -filelist /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-hcptuxstkjbjdcaidxwypxfeqcny/Build/Intermediates.noindex/ObjectiveGitFramework.build/Debug/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit.LinkFileList -install_name @rpath/ObjectiveGit.framework/ObjectiveGit -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../Frameworks -Xlinker -object_path_lto -Xlinker /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-hcptuxstkjbjdcaidxwypxfeqcny/Build/Intermediates.noindex/ObjectiveGitFramework.build/Debug/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -fapplication-extension -lgit2 -force_load External/libgit2.a /usr/local/lib/libssh2.a -lcrypto -lssl -lcurl -lz -liconv -lgit2 -framework Cocoa -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-hcptuxstkjbjdcaidxwypxfeqcny/Build/Intermediates.noindex/ObjectiveGitFramework.build/Debug/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit_dependency_info.dat -o /Users/stephen/Library/Developer/Xcode/DerivedData/GitX-hcptuxstkjbjdcaidxwypxfeqcny/Build/Products/Debug/ObjectiveGit.framework/Versions/A/ObjectiveGit
    
    ld: warning: directory not found for option '-L/Users/stephen/dev/macos/gitx/External/objective-git/External/build/lib'
    ld: warning: dylib (/usr/local/opt/openssl/lib/libcrypto.dylib) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: dylib (/usr/local/opt/openssl/lib/libssl.dylib) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: linking against a dylib which is not safe for use in application extensions: /usr/local/opt/openssl/lib/libcrypto.dylib
    ld: warning: linking against a dylib which is not safe for use in application extensions: /usr/local/opt/openssl/lib/libssl.dylib
    ld: warning: object file (/usr/local/lib/libssh2.a(agent.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(channel.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(global.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(hostkey.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(session.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(userauth.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(misc.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(openssl.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(kex.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(packet.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(transport.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(keepalive.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(comp.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(mac.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(pem.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(bcrypt_pbkdf.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(crypt.o)) was built for newer macOS version (11.0) than being linked (10.9)
    ld: warning: object file (/usr/local/lib/libssh2.a(blowfish.o)) was built for newer macOS version (11.0) than being linked (10.9)
    Undefined symbols for architecture x86_64:
      "_EVP_PKEY_id", referenced from:
          __libssh2_ed25519_new_private_frommemory in libssh2.a(openssl.o)
          __libssh2_pub_priv_keyfile in libssh2.a(openssl.o)
          __libssh2_pub_priv_keyfilememory in libssh2.a(openssl.o)
    ld: symbol(s) not found for architecture x86_64
    
  25. claytonrcarter commented on Feb 8, 2022

    @claytonrcarter
    Collaborator

    Again, a grain of salt is needed for all for these comments, but what version of libssh2 do you have installed? The Undefined symbols for architecture x86_64 message makes me wonder if there's a version mismatch. For me, it looks like 1.10.0 is installed:

    ❯ ls -l /usr/local/lib/libssh2.a
    lrwxr-xr-x  1 crcarter  admin  38 Sep  8 21:59 /usr/local/lib/libssh2.a -> ../Cellar/libssh2/1.10.0/lib/libssh2.a
    
  26. stepheneb commented on Feb 8, 2022

    @stepheneb
    ContributorAuthor

    Appears to be the same which is part of /usr/local/Cellar/libssh2/1.10.0

    $  ls -l /usr/local/lib/libssh2.a
    lrwxr-xr-x  1 stephen  admin  38 Sep 27 11:18 /usr/local/lib/libssh2.a -> ../Cellar/libssh2/1.10.0/lib/libssh2.a
    

    Hmmm ... in the xcode error log above I just noticed it starts with references to: /usr/local/opt/openssl which is linked to openssl@3

    $ ls -l /usr/local/opt/openssl
    lrwxr-xr-x  1 stephen  admin  25 Dec 29 16:55 /usr/local/opt/openssl -> ../Cellar/openssl@3/3.0.1
    

    I have both installed:

    $ ls -l /usr/local/opt/opens*
    lrwxr-xr-x  1 stephen  admin  25 Dec 29 16:55 /usr/local/opt/openssl -> ../Cellar/openssl@3/3.0.1
    lrwxr-xr-x  1 stephen  admin  28 Dec 29 16:53 /usr/local/opt/[email protected] -> ../Cellar/[email protected]/1.1.1m
    lrwxr-xr-x  1 stephen  admin  25 Dec 29 16:55 /usr/local/opt/openssl@3 -> ../Cellar/openssl@3/3.0.1
    
  27. claytonrcarter commented on Feb 8, 2022

    @claytonrcarter
    Collaborator

    Hmm, so maybe it's a mismatch between the openssl dependency of libssh, not a problem w/ libssh itself. For me, /usr/local/opt/openssl is pointing to 1.1.

    ❯ ls -l /usr/local/opt/opens*
    lrwxr-xr-x  1 crcarter  admin  28 Jan 15 08:46 /usr/local/opt/openssl -> ../Cellar/[email protected]/1.1.1m
    lrwxr-xr-x  1 crcarter  admin  31 Aug  4  2021 /usr/local/opt/[email protected] -> ../Cellar/[email protected]/1.0.2t
    lrwxr-xr-x  1 crcarter  admin  28 Jan 15 08:46 /usr/local/opt/[email protected] -> ../Cellar/[email protected]/1.1.1m
    

    I hesitate to suggest having brew link to [email protected] for fear it could break something else on your system, though.

  28. stepheneb commented on Feb 8, 2022

    @stepheneb
    ContributorAuthor

    Building succeeded adding LDFLAGS="-L/usr/local/opt/[email protected]/lib" to the ObjectiveGit.framework target build settings.

    image

  29. changed the title [-]faiilures building with xcode 13.2.1 [/-] [+]failures building with xcode 13.2.1 [/+] on Feb 12, 2022
  30. hannesa2 commented on Feb 12, 2022

    @hannesa2
    Contributor
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