This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author awilfox
Recipients Alex.Willmer, awilfox, eric.araujo, gregory.p.smith, kumba, loewis, rpetrov, tarek
Date 2016-08-03.11:33:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470224016.46.0.944940065665.issue5404@psf.upfronthosting.co.za>
In-reply-to
Content
Bootstrapping a Linux environment based on musl libc from glibc host requires cross-compilation to the same architecture (for example, configure is --build=i686-pc-linux-gnu --host=i686-pc-linux-musl).

The Python core will build and link fine in this configuration; unfortunately, every module in sharedmods fails to link if the ABI is different, as Lib/distutils/command/build_ext.py:732 uses sys.abiflags and the native Python is used.  For example, my distribution ships with no ABI flags (libpython3.4.so), but if I use the default enabled PyMalloc (libpython3.4m.so), I will see:

/usr/libexec/gcc/i686-foxkit-linux-musl/ld: cannot find -lpython3.4
collect2: error: ld returned 1 exit status

during linking of all sharedmods.

As I am relatively unfamiliar with distutils' internals I am quite unsure how to proceed to fix this, but am willing test any patches.  For now, I just disable/enable PyMalloc and wide Unicode to match the ABI of the host computer.
History
Date User Action Args
2016-08-03 11:33:36awilfoxsetrecipients: + awilfox, loewis, gregory.p.smith, tarek, eric.araujo, rpetrov, kumba, Alex.Willmer
2016-08-03 11:33:36awilfoxsetmessageid: <1470224016.46.0.944940065665.issue5404@psf.upfronthosting.co.za>
2016-08-03 11:33:36awilfoxlinkissue5404 messages
2016-08-03 11:33:35awilfoxcreate