-
Notifications
You must be signed in to change notification settings - Fork 313
(3.13.0) Build Image Fails Due to Dependency Version Incompatibility
Building a new custom image with pcluster build-image fails and the following error is in the CloudWatch log /aws/imagebuilder/<image-name>
:
error: package `backtrace v0.3.75` cannot be built because it requires rustc 1.82.0 or newer, while the currently active rustc version is 1.75.0
As part of the build image process, ParallelCluster installs efs-utils
. backtrace
is a transitive dependency of efs-utils
which, since version v0.3.75
released on May 6, 2025, introduced a requirement on rustc 1.82.0
or newer. However rustc 1.82.0
is not available on default OS repositories. Due to the unavailability of such dependency pcluster build-image command fails.
- ParallelCluster version 3.13.0
- All OSes except alinux2 and alinux2023.
- Clusters using already built custom images or PCluster official images are not affected
The mitigation is to install the latest rust toolchain (with rustc 1.86.0
) to your parent AMI before running the pcluster build-image command.
You can install the latest rust toolchain with the following scripts:
For Ubuntu 20/22/24:
# get dependencies
sudo apt-get -y install git binutils pkg-config libssl-dev gettext build-essential
# remove system rustc and cargo
sudo apt-get -y remove rustc cargo
# install latest rust toolchain using rustup. Will contain rustc 1.86.0
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# add rust toolchain to Path
. "$HOME/.cargo/env"
# clone efs-utils
git clone https://github.com/aws/efs-utils
cd efs-utils
# build package
./build-deb.sh
# install package
sudo apt-get -y install ./build/amazon-efs-utils*deb
# check that installation succeeded:
man mount.efs
For RHEL 8 or 9:
# install dependencies
sudo yum -y install git rpm-build make openssl-devel gcc
# remove system rust
sudo yum remove cargo rust
# install latest rust toolchain using rustup. Will contain rustc 1.86.0
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# add rust toolchain to Path
. "$HOME/.cargo/env"
# clone efs-utils
git clone https://github.com/aws/efs-utils
cd efs-utils
# make rpm
make rpm-without-system-rust
# install package
sudo yum -y install ./build/amazon-efs-utils*rpm
# check that installation succeeded:
man mount.efs