meson_python build failure - missing directory?

107 views
Skip to first unread message

Randall Rathbun

unread,
Feb 2, 2024, 4:10:31 PM2/2/24
to sage-devel
I have been able to successfully build 77 packages (of the 196 slated to be built for sage 10.2) but now encountered a strange error with meson_python.

I went to the appropriate directory, opened up a subshell and tried to rebuild the package.

owner@localhost:~/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/meson_python-0.14.0> cd '/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/meson_python-0.14.0' && '/home/owner/math/sage-10.2/sage' --buildsh

Starting subshell with Sage environment variables set.  Don't forget
to exit when you are done.  Beware:
 * Do not do anything with other copies of Sage on your system.
 * Do not use this for installing Sage packages using "sage -i" or for
   running "make" at Sage's root directory.  These should be done
   outside the Sage shell.

Bypassing shell configuration files...

Note: SAGE_ROOT=/home/owner/math/sage-10.2
(sage-buildsh) owner@localhost:meson_python-0.14.0$ ls
checksums.ini  dependencies_check  inst                  package-version.txt  spkg-check.in      spkg-install     spkg-piprm     SPKG.rst  type
dependencies   distros             install-requires.txt  spkg-check           spkg-configure.m4  spkg-install.in  spkg-piprm.in  src
(sage-buildsh) owner@localhost:meson_python-0.14.0$ bash spkg-install
Installing meson_python-0.14.0
Processing /home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/meson_python-0.14.0/src
  Running command Preparing metadata (pyproject.toml)
  Traceback (most recent call last):
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
      whl_basename = backend.build_wheel(metadata_directory, config_settings)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/meson_python-0.14.0/src/mesonpy/__init__.py", line 1008, in wrapper
      return func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/meson_python-0.14.0/src/mesonpy/__init__.py", line 1072, in build_wheel
      with _project(config_settings) as project:
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/contextlib.py", line 137, in __enter__
      return next(self.gen)
             ^^^^^^^^^^^^^^
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/meson_python-0.14.0/src/mesonpy/__init__.py", line 951, in _project
      yield Project(source_dir, build_dir, meson_args, editable_verbose)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/meson_python-0.14.0/src/mesonpy/__init__.py", line 626, in __init__
      _check_meson_version()
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/meson_python-0.14.0/src/mesonpy/__init__.py", line 987, in _check_meson_version
      meson_version = subprocess.run(['meson', '--version'], check=False, text=True, capture_output=True).stdout
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/subprocess.py", line 548, in run
      with Popen(*popenargs, **kwargs) as process:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/subprocess.py", line 1024, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "/home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/subprocess.py", line 1901, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  NotADirectoryError: [Errno 20] Not a directory: 'meson'
  error: subprocess-exited-with-error
 
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/bin/python3 /home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpn9qzkw8i
  cwd: /home/owner/math/sage-10.2/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/meson_python-0.14.0/src
  Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
***********************************************************************************************************************************************************************
Error building a wheel for meson_python-0.14.0
***********************************************************************************************************************************************************************

Is this an install package script oversight?

Matthias Koeppe

unread,
Feb 2, 2024, 5:44:56 PM2/2/24
to sage-devel
Send config.log please

Randall Rathbun

unread,
Feb 2, 2024, 7:45:31 PM2/2/24
to sage-devel
Here are some log and config files and my record of what I did to re-do the build from scratch. The build stopped again on the 77th package to be installed, meson_python, with the same error.

- Randall
meson_python-0.14.0.log
install-steps-sage-10.2.txt
config.log
system-hardware.txt

Matthias Koeppe

unread,
Feb 2, 2024, 8:14:25 PM2/2/24
to sage-devel
From config.log:
# ------------------------------------------------------ ##
## Checking whether SageMath should install SPKG meson... ##
## ------------------------------------------------------ ##
configure:37902: checking for meson >= 1.2.0
configure:37986: result: /home/owner/.local/bin/meson
configure:37997: will use system package and not install SPKG meson

I'd suggest to check where /home/owner/.local/bin/meson is coming from and if the problem goes away if you either remove /home/owner/.local/bin from PATH and re-run "configure", or alternatively use "./configure --without-system-meson".

Randall Rathbun

unread,
Feb 2, 2024, 8:43:29 PM2/2/24
to sage-devel
Again, an automatic software update via the system must have installed meson as part of the update. I have scrubbed my local version. I wonder how many other autoupdates from openSuse are interfering with sage v10.2 install? I do NOT remember installing meson at all.

Randall Rathbun

unread,
Feb 2, 2024, 8:50:49 PM2/2/24
to sage-devel
Matthias

Thanks for all your help. Even after I used yast2 to remove meson, it still did NOT remove meson from my ~ .local/bin location and I had to manually remove this. This is frustrating when the system package manager will NOT remove the executables upon command leaving the administrator believing that the files were removed.

Randall

Matthias Koeppe

unread,
Feb 2, 2024, 8:57:23 PM2/2/24
to sage-devel
What is in ~/.local is typically not installed by the distribution's package manager (even on OpenSUSE). It may have been installed by using `pip install --user`.

Randall Rathbun

unread,
Feb 2, 2024, 10:43:44 PM2/2/24
to sage-devel
I believe you are correct, thanks.

Randall Rathbun

unread,
Feb 2, 2024, 10:44:59 PM2/2/24
to sage-devel
the ipython builder insists that the ipython log file must be included so the information about a dependency can get back to the developers.
so it is attached to this reply
ipython-8.6.0.log

Matthias Koeppe

unread,
Feb 2, 2024, 11:08:24 PM2/2/24
to sage-devel
Reply all
Reply to author
Forward
0 new messages