[MacPorts] #68545: py311-numpy @1.26.1 build failure - cannot find cython
MacPorts
noreply at macports.org
Wed Oct 25 15:24:05 UTC 2023
#68545: py311-numpy @1.26.1 build failure - cannot find cython
-----------------------+-----------------------
Reporter: RobK88 | Owner: michaelld
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: lion
Port: py-numpy |
-----------------------+-----------------------
Comment (by markmentovai):
1. I noticed that you’re building `+gfortran+openblas`. The Portfile has a
comment
{{{
# However, +gfortran+openblas is broken on i386, see above
}}}
Does it make a difference if you build with the current default variant
for i386, which should be `+gfortran` but not `+openblas`? (Probably not.)
2. Are you equipped to debug whether `CYTHON` is still set during the
wheel build? You could try:
{{{
git clone https://github.com/numpy/numpy.git
cd numpy
git checkout v1.26.1
git submodule init
git submodule update
patch -p0 <
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/python
/py-numpy/files/patch-build_cython_path.diff
}}}
You could also patch this in to help debug:
{{{
diff --git vendored-meson/meson/meson.py vendored-meson/meson/meson.py
index 6f3ba2a9ee46..5ffe4f8a45b4 100755
--- vendored-meson/meson/meson.py
+++ vendored-meson/meson/meson.py
@@ -37,4 +37,7 @@ if (meson_exe.parent / 'mesonbuild').is_dir():
from mesonbuild import mesonmain
if __name__ == '__main__':
+ import os
+ print('@@@ mesonmain = %r' % mesonmain, file=sys.stderr)
+ print('@@@ CYTHON = %r' % os.environ['CYTHON'], file=sys.stderr)
sys.exit(mesonmain.main())
}}}
And build with `CYTHON` set:
{{{
PATH=/opt/local/bin:/usr/bin:/bin CYTHON=/opt/local/bin/cython-3.11
OPENBLAS=/opt/local/lib MKLROOT=None ATLAS=None
SETUPTOOLS_USE_DISTUTILS=stdlib python3.11 -m build --no-isolation --wheel
}}}
When I build with this, I see at the top:
{{{
* Getting build dependencies for wheel...
* Building wheel...
+ /opt/local/bin/python3.11 /private/tmp/numpy/vendored-
meson/meson/meson.py setup /private/tmp/numpy /private/tmp/numpy/.mesonpy-
_hbx4qlc/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md
--native-file=/private/tmp/numpy/.mesonpy-_hbx4qlc/build/meson-python-
native-file.ini
@@@ mesonmain = <module 'mesonbuild.mesonmain' from '/private/tmp/numpy
/vendored-meson/meson/mesonbuild/mesonmain.py'>
@@@ CYTHON = '/opt/local/bin/cython-3.11'
The Meson build system
[…]
}}}
showing that `CYTHON` is set and `mesonbuild` comes from the patched
`vendored-meson` we expect.
If things are different for you, it’ll tell us where to look next.
And if things are the same for you and the build completes when done this
way, it’ll tell us that there’s something else wrong with the build within
`port build` but not when done manually.
--
Ticket URL: <https://trac.macports.org/ticket/68545#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list