[MacPorts] #68545: py311-numpy @1.26.1 build failure - cannot find cython

MacPorts noreply at macports.org
Wed Oct 25 03:02:06 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):

 From the attached `main.log` I do see patch-build_cython_path.diff being
 applied:

 {{{
 :notice:patch --->  Applying patches to py311-numpy
 :info:patch --->  Applying patch-build_cython_path.diff
 […]
 :info:patch patching file vendored-meson/meson/mesonbuild/envconfig.py
 }}}

 And I do see the `CYTHON` environment variable being set:

 {{{
 :notice:build --->  Building py311-numpy
 […]
 :debug:build Executing org.macports.build (py311-numpy)
 :debug:build Environment:
 […]
 :debug:build CYTHON='/opt/local/bin/cython-3.11'
 }}}

 The build is being invoked correctly:

 {{{
 :info:build Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 numpy/py311-numpy/work/numpy-1.26.1" &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
 -m build --no-isolation --wheel
 --outdir/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-numpy/py311-numpy/work
 :debug:build system:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 numpy/py311-numpy/work/numpy-1.26.1" &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
 -m build --no-isolation --wheel
 --outdir/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-numpy/py311-numpy/work
 }}}

 It’s using the correct Python (`python3.11`) and the correct Meson in
 `vendored-meson` (which has been patched above, and which identifies
 itself as 1.2.99):

 {{{
 :info:build * Getting build dependencies for wheel...
 :info:build * Building wheel...
 :info:build +
 /opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 numpy/py311-numpy/work/numpy-1.26.1/vendored-meson/meson/meson.py setup
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 numpy/py311-numpy/work/numpy-1.26.1
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 numpy/py311-numpy/work/numpy-1.26.1/.mesonpy-9dakvmho/build
 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --cross-file
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 numpy/py311-numpy/work/numpy-1.26.1/.mesonpy-9dakvmho/build/meson-python-
 cross-file.ini --native-
 file=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 numpy/py311-numpy/work/numpy-1.26.1/.mesonpy-9dakvmho/build/meson-python-
 native-file.ini
 :info:build The Meson build system
 :info:build Version: 1.2.99
 }}}

 But the `CYTHON` environment variable isn’t having any effect.

 {{{
 :info:build ../../meson.build:1:0: ERROR: Unknown compiler(s):
 [['cython'], ['cython3']]
 :info:build The following exception(s) were encountered:
 :info:build Running `cython -V` gave "[Errno 2] No such file or directory:
 'cython'"
 :info:build Running `cython3 -V` gave "[Errno 2] No such file or
 directory: 'cython3'"
 }}}

 This error indicates that `CYTHON` is either unset at this point, or your
 build is somehow using a different (unpatched?) `envconfig.py`. When
 `CYTHON` is respected, even if it names a broken `cython`, the output
 looks a bit different, in that `[['cython'], ['cython3']]` doesn’t appear,
 but is replaced by the contents of the `CYTHON` variable. For example:

 {{{
 mark at arm-and-hammer zsh% CYTHON=/var/empty/enoent
 PATH=/opt/local/bin:/usr/bin:/bin python3.11 -m build --no-isolation
 --wheel
 * Getting build dependencies for wheel...
 * Building wheel...
 […]
 The Meson build system
 Version: 1.2.99
 […]
 ../../meson.build:1:0: ERROR: Unknown compiler(s): [['/var/empty/enoent']]
 The following exception(s) were encountered:
 Running `/var/empty/enoent -V` gave "[Errno 2] No such file or directory:
 '/var/empty/enoent'"
 }}}

 but that’s not what’s happening in your build log.

-- 
Ticket URL: <https://trac.macports.org/ticket/68545#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list