feat(ansible)!: install rust through rustup instead of apt#6825
Conversation
Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
|
In Ubuntu 24.04 apt rust version Can you make the |
|
Also could you add |
|
@xmfcx Not really. His dependency needs stable edition2024 (>=1.85.0) but actually the default rustc provided by Jazzy and Noble is 1.75. (There is 1.85 and 1.89 but it requires universe and needs to do many configs manually) https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/rust/ I've confirmed that rustc (without version specifier) available for noble is 1.75. $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
$ apt search rustc | grep rustc
rustc/noble-updates 1.75.0+dfsg0ubuntu1-0ubuntu7.1 amd64
rustc-1.74/noble 1.74.1+dfsg0ubuntu1-0ubuntu13 amd64
rustc-1.76/noble-updates,noble-security 1.76.0+dfsg0ubuntu1-0ubuntu0.24.04 amd64
rustc-1.77/noble-updates,noble-security 1.77.2+dfsg1ubuntu1-0ubuntu0.24.04 amd64
rustc-1.78/noble-updates,noble-security 1.78.0+dfsg1ubuntu1-0ubuntu0.24.04 amd64
rustc-1.79/noble-updates,noble-security 1.79.0+dfsg1ubuntu1-0ubuntu0.24.04 amd64
rustc-1.80/noble-updates,noble-security 1.80.1+dfsg0ubuntu1-0ubuntu0.24.04 amd64
rustc-1.81/noble-updates,noble-security 1.81.0+dfsg0ubuntu1-0ubuntu0.24.04 amd64
rustc-1.82/noble-updates,noble-security 1.82.0+dfsg0ubuntu0-0ubuntu0.24.04 amd64
rustc-1.83/noble-updates,noble-security 1.83.0+dfsg0ubuntu1~bpo2-0ubuntu0.24.04 amd64
rustc-1.84/noble-updates,noble-security 1.84.1+dfsg0ubuntu1~bpo2-0ubuntu2.24.04 amd64
rustc-1.85/noble-updates,noble-security 1.85.1+dfsg0ubuntu2~bpo0-0ubuntu0.24.04 amd64
rustc-1.89/noble-updates,noble-security 1.89.0+dfsg~24.04-0ubuntu0.24.04.1 amd64 |
Addressed this last point. Just waiting for CI now. |
|
I uninstalled both apt and script installed rust from my system. Then ran it with my last 2 suggestions applied: mfc@whale:~/projects/autoware$ rustc --version
Command 'rustc' not found, but can be installed with:
sudo snap install rustup # version 1.28.2, or
sudo apt install rustc # version 1.75.0+dfsg0ubuntu1-0ubuntu7.1
sudo apt install rustup # version 1.26.0-3
See 'snap info rustup' for additional versions.
mfc@whale:~/projects/autoware$ ansible-galaxy collection install -f -r "ansible-galaxy-requirements.yaml"
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'autoware.dev_env:0.1.0' to '/home/mfc/.ansible/collections/ansible_collections/autoware/dev_env'
Created collection for autoware.dev_env:0.1.0 at /home/mfc/.ansible/collections/ansible_collections/autoware/dev_env
autoware.dev_env:0.1.0 was installed successfully
mfc@whale:~/projects/autoware$ ansible-playbook autoware.dev_env.install_rust --ask-become-pass
BECOME password:
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [Download and install the rust packages] **********************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]
TASK [autoware.dev_env.rust : Download rustup-init script] *********************
ok: [localhost]
TASK [autoware.dev_env.rust : Install rustup using rustup-init script] *********
changed: [localhost]
TASK [autoware.dev_env.rust : Ensure ~/.cargo/bin is in PATH via .bashrc] ******
ok: [localhost]
TASK [autoware.dev_env.rust : Check cargo version] *****************************
ok: [localhost]
TASK [autoware.dev_env.rust : Show cargo version] ******************************
ok: [localhost] => {
"msg": "Cargo version: cargo 1.93.1 (083ac5135 2025-12-15)"
}
TASK [autoware.dev_env.rust : Check rust version] ******************************
ok: [localhost]
TASK [autoware.dev_env.rust : Show rust version] *******************************
ok: [localhost] => {
"msg": "Rust version: rustc 1.93.1 (01f6ddf75 2026-02-11)"
}
PLAY RECAP *********************************************************************
localhost : ok=8 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
mfc@whale:~/projects/autoware$ rustc --version
rustc 1.93.1 (01f6ddf75 2026-02-11)Confirmed it works. |
Co-authored-by: Mete Fatih Cırıt <mfc@autoware.org> Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
Co-authored-by: Mete Fatih Cırıt <mfc@autoware.org> Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
b35bcea to
69272ad
Compare
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>

Description
Previously, apt was used to install rust and cargo, however this results in issues when trying to build tera-renderer, which requires a more recent release than 1.75, which is the version that is installed when the former two are apt installed on a 22.04 system.
This PR was merged with the apt change based on this comment but this proved to be wrong as both local attempts, as well as CI attempts to compile tera-renderer failed.
The following is the failure log from the build, showing this issue.
This can be solved by installing rust, as it was previously in https://github.com/tier4/autoware_ecu_system_setup/pull/1654/changes before role was removed.
How was this PR tested?