[issue39399] Cross compilation using different libc is broken

2020-01-21 Thread Andrew Aladjev


Andrew Aladjev  added the comment:

Hello, it seems like issue 22724 is completely the same. Let's discuss 
solutions there. Thank you.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39399] Cross compilation using different libc is broken

2020-01-20 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report. This appears to be a duplicate of languishing 
Issue22724.  Suggest you join the discussion there.

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> byte-compile fails for cross-builds

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39399] Cross compilation using different libc is broken

2020-01-20 Thread Andrew Aladjev


New submission from Andrew Aladjev :

Hello. I am implementing python cross compilation using "x86_64-pc-linux-musl" 
toolchain: "x86_64-pc-linux-musl-emerge -v1 python:3.6". Please see the 
following build log 
https://gist.github.com/andrew-aladev/e10fa5a8151ffb3c5782edd64ae08b28.

We can see the following part:

Traceback (most recent call last):
  File 
"/usr/x86_64-pc-linux-musl/tmp/portage/dev-lang/python-3.6.9/image//usr/lib/python3.6/compileall.py",
 line 17, in 
import struct
  File 
"/usr/x86_64-pc-linux-musl/tmp/portage/dev-lang/python-3.6.9/image/usr/lib/python3.6/struct.py",
 line 13, in 
from _struct import *
ImportError: libc.so: cannot open shared object file: No such file or directory

It means that cross compilation of python is not reliable today by design. 
Python is trying to use PYTHON_FOR_BUILD for loading cross compiled modules. It 
is not possible in general case. PYTHON_FOR_BUILD should not try to load cross 
compiled modules.

Please see the following gentoo issue https://bugs.gentoo.org/705970. I've 
attached a gentoo specific workaround there.

--
components: Build
messages: 360330
nosy: puchenyaka
priority: normal
severity: normal
status: open
title: Cross compilation using different libc is broken
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com