From 8ef02967b1e62e72cc29014d52ea8f456c6eebf3 Mon Sep 17 00:00:00 2001 From: Catalin Patulea Date: Wed, 13 Mar 2024 20:22:20 -0400 Subject: [PATCH] Python: build --with-system-ffi. This should solve the problem where the build uses include files from vanilla libffi, but links against system (Apple) libffi, which causes missing symbols at runtime: $ jhbuild run 'python3 -m objc' Traceback (most recent call last): File "", line 189, in _run_module_as_main File "", line 148, in _get_module_details File "", line 112, in _get_module_details File "/Users/catalinp/gtk/inst/lib/python3.11/site-packages/objc/__init__.py", line 6, in from . import _objc ImportError: dlopen(/Users/catalinp/gtk/inst/lib/python3.11/site-packages/objc/_objc.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_ffi_find_closure_for_code_np' https://github.com/Xpra-org/gtk-osx-build/issues/27#issuecomment-1890480763 --- gtk-osx-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk-osx-setup.sh b/gtk-osx-setup.sh index 0583ea5f..ada04aa5 100755 --- a/gtk-osx-setup.sh +++ b/gtk-osx-setup.sh @@ -96,7 +96,7 @@ fi #with python2 any more, and the Apple-provided python3 because it #doesn't include a usable libpython for libxml2 to link against. -export PYTHON_CONFIGURE_OPTS="--enable-shared" +export PYTHON_CONFIGURE_OPTS="--enable-shared --with-system-ffi" #This really means pyenv's *python* version. It's poorly named but #it's defined by pyenv so it can't be changed. export PYENV_VERSION=$PYTHON_VERSION