Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fixes #38

Merged
merged 8 commits into from
Feb 9, 2024
Merged

Build fixes #38

merged 8 commits into from
Feb 9, 2024

Conversation

cpatulea
Copy link

@cpatulea cpatulea commented Feb 8, 2024

These bring the tree to a state that successfully builds under GitHub workflows, x86_64 and arm64 (Xpra-org/xpra#4017 (comment)), but does not include the CI config itself. The latter will be in a separate PR.

Context: Xpra-org/xpra#4017

cpatulea and others added 8 commits February 8, 2024 15:35
*** Error during phase configure of fontconfig: ########## Error running /Users/runner/gtk/source/fontconfig-2.14.2/configure --prefix /Users/runner/gtk/inst --disable-docs --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts --with-cache-dir=home   *** [20/137]
checking for FREETYPE... no
configure: error: Package requirements (freetype2 >= 21.0.15) were not met:

Package 'libbrotlidec', required by 'freetype2', not found
Looks like PyPi tarball doesn't have setup.py, which jhbuild needs. Add it back
using a patch.

Xpra-org/xpra#4017 (comment)
Looks like PyPi tarball doesn't have setup.py, which jhbuild needs:
*** Checking out python3-setuptools_rust *** [66/137]
*** Building python3-setuptools_rust *** [66/137]
python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/setuptools-rust-1.8.1
python3: can't open file '/Users/runner/gtk/source/setuptools-rust-1.8.1/setup.py': [Errno 2] No such file or directory
*** Error during phase build of python3-setuptools_rust: ########## Error running python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/setuptools-rust-1.8.1 *** [66/137]

Add it back using a patch.

Xpra-org/xpra#4017 (comment)
The build of gettext on Sonoma (at least arm64) ends with:

ld: Undefined symbols:
  _iconv_ostream_create, referenced from:
      <initial-undefines>
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I tried updating gettext to the latest version (which fixes some Sonoma problems
so it is good to do in any case) but this doesn't resolve the problem.

Building libiconv and adding it as a dependency of gettext seems to fix
the issue. I based the autogen args on what is currently used in the corresponding
Homebrew formula.
Looks like PyPi tarball doesn't have setup.py, which jhbuild needs:

2024-02-06T16:42:10.5816920Z *** Building python3-idna *** [90/137]
2024-02-06T16:42:10.5822330Z python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/idna-3.6
2024-02-06T16:42:10.7839920Z python3: can't open file '/Users/runner/gtk/source/idna-3.6/setup.py': [Errno 2] No such file or directory
2024-02-06T16:42:10.8055060Z *** Error during phase build of python3-idna: ########## Error running python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/idna-3.6 *** [90/137]

https://github.com/cpatulea/gtk-osx-build/actions/runs/7802110330/job/21278777736

Add it back using a patch.

Xpra-org/xpra#4017 (comment)
Fixes build failure:
2024-02-07T00:13:44.1632550Z In file included from Modules/_AVFoundation.m:12:
2024-02-07T00:13:44.1634070Z Modules/_AVFoundation_protocols.m:80:28: error: cannot find protocol declaration for 'AVCapturePhotoOutputReadinessCoordinatorDelegate'
2024-02-07T00:13:44.1635400Z     p = PyObjC_IdToPython(@protocol(AVCapturePhotoOutputReadinessCoordinatorDelegate));
2024-02-07T00:13:44.1636240Z                            ^
2024-02-07T00:13:44.1667560Z 1 error generated.
2024-02-07T00:13:44.1769500Z error: command '/Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' failed with exit code 1
2024-02-07T00:13:44.2675810Z *** Error during phase build of python3-pyobjc-framework-avfoundation: ########## Error running python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/pyobjc-framework-AVFoundation-10.0 *** [101/137]

CI log: https://github.com/cpatulea/gtk-osx-build/actions/runs/7806902536/job/21294198714

Issue: ronaldoussoren/pyobjc#572

Cc: Xpra-org/xpra#4017
Without this:
*** Building glib *** [14/137]
ninja
[139/586] Building translation po/ab/LC_MESSAGES/glib20-ab.mo
FAILED: po/ab/LC_MESSAGES/glib20.mo
/Users/catalinp/gtk/inst/bin/msgfmt -o po/ab/LC_MESSAGES/glib20.mo ../../../../gtk/source/glib-2.78.1/po/ab.po
dyld[41755]: Library not loaded: /Users/catalinp/gtk/inst/lib/libxml2.2.dylib
  Referenced from: <73827042-7733-333B-8F19-6758C08712BF> /Users/catalinp/gtk/inst/bin/msgfmt
  Reason: tried: '/Users/catalinp/gtk/inst/lib/libxml2.2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/catalinp/gtk/inst/lib/libxml2.2.dylib' (no such file), '/Users/catalinp/gtk/inst/lib/libxml2.2.dylib' (no such file)
*** Building python3-cryptography *** [79/137]
python3 setup.py build --build-base /Users/catalinp/.cache/jhbuild/build/cryptography-42.0.2
python3: can't open file '/Users/catalinp/gtk/source/cryptography-42.0.2/setup.py': [Errno 2] No such file or directory
@totaam totaam merged commit 9545789 into Xpra-org:master Feb 9, 2024
@totaam
Copy link
Collaborator

totaam commented Feb 9, 2024

Awesome, thank you very much.

I will sync up with upstream after xpra v6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants