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
Cross-compiling 3.15 for a musl target (glibc build machine) fails in make at the checksharedmods target:
nativepython3: error while loading shared libraries: libc.so: cannot open shared object file: No such file or directory
make: *** [Makefile:1801: checksharedmods] Error 127
In a cross build PYTHON_FOR_BUILD is the host interpreter (from --with-build-python) but RUNSHARED points LD_LIBRARY_PATH at the target's build dir, so the host interpreter gets the target libraries. On glibc->glibc nobody notices, but with a musl target the glibc host binary can't load the musl libc.so and dies before Python even starts.
That PR was about getting PGO to work under emulation, but checksharedmods runs in the normal build_all path even without PGO, so now every non-emulated cross build to a different libc breaks here.
As far as I can tell check_extension_modules.py doesn't actually need the target libs on LD_LIBRARY_PATH when cross-compiling — it already takes the cross path (via _PYTHON_HOST_PLATFORM) and only checks that the module files exist, it doesn't import them.
Putting the cross_compiling RUNSHARED reset back makes the build work again. Would it make sense to restore it, or to only use RUNSHARED for the build-python when a HOSTRUNNER is set?
Activity