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
{{ message }}
Repository navigation
macOS: libpython isn't linked with a non-system Python ($Config{dlext} is bundle) #44
On macOS with a pyenv-installed Python (3.12.12 and 3.14.8, both
--enable-shared), 0.58 and current master build Python.bundle
without linking libpython. perl Makefile.PL prints:
Unrecognized argument in LIBS ignored: 'libpython3.12.dylib', the
link succeeds because of -undefined dynamic_lookup, and then 37 of
the 38 test files fail with symbol not found in flat namespace '_PyBool_Type'.
The cause seems to be line 90 of Makefile.PL, which only turns the
library name into a -l flag if it ends in $Config{dlext} or
$Config{_a}. On macOS dlext is bundle, while the shared library
extension ($Config{so}) is dylib. Since #35,
special_non_windows_check_shared_static_libs sets libpython to
LDLIBRARY, which is libpython3.12.dylib here, so it no longer
matches. On Linux LDLIBRARY ends in .so, which is also dlext,
so Linux isn't affected.
With it, make test passes (38 files, 837 tests) on both Pythons,
and Python Lib shows -lpython3.12 / -lpython3.14. I haven't
tried Linux, Windows or Apple's system Python. The change keeps the
existing two alternatives, so they should behave as before.
Environment: macOS 26.7.1 arm64, Apple clang 21.0.0, Perl 5.36.3
(perlbrew, darwin-thread-multi-2level), Inline::Python 0.58 and
master at 2b2e476.
Activity
niner commentedon Oct 25, 2026
Fixed in b52d63a and released as 0.59
Thanks for the report and patch!