Repository navigation
Closed
Description
$ 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.
Metadata
Metadata
Assignees
Labels
No labels
Activity
stepheneb commentedon Jan 9, 2022
At least some of the issues seem to relate to unsupported
MACOSX_DEPLOYMENT_TARGETvalues. Here's some testing running in a github action on Xcode 12.4 -- this workflow based onBuildPR.ymlhttps://github.com/stepheneb/gitx/blob/macos-release/.github/workflows/macos-release.yml
instances of
MACOSX_DEPLOYMENT_TARGETvalues throughout projecthannesa2 commentedon Jan 9, 2022
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
hannesa2 commentedon Jan 9, 2022
But at time of merge, it was working
hannesa2 commentedon Jan 9, 2022
If you find/solve the root cause, please make a pull request
stepheneb commentedon Jan 9, 2022
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 Projectstep in the runner I'm still getting this error ... hmmmhannesa2 commentedon Jan 9, 2022
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
gitxon master is failing, so I tried to build in advance submoduleobjective-gitmaster branch (it was working in the past gitx/objective-git#17) but here I runI've still no clue what's wrong here ....
janeklb commentedon Jan 17, 2022
Trying this out too. My progress so far on a MBP 2019 w/ Monterey 12.1 + latest xcode 12.3.1:
python Scripts/build releaseMACOSX_DEPLOYMENT_TARGETerrors:MACOSX_DEPLOYMENT_TARGETto10.12insideExternal/objective-git/ObjectiveGitFramework.xcodeproj/project.pbxproj(not sure if this is the right thing to do.. im just taking a shot in the dark)xcrun xcodebuild ...againjaneklb commentedon Jan 17, 2022
Further findings:
/usr/local/opt/[email protected]/lib./External/objective-git/External/build/libdirectory (need to buildobjective-git?)cryptois supposed to come from (from thelibrary not found for -lcryptomessage)Also tried using the GH actions BuildPR manifest (using the updated
MACOS_DEPLOYMENT_TARGETvalues etc.) and had very similar result:hannesa2 commentedon Jan 18, 2022
Unfortunately on CI there is no XCode

13.2.1https://github.com/gitx/gitx/runs/4849764516?check_suite_focus=true
In my point of view a build with
python3 Scripts/build.pyis 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
hannesa2 commentedon Jan 18, 2022
@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
justincbeck commentedon Jan 18, 2022
Thanks for all your hard work on this. Two questions:
Thanks again... You guys rock.
hannesa2 commentedon Jan 18, 2022
Sorry I don't know
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.
justincbeck commentedon Jan 18, 2022
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.
hannesa2 commentedon Jan 18, 2022
In short, this should work
justincbeck commentedon Jan 18, 2022
I am stuck here as well in case you made any progress.
23 remaining items
stepheneb commentedon Feb 7, 2022
I'm running macos 11.6.3.
Just cloned and started a build using these commands
Ended with this failure:
hannesa2 commentedon Feb 7, 2022
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 ?
claytonrcarter commentedon Feb 7, 2022
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.
janeklb commentedon Feb 7, 2022
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?
janeklb commentedon Feb 7, 2022
@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
hannesa2 commentedon Feb 8, 2022
Indeed it's suspect, I guess it's somehow related to

To avoid this, I created #257
claytonrcarter commentedon Feb 8, 2022
Can someone help me reproduce some things?
sudo xcode-select -r ; sudo xcode-select -s /Applications/Xcode.app(or whereever your Xcode 13.2.1 is installed)xcodebuild ... archiveandxcodebuild ... buildxcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release clean, but I forgetxcodebuild ... build BUILD_DIR=./buildxcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release archivexcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release buildxcodebuild -workspace GitX.xcworkspace -scheme GitX -configuration Release build BUILD_DIR=./buildI'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?stepheneb commentedon Feb 8, 2022
@claytonrcarter
Am also an infrequent user of xxcode. I just pulled master and opened
GitX.xcodeprojin xcode 13.2.1 on macos 11.6.3Selected 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)???claytonrcarter commentedon Feb 8, 2022
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_64message makes me wonder if there's a version mismatch. For me, it looks like 1.10.0 is installed:stepheneb commentedon Feb 8, 2022
Appears to be the same which is part of
/usr/local/Cellar/libssh2/1.10.0Hmmm ... in the xcode error log above I just noticed it starts with references to:
/usr/local/opt/opensslwhich is linked toopenssl@3I have both installed:
claytonrcarter commentedon Feb 8, 2022
Hmm, so maybe it's a mismatch between the openssl dependency of libssh, not a problem w/ libssh itself. For me,
/usr/local/opt/opensslis pointing to 1.1.I hesitate to suggest having brew link to
[email protected]for fear it could break something else on your system, though.stepheneb commentedon Feb 8, 2022
Building succeeded adding
LDFLAGS="-L/usr/local/opt/[email protected]/lib"to theObjectiveGit.frameworktarget build settings.[-]faiilures building with xcode 13.2.1 [/-][+]failures building with xcode 13.2.1 [/+]hannesa2 commentedon Feb 12, 2022
This helps me and made it work finally