[issue22699] Module source files not found when cross-compiling
Steve Dower
report at bugs.python.org
Wed Mar 18 18:56:40 EDT 2020
Steve Dower <steve.dower at python.org> added the comment:
Trimmed a bit from setup.py here, but I think this is the cause:
def build_extensions(self):
self.srcdir = sysconfig.get_config_var('srcdir')
self.srcdir = os.path.abspath(self.srcdir)
[SNIP]
# Fix up the autodetected modules, prefixing all the source files
# with Modules/.
moddirlist = [os.path.join(self.srcdir, 'Modules')]
In my build, I've set PYTHON_FOR_BUILD=python3.8, and the contents of moddirlist is '/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/Modules'. So it's picking the wrong source directory.
I replaced the second line of the function above with:
self.srcdir = os.path.dirname(os.path.abspath(__file__))
Which made things a little better (I can launch my build now), but all the -I/usr/* options need to be replaced as well or there are no dynamically loaded modules.
----------
title: cross-compilation of Python3.4 -> Module source files not found when cross-compiling
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22699>
_______________________________________
More information about the Python-bugs-list
mailing list