You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #604 we rolled back ./configure --enable-static-libpython-for-interpreter for macOS because it caused link failures with, it seems, symbols for third-party libraries statically linked into libpython, e.g.:
The patch also failed on Python 3.9 through 3.11 because it conflicted with this other patch:
# Also on macOS, the `python` executable is linked against libraries defined by statically
# linked modules. But those libraries should only get linked into libpython, not the
# executable. This behavior is kinda suspect on all platforms, as it could be adding
# library dependencies that shouldn't need to be there.
if [[ "${PYBUILD_PLATFORM}" = macos* ]]; then
if [ "${PYTHON_MAJMIN_VERSION}" = "3.9" ]; then
patch -p1 -i ${ROOT}/patch-python-link-modules-3.9.patch
elif [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then
patch -p1 -i ${ROOT}/patch-python-link-modules-3.10.patch
else
patch -p1 -i ${ROOT}/patch-python-link-modules-3.11.patch
fi
fi
That comment seems extremely relevant to the link failures.
We should turn --enable-static-libpython-for-interpreter back on for macOS builds, and I should understand exactly what that comment means, including investigating whether it makes sense on other platforms.
Activity
statically link libpython on macOS (astral-sh#1105)