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

macos update build vm #12

Closed
totaam opened this issue Dec 5, 2019 · 6 comments
Closed

macos update build vm #12

totaam opened this issue Dec 5, 2019 · 6 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Dec 5, 2019

Use 10.14.x (Mojave)?
Require 10.?

Record steps to setup the dev env.

@totaam
Copy link
Collaborator Author

totaam commented Dec 5, 2019

  • enable ssh
  • install xcode 11.2.1
  • as per build gtk-osx, run ./gtk-osx-setup.sh
  • verify we can use the shell:
alias jhbuild="PATH=.new_local/bin:$PATH jhbuild";jhbuild shell
  • add our jhbuildrc:
cat > .config/jhbuildrc-custom <<EOF
_gtk_osx_use_jhbuild_python = True
setup_sdk(target="10.14", sdk_version="10.14", architectures=["x86_64"])
os.environ["CC"] = "/usr/bin/gcc"
os.environ["DYLD_LIBRARY_PATH"] = ""
build_policy = "updated-deps"
modules = ["meta-osx-xpra-deps"]
moduleset="https://xpra.org/svn/Xpra/trunk/osx/jhbuild/xpra-gtk3.modules"
#os.environ["SSL_CERT_FILE"] = "/Users/osx/gtk/inst/etc/ssl/cacert.pem"
EOF
  • run:
jhbuild bootstrap-gtk-osx
jhbuild update
jhbuild build meta-gtk-osx-bootstrap meta-gtk-osx-gtk3
cd $JHBUILD_PREFIX/bin; ln -sf python3 python
jhbuild buildone -f libxml
jhbuild build
  • build xpra

Still TODO:

  • fix some build errors:
  • pango error during tests (solved by nuking them from the Makefile)
  • pycairo: tries python2? wrong path?
  • pygobject3: wrong path?
  • gtk-mac-integration-python: python2?
  • gtk-mac-bundler: wrong path?
  • python-lzo: lzo was not build first? force it?
  • pyobjc-*: version 6.1 bump needed, error with sdk level detection?
  • orc 0.4.31 requires meson
  • libvorbis: error missing uint*_t (inttypes.h?)
  • twolame: wrong path, needs --disable-maintainer-mode, error building docs: man page (skip)
  • faac and faad: wrong path, needs autoreconf
  • flac: needs inttypes.h? (as per macos moduleset updates for 3.0 #7#comment:21)
  • gstreamer: cannot find g-ir-scanner python bits

@totaam
Copy link
Collaborator Author

totaam commented Dec 6, 2019

Updates (too many to list - important ones only):

Remaining problems:

  • latest pango fails to build: revert it?
  • pycairo: tries to run commands with python2!, must run from source dir?
  • gtk-mac-bundler: must run from source dir
  • pyobjc errors are caused by the sdk path, change it to have the version number instead of the symlink:
export SDKDIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
export SDKROOT=$SDKDIR

others fail to detect the "os_level" - I've hardcoded it in the build file to move on.

  • vorbis add #include <stdint.h> to $JHBUILD_PREFIX/include/ogg/os_types.h
  • bomutils: needs source dir
  • scons tries to use python2
  • serf: path issue? needs python2?

@totaam
Copy link
Collaborator Author

totaam commented Dec 7, 2019

Needed to make python3 a symlink:

cd $JHBUILD_PREFIX/bin
ln -sf python3 python
ln -sf python3-config python-config

Rebuilt from scratch - building python3 early so we don't use the system one, doing libwebp early to avoid errors building libtiff 4.1:

jhbuild bootstrap-gtk-osx
jhbuild buildone -f openssl
jhbuild buildone -f python3
jhbuild buildone -f libwebp
jhbuild meta-gtk-osx-bootstrap meta-gtk-osx-gtk3
  • error finding girscanner:
    gobject-introspection builds against the wrong python3 and uses the system one!
    Use:
PYTHON=$JHBUILD_PREFIX/bin/python3 jhbuild buildone -f gobject-introspection

Hit issues building pango:

  • needs to link against fontconfig, tweaked the ninja build file to add it
  • fontconfig required an older version of the freetype dylib?
  • rebuilt both then:
../../../../gtk/source/pango-1.44.7/pango/pangocairo-fcfontmap.c:109:5: error: implicit declaration of function 'cairo_ft_font_options_substitute' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  • rebuilt cairo and then pycairo
  • error building gtk3 versions 3.24.11 to 3.24.13:
  CC       gdkglobals-quartz.lo
/Users/gtk3/gtk/source/gtk+-3.24.13/gdk/quartz/gdkdnd-quartz.c:24:10: fatal error: 'gdkquartz-gtk-only.h' file not found
#include "gdkquartz-gtk-only.h"
  • pyobjc (still todo)
  • liborc:
ERROR: Error in gtkdoc helper script:

ERROR: ['gtkdoc-fixxref', '--module=orc', '--module-dir=html'] failed with status 1
Traceback (most recent call last):
  File "/Users/macos/gtk/inst/bin/gtkdoc-fixxref", line 28, in <module>
    from gtkdoc import common, config, fixxref
  File "/Users/macos/gtk/inst/share/gtk-doc/python/gtkdoc/fixxref.py", line 28, in <module>
    from . import common, highlight
  File "/Users/macos/gtk/inst/share/gtk-doc/python/gtkdoc/highlight.py", line 28, in <module>
    from pygments import highlight
ModuleNotFoundError: No module named 'pygments'
  • on the older system, itstool moaned about libxml2 until I rebuilt libxml2 against python2:
jhbuild buildone -f python2
PYTHON=/Users/gtk3/gtk/inst/bin/python2 jhbuild buildone -f libxml2
PYTHON=/Users/gtk3/gtk/inst/bin/python2 jhbuild buildone -f itstool

Despite a newer version of scons, we have to temporarily switch the symlinks to python2 to build serf...

There's a circular dependency between libtiff and libwebp..

@totaam
Copy link
Collaborator Author

totaam commented Feb 12, 2020

Works well enough.

Some details in duplicate ticket Xpra-org/xpra#2422.

@totaam totaam closed this as completed Feb 12, 2020
@totaam
Copy link
Collaborator Author

totaam commented Mar 25, 2020

Regression spotted: Xpra-org/xpra#2680

@totaam
Copy link
Collaborator Author

totaam commented Mar 30, 2020

GTK3 bug forced a downgrade: Xpra-org/xpra#2672

@totaam totaam transferred this issue from Xpra-org/xpra Jul 13, 2021
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

No branches or pull requests

1 participant