conda-forge / pypy3.6-feedstock

A conda-smithy repository for pypy3.6.
BSD 3-Clause "New" or "Revised" License
4 stars 13 forks source link

Missing `_sysconfigdata.py` on aarch/ppc #117

Closed h-vetinari closed 7 months ago

h-vetinari commented 7 months ago

It seems that something might have not worked with the aarch/ppc builds for 7.3.15 (or the bug existed for longer) - https://github.com/conda-forge/safetensors-feedstock/pull/17 is running into

Could not find _sysconfigdata*.py in $PREFIX/lib/python3.9/

I can see that the file is there for linux-64, but unfortunately, that webapp does not (yet) index artefacts that are copied (like we need to do for aarch).

Doing grep "_sysconfigdata" on the linux-64 build logs, I get

checking file lib_pypy/_sysconfigdata.py
patching file lib_pypy/_sysconfigdata.py
+_CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_conda_cos6_linux_gnu
+ cp build/lib.linux-x86_64-3.9/_sysconfigdata__linux_x86_64-linux-gnu.py /home/conda/feedstock_root/build_artifacts/pypy3.9_1706632920603/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/pypy3.9
+++ ls build/lib.linux-x86_64-3.9/_sysconfigdata__linux_x86_64-linux-gnu.py
++ basename build/lib.linux-x86_64-3.9/_sysconfigdata__linux_x86_64-linux-gnu.py
+ sysconfigdata_name=_sysconfigdata__linux_x86_64-linux-gnu
+ _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__linux_x86_64-linux-gnu
lib/pypy3.9/_sysconfigdata__linux_x86_64-linux-gnu.py (text): Patching

For the aarch logs, the same grep yields:

checking file lib_pypy/_sysconfigdata.py
patching file lib_pypy/_sysconfigdata.py
+_CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_aarch64_conda_cos7_linux_gnu
lib/pypy3.9/_sysconfigdata__linux_aarch64-linux-gnu.py (text): Patching

so the crucial(?) cp is missing. The fact that conda still mentions it as being patched (see last line) should mean that the file is there, but something seems to be going wrong there nevertheless. Looking at the relevant section for linux-64, we seem to be missing (parts of) the following on aarch/ppc:

Writing grammar tables to lib/pypy3.9/lib2to3/PatternGrammar3.9.18.final.0.pickle
~/feedstock_root/build_artifacts/pypy3.9_1706632920603/target
+ popd
++ /home/conda/feedstock_root/build_artifacts/pypy3.9_1706632920603/work/pypy3/pypy/tool/release/config.guess
+ host_gnu_type=x86_64-pc-linux-gnu
+ pushd /tmp
+ pypy -m sysconfig --generate-posix-vars HOST_GNU_TYPE x86_64-pc-linux-gnu
/tmp ~/feedstock_root/build_artifacts/pypy3.9_1706632920603/target
+ cp build/lib.linux-x86_64-3.9/_sysconfigdata__linux_x86_64-linux-gnu.py /home/conda/feedstock_root/build_artifacts/pypy3.9_1706632920603/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/pypy3.9
++ rev
++ cut -b 4-
++ rev
+++ ls build/lib.linux-x86_64-3.9/_sysconfigdata__linux_x86_64-linux-gnu.py
++ basename build/lib.linux-x86_64-3.9/_sysconfigdata__linux_x86_64-linux-gnu.py
+ sysconfigdata_name=_sysconfigdata__linux_x86_64-linux-gnu
+ popd
++ pypy -c 'from distutils import sysconfig; print(sysconfig)'

CC @mattip

PS. This issue is a good example why I think supporting the niche² pypy-on-aarch/ppc is not a judicious use of our scarce resources.

h-vetinari commented 7 months ago

Ahhhh, nevermind, this was actually a cross-compilation issue... Thanks @xhochy