awilfox added the comment:

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.

----------
components: +Cross-Build -Build
nosy: +Alex.Willmer, awilfox
versions: +Python 3.4 -Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5404>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to