[issue22699] Module source files not found when cross-compiling

2021-09-16 Thread Isuru Fernando
Change by Isuru Fernando : -- keywords: +patch nosy: +isuruf nosy_count: 8.0 -> 9.0 pull_requests: +26810 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28397 ___ Python tracker

[issue22699] Module source files not found when cross-compiling

2020-03-20 Thread Steve Dower
Steve Dower added the comment: > the multiarch approach allows you to install libraries and headers for many > architectures in the same installation/chroot That makes sense, but I'm not using it. So presumably I've added a configure option that I didn't need (either "--host=x86_64-my-linux"

[issue22699] Module source files not found when cross-compiling

2020-03-20 Thread Matthias Klose
Matthias Klose added the comment: the multiarch approach allows you to install libraries and headers for many architectures in the same installation/chroot. This can then be used to cross-build stuff. you can check that on WSL with having Debian or Ubuntu installed. A short reference is ht

[issue22699] Module source files not found when cross-compiling

2020-03-20 Thread Steve Dower
Steve Dower added the comment: > I think the patch is wrong. why would you want to differentiate between > native and cross builds? Because the multiarch headers are incompatible with my SDK's headers, and because of the -I ordering they override mine. I tried swapping the order of calls w

[issue22699] Module source files not found when cross-compiling

2020-03-20 Thread Matthias Klose
Matthias Klose added the comment: I think the patch is wrong. why would you want to differentiate between native and cross builds? There should be a generic way to pick up those for both cross and native builds. -- ___ Python tracker

[issue22699] Module source files not found when cross-compiling

2020-03-20 Thread Steve Dower
Steve Dower added the comment: The values that are used are (apparently) correct, but most of sysconfig is not. That's very confusing, and makes it difficult to debug. I'm glad I get to maintain the *other* monster (MSBuild) :) I would much rather sysconfig had a single variable pointing dir

[issue22699] Module source files not found when cross-compiling

2020-03-20 Thread Steve Dower
Steve Dower added the comment: So it's possible that my first few attempts didn't have a matched build of Python on the host - the cross-build certainly relies on mixing the installed runtime with the source stdlib, so that could have been an early cause of issues. I can only suspect that it

[issue22699] Module source files not found when cross-compiling

2020-03-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Is that epic line automatically generated? When cross compiling it is generated by the configure script and configure replaces the right hand side of "PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@" of Makefile.pre.in with the generated value into Makefile.pre. I th

[issue22699] Module source files not found when cross-compiling

2020-03-20 Thread Steve Dower
Steve Dower added the comment: Is that epic line automatically generated? It didn't work for me for some reason (was trying to launch the built Python, not the host). Even so, I got to the point of filling in all those values manually while testing sysconfig, and while I'm 100% sure sysconfi

[issue22699] Module source files not found when cross-compiling

2020-03-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: Steve wrote: > In my build, I've set PYTHON_FOR_BUILD=python3.8 This will not work, PYTHON_FOR_BUILD when cross-compiling is set by configure as: PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPAT

[issue22699] Module source files not found when cross-compiling

2020-03-19 Thread Ned Deily
Change by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue22699] Module source files not found when cross-compiling

2020-03-19 Thread Steve Dower
Steve Dower added the comment: So ultimately this is a major sysconfig design flaw, and it likely requires a rewrite. The mix of information sources between _sysconfigdata (even when overriding the name and PYTHONPATH) and the Makefile, and the order in which you can rely them to be loaded

[issue22699] Module source files not found when cross-compiling

2020-03-18 Thread Steve Dower
Steve Dower added the comment: Perhaps sysconfig needs an overhaul to be able to handle _PYTHON_PROJECT_BASE properly? I see so many values in there that are taken from the running interpreter (sys.prefix, for example) that ought to come from the cross-compilation target. Wouldn't surprise m

[issue22699] Module source files not found when cross-compiling

2020-03-18 Thread Steve Dower
Steve Dower 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