[regression] Bootstrap fails on Ubuntu 22.04, with `FileNotFoundError: [Errno 2] No such file or directory: '<...>/build/build-tools/bin/meson'`
Environment: Ubuntu 22.04. More specifically, the Docker image gitpod/workspace-base.
Step to reproduce: simply run command ./cerbero-uninstalled bootstrap
. The command will fail with:
Recipe 'orc' failed at the build step 'configure'
Traceback (most recent call last):
File "/workspace/cerbero/cerbero/build/oven.py", line 494, in _cook_recipe_step
await ret
File "/workspace/cerbero/cerbero/build/recipe.py", line 103, in async_wrapped
await stepfunc()
File "/workspace/cerbero/cerbero/build/build.py", line 65, in async_call
res = await func(*args)
File "/workspace/cerbero/cerbero/build/build.py", line 1144, in configure
await shell.async_call(meson_cmd, self.meson_dir, logfile=self.logfile, env=self.env)
File "/workspace/cerbero/cerbero/utils/shell.py", line 265, in async_call
proc = await asyncio.create_subprocess_exec(
File "/usr/lib/python3.10/asyncio/subprocess.py", line 218, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
File "/usr/lib/python3.10/asyncio/base_events.py", line 1681, in subprocess_exec
transport = await self._make_subprocess_transport(
File "/usr/lib/python3.10/asyncio/unix_events.py", line 207, in _make_subprocess_transport
transp = _UnixSubprocessTransport(self, protocol, args, shell,
File "/usr/lib/python3.10/asyncio/base_subprocess.py", line 36, in __init__
self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
File "/usr/lib/python3.10/asyncio/unix_events.py", line 799, in _start
self._proc = subprocess.Popen(
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/workspace/cerbero/build/build-tools/bin/meson'
I did check; the file actually isn't there.
Full log
Build tools install prefix will be /workspace/cerbero/build/build-tools Install prefix will be /workspace/cerbero/build/dist/linux_x86_64 File /home/gitpod/.cache/cerbero-sources/rustup-init-1.26.0-x86_64-unknown-linux-gnu already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/channel-rust-1.76.0.toml already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/channel-rust-1.76.0.toml.sha256 already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/channel-rust-1.76.0.toml.asc already downloaded. File /home/gitpod/.cache/cerbero-sources/tomli-2.0.1.tar.gz already downloaded. Unpacking /home/gitpod/.cache/cerbero-sources/tomli-2.0.1.tar.gz in /workspace/cerbero/build/rust File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rust-1.76.0-x86_64-unknown-linux-gnu.tar.xz already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rust-1.76.0-x86_64-unknown-linux-gnu.tar.xz.sha256 already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rust-1.76.0-x86_64-unknown-linux-gnu.tar.xz.asc already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/cargo-1.76.0-x86_64-unknown-linux-gnu.tar.xz already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/cargo-1.76.0-x86_64-unknown-linux-gnu.tar.xz.sha256 already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/cargo-1.76.0-x86_64-unknown-linux-gnu.tar.xz.asc already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rustc-1.76.0-x86_64-unknown-linux-gnu.tar.xz already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rustc-1.76.0-x86_64-unknown-linux-gnu.tar.xz.sha256 already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rustc-1.76.0-x86_64-unknown-linux-gnu.tar.xz.asc already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rust-std-1.76.0-x86_64-unknown-linux-gnu.tar.xz already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rust-std-1.76.0-x86_64-unknown-linux-gnu.tar.xz.sha256 already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rust-std-1.76.0-x86_64-unknown-linux-gnu.tar.xz.asc already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/llvm-tools-1.76.0-x86_64-unknown-linux-gnu.tar.xz already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/llvm-tools-1.76.0-x86_64-unknown-linux-gnu.tar.xz.sha256 already downloaded. File /home/gitpod/.cache/cerbero-sources/dist/2024-02-08/llvm-tools-1.76.0-x86_64-unknown-linux-gnu.tar.xz.asc already downloaded. -----> Installing Rust toolchain so cargo-c.recipe can fetch deps verbose: creating home directory: '/workspace/cerbero/build/rust/rustup' info: profile set to 'minimal' info: setting default host triple to x86_64-unknown-linux-gnu verbose: creating update-hash directory: '/workspace/cerbero/build/rust/rustup/update-hashes' verbose: installing toolchain 'stable-x86_64-unknown-linux-gnu' verbose: toolchain directory: '/workspace/cerbero/build/rust/rustup/toolchains/stable-x86_64-unknown-linux-gnu' info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu' verbose: creating temp root: /workspace/cerbero/build/rust/rustup/tmp verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/56ydebggzrvgjdfr_file verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/channel-rust-stable.toml.sha256' verbose: downloading with reqwest verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/56ydebggzrvgjdfr_file verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/vez9aff0cfp782ae_file.toml verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/channel-rust-stable.toml' verbose: downloading with reqwest verbose: checksum passed verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/vez9aff0cfp782ae_file.toml info: latest update on 2024-02-08, rust version 1.76.0 (07dca489a 2024-02-04) info: downloading component 'cargo' verbose: creating Download Directory directory: '/workspace/cerbero/build/rust/rustup/downloads' verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/2024-02-08/cargo-1.76.0-x86_64-unknown-linux-gnu.tar.xz' verbose: downloading with reqwest verbose: checksum passed info: downloading component 'llvm-tools' verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/2024-02-08/llvm-tools-1.76.0-x86_64-unknown-linux-gnu.tar.xz' verbose: downloading with reqwest verbose: checksum passed info: downloading component 'rust-std' verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rust-std-1.76.0-x86_64-unknown-linux-gnu.tar.xz' verbose: downloading with reqwest verbose: checksum passed info: downloading component 'rustc' verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rustc-1.76.0-x86_64-unknown-linux-gnu.tar.xz' verbose: downloading with reqwest verbose: checksum passed info: installing component 'cargo' verbose: creating temp directory: /workspace/cerbero/build/rust/rustup/tmp/4j6zacxkcvvsmwwa_dir verbose: deleted temp directory: /workspace/cerbero/build/rust/rustup/tmp/4j6zacxkcvvsmwwa_dir info: installing component 'llvm-tools' verbose: creating temp directory: /workspace/cerbero/build/rust/rustup/tmp/uxmufc0ffwjq7xcu_dir verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/xjcduy1s7ys44evd_file verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/84_zsyhrhpoqsmai_file verbose: deleted temp directory: /workspace/cerbero/build/rust/rustup/tmp/uxmufc0ffwjq7xcu_dir info: installing component 'rust-std' verbose: creating temp directory: /workspace/cerbero/build/rust/rustup/tmp/8gscgifs2ip_8eo1_dir verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/fqxtnyq2hgsco9cf_file verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/tcqmnvw1gxjw9na3_file verbose: deleted temp directory: /workspace/cerbero/build/rust/rustup/tmp/8gscgifs2ip_8eo1_dir info: installing component 'rustc' verbose: creating temp directory: /workspace/cerbero/build/rust/rustup/tmp/c567ckjc8dkfjuu9_dir verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/oslj40bchxo01tyz_file verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/t3ne6b_1f07s9qwh_file verbose: deleted temp directory: /workspace/cerbero/build/rust/rustup/tmp/c567ckjc8dkfjuu9_dir verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/xjcduy1s7ys44evd_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/84_zsyhrhpoqsmai_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/fqxtnyq2hgsco9cf_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/tcqmnvw1gxjw9na3_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/oslj40bchxo01tyz_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/t3ne6b_1f07s9qwh_file verbose: toolchain 'stable-x86_64-unknown-linux-gnu' installed info: default toolchain set to 'stable-x86_64-unknown-linux-gnu' Rust toolchain v1.76.0 installed at /workspace/cerbero/build/rust Running command 'sudo apt-get install autotools-dev automake autoconf libtool g++ autopoint make cmake ninja-build bison flex nasm pkg-config libxv-dev libx11-dev libx11-xcb-dev libpulse-dev python3-dev gettext build-essential pkg-config libxext-dev libxi-dev x11proto-record-dev libxrender-dev libgl1-mesa-dev libxfixes-dev libxdamage-dev libxcomposite-dev libasound2-dev build-essential gperf wget libxtst-dev libxrandr-dev libglu1-mesa-dev libegl1-mesa-dev git xutils-dev ccache python3-setuptools libssl-dev' Reading package lists... Done Building dependency tree... Done Reading state information... Done autoconf is already the newest version (2.71-2). automake is already the newest version (1:1.16.5-1.3). autopoint is already the newest version (0.21-4ubuntu4). autotools-dev is already the newest version (20220109.1). bison is already the newest version (2:3.8.2+dfsg-1build1). build-essential is already the newest version (12.9ubuntu3). flex is already the newest version (2.6.4-8build2). g++ is already the newest version (4:11.2.0-1ubuntu1). gettext is already the newest version (0.21-4ubuntu4). libasound2-dev is already the newest version (1.2.6.1-1ubuntu1). libglu1-mesa-dev is already the newest version (9.0.2-1). libtool is already the newest version (2.4.6-15build2). libxcomposite-dev is already the newest version (1:0.4.5-1build2). libxdamage-dev is already the newest version (1:1.1.5-2build2). libxext-dev is already the newest version (2:1.3.4-1build1). libxfixes-dev is already the newest version (1:6.0.0-1). libxi-dev is already the newest version (2:1.8-1build1). libxrandr-dev is already the newest version (2:1.5.2-1build1). libxrender-dev is already the newest version (1:0.9.10-1build4). libxtst-dev is already the newest version (2:1.2.3-1build4). libxv-dev is already the newest version (2:1.0.11-1build2). make is already the newest version (4.3-4.1build1). pkg-config is already the newest version (0.29.2-1ubuntu3). wget is already the newest version (1.21.2-2ubuntu1). x11proto-record-dev is already the newest version (2021.5-1). ccache is already the newest version (4.5.1-1). gperf is already the newest version (3.1-1build1). nasm is already the newest version (2.15.05-1). ninja-build is already the newest version (1.10.1-1). xutils-dev is already the newest version (1:7.7+6ubuntu1). cmake is already the newest version (3.22.1-1ubuntu1.22.04.1). libegl1-mesa-dev is already the newest version (23.0.4-0ubuntu1~22.04.1). libgl1-mesa-dev is already the newest version (23.0.4-0ubuntu1~22.04.1). libpulse-dev is already the newest version (1:15.99.1+dfsg1-1ubuntu2.1). libssl-dev is already the newest version (3.0.2-0ubuntu1.14). libx11-dev is already the newest version (2:1.7.5-1ubuntu0.3). libx11-xcb-dev is already the newest version (2:1.7.5-1ubuntu0.3). python3-dev is already the newest version (3.10.6-1~22.04). python3-setuptools is already the newest version (59.6.0-1.2ubuntu0.22.04.1). git is already the newest version (1:2.43.0-0ppa1~ubuntu22.04.1). 0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded. warning: it looks like you have an existing installation of Rust at: warning: /workspace/cerbero/build/rust/cargo/bin warning: It is recommended that rustup be the primary Rust installation. warning: Otherwise you may have confusion unless you are careful with your PATH warning: If you are sure that you want both rustup and your already installed Rust warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes warning: or pass `-y' to ignore all ignorable checks. error: cannot install while Rust is installed warning: continuing (because the -y flag is set and the error is ignorable) verbose: creating home directory: '/workspace/cerbero/build/rust/rustup' info: profile set to 'minimal' info: setting default host triple to x86_64-unknown-linux-gnu verbose: creating update-hash directory: '/workspace/cerbero/build/rust/rustup/update-hashes' verbose: installing toolchain 'stable-x86_64-unknown-linux-gnu' verbose: toolchain directory: '/workspace/cerbero/build/rust/rustup/toolchains/stable-x86_64-unknown-linux-gnu' info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu' verbose: creating temp root: /workspace/cerbero/build/rust/rustup/tmp verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/qmn6ytcbmpjuh1r1_file verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/channel-rust-stable.toml.sha256' verbose: downloading with reqwest verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/qmn6ytcbmpjuh1r1_file verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/atax1pbvivg1ey3y_file.toml verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/channel-rust-stable.toml' verbose: downloading with reqwest verbose: checksum passed verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/atax1pbvivg1ey3y_file.toml info: latest update on 2024-02-08, rust version 1.76.0 (07dca489a 2024-02-04) info: downloading component 'cargo' verbose: creating Download Directory directory: '/workspace/cerbero/build/rust/rustup/downloads' verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/2024-02-08/cargo-1.76.0-x86_64-unknown-linux-gnu.tar.xz' verbose: downloading with reqwest verbose: checksum passed info: downloading component 'llvm-tools' verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/2024-02-08/llvm-tools-1.76.0-x86_64-unknown-linux-gnu.tar.xz' verbose: downloading with reqwest verbose: checksum passed info: downloading component 'rust-std' verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rust-std-1.76.0-x86_64-unknown-linux-gnu.tar.xz' verbose: downloading with reqwest verbose: checksum passed info: downloading component 'rustc' verbose: downloading file from: 'file:///home/gitpod/.cache/cerbero-sources/dist/2024-02-08/rustc-1.76.0-x86_64-unknown-linux-gnu.tar.xz' verbose: downloading with reqwest verbose: checksum passed info: installing component 'cargo' verbose: creating temp directory: /workspace/cerbero/build/rust/rustup/tmp/43hv7iijye_ojhp4_dir verbose: deleted temp directory: /workspace/cerbero/build/rust/rustup/tmp/43hv7iijye_ojhp4_dir info: installing component 'llvm-tools' verbose: creating temp directory: /workspace/cerbero/build/rust/rustup/tmp/t4jre_cittvoc8nv_dir verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/tzi6tts9gw3uo7dh_file verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/sp61xq5i28omdbn9_file verbose: deleted temp directory: /workspace/cerbero/build/rust/rustup/tmp/t4jre_cittvoc8nv_dir info: installing component 'rust-std' verbose: creating temp directory: /workspace/cerbero/build/rust/rustup/tmp/luob665djem3zvg2_dir verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/sv3ylfw9qp62c3a8_file verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/3qswyzooa4rtb4ur_file verbose: deleted temp directory: /workspace/cerbero/build/rust/rustup/tmp/luob665djem3zvg2_dir info: installing component 'rustc' verbose: creating temp directory: /workspace/cerbero/build/rust/rustup/tmp/qo7visjvixc4xrtc_dir verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/e7_r8rjmrvr2kxde_file verbose: creating temp file: /workspace/cerbero/build/rust/rustup/tmp/b1mur7v_hoz9n7_m_file verbose: deleted temp directory: /workspace/cerbero/build/rust/rustup/tmp/qo7visjvixc4xrtc_dir verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/tzi6tts9gw3uo7dh_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/sp61xq5i28omdbn9_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/sv3ylfw9qp62c3a8_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/3qswyzooa4rtb4ur_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/e7_r8rjmrvr2kxde_file verbose: deleted temp file: /workspace/cerbero/build/rust/rustup/tmp/b1mur7v_hoz9n7_m_file verbose: toolchain 'stable-x86_64-unknown-linux-gnu' installed info: default toolchain set to 'stable-x86_64-unknown-linux-gnu' Rust toolchain v1.76.0 installed at /workspace/cerbero/build/rust Requirement already satisfied: setuptools in ./build/build-tools/lib/python3.10/site-packages (59.6.0) Building the following recipes: m4 autoconf gettext-m4 automake libtool meson ninja pkg-config orc zlib cargo-c Building using 4 job(s) with the following job subdivisions: 4 general job(s) [(1/11) ninja -> built] [(2/11) gettext-m4 -> built] [(3/11) meson -> built] [(3/11 @ 40%) FETCH: pkg-config EXTRACT: zlib CONFIGURE: m4, orc] Recipe 'orc' failed at the build step 'configure' Traceback (most recent call last): File "/workspace/cerbero/cerbero/build/oven.py", line 494, in _cook_recipe_step await ret File "/workspace/cerbero/cerbero/build/recipe.py", line 103, in async_wrapped await stepfunc() File "/workspace/cerbero/cerbero/build/build.py", line 65, in async_call res = await func(*args) File "/workspace/cerbero/cerbero/build/build.py", line 1144, in configure await shell.async_call(meson_cmd, self.meson_dir, logfile=self.logfile, env=self.env) File "/workspace/cerbero/cerbero/utils/shell.py", line 265, in async_call proc = await asyncio.create_subprocess_exec( File "/usr/lib/python3.10/asyncio/subprocess.py", line 218, in create_subprocess_exec transport, protocol = await loop.subprocess_exec( File "/usr/lib/python3.10/asyncio/base_events.py", line 1681, in subprocess_exec transport = await self._make_subprocess_transport( File "/usr/lib/python3.10/asyncio/unix_events.py", line 207, in _make_subprocess_transport transp = _UnixSubprocessTransport(self, protocol, args, shell, File "/usr/lib/python3.10/asyncio/base_subprocess.py", line 36, in __init__ self._start(args=args, shell=shell, stdin=stdin, stdout=stdout, File "/usr/lib/python3.10/asyncio/unix_events.py", line 799, in _start self._proc = subprocess.Popen( File "/usr/lib/python3.10/subprocess.py", line 971, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: '/workspace/cerbero/build/build-tools/bin/meson' Select an action to proceed: [0] Enter the shell [1] Rebuild the recipe from scratch [2] Rebuild starting from the failed step [3] Skip recipe [4] Abort 4 ***** Error running 'bootstrap' command:
Through git bisect
, it's been revealed that it has been broken since commit 2a6ac79f ("cerbero: Port from imp module to importlib module"). However, between that and commit 8401a3e4 ("cerbero: Fix some warnings about escaping with Python 3.12") (inclusive), it fails with this error instead:
Traceback (most recent call last):
File "/workspace/cerbero/build/build-tools/bin/meson", line 33, in <module>
sys.exit(load_entry_point('meson==1.2.3', 'console_scripts', 'meson')())
File "/workspace/cerbero/build/build-tools/bin/meson", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 969, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 548, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for meson
The new behavior starts popping up since commit ea8f91bb ("Stop using setuptools in a bunch of places, incl meson.recipe").
Perhaps a relavant information is that Ubuntu 22.04 contains Python 3.10.12.