Skip to content

Commit

Permalink
Python: build --with-system-ffi.
Browse files Browse the repository at this point in the history
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 "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 148, in _get_module_details
  File "<frozen runpy>", line 112, in _get_module_details
  File "/Users/catalinp/gtk/inst/lib/python3.11/site-packages/objc/__init__.py", line 6, in <module>
    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'

Xpra-org#27 (comment)
  • Loading branch information
cpatulea committed Mar 14, 2024
1 parent dfa4920 commit 8ef0296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gtk-osx-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ef0296

Please sign in to comment.