Skip to content

feat(ansible)!: install rust through rustup instead of apt#6825

Merged
xmfcx merged 12 commits intoautowarefoundation:mainfrom
PanConChicharron:arjun.ram/T4DEV-9960_rust_update_fix
Feb 18, 2026
Merged

feat(ansible)!: install rust through rustup instead of apt#6825
xmfcx merged 12 commits intoautowarefoundation:mainfrom
PanConChicharron:arjun.ram/T4DEV-9960_rust_update_fix

Conversation

@PanConChicharron
Copy link
Copy Markdown
Contributor

@PanConChicharron PanConChicharron commented Feb 18, 2026

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.

Starting >>> autoware_path_optimizer
--- stderr: autoware_path_optimizer
Downloading crates ...
error: failed to download globset v0.4.18

Caused by:
unable to get packages from source

Caused by:
failed to download replaced source registry crates-io

Caused by:
failed to parse manifest at /home/arjunram/.cargo/registry/src/index.crates.io-6f17d22bba15001f/globset-0.4.18/Cargo.toml

Caused by:
feature edition2024 is required

The package requires the Cargo feature called edition2024, but that feature is not stabilized in this version of Cargo (1.75.0).
Consider trying a more recent nightly release.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature.
gmake[2]: *** [src/acados_mpc/CMakeFiles/build_t_renderer.dir/build.make:71: src/acados_mpc/CMakeFiles/build_t_renderer] Error 101
gmake[1]: *** [CMakeFiles/Makefile2:238: src/acados_mpc/CMakeFiles/build_t_renderer.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
gmake[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
gmake: *** [Makefile:146: all] Error 2

Failed <<< autoware_path_optimizer [5.93s, exited with code 2]

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?

Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 18, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Comment thread ansible/roles/rust/tasks/main.yaml Outdated
Comment thread ansible/roles/rust/tasks/main.yaml Outdated
Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
Comment thread ansible/roles/rust/tasks/main.yaml Outdated
Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
Comment thread ansible/roles/rust/tasks/main.yaml Outdated
Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
@paulsohn paulsohn marked this pull request as ready for review February 18, 2026 08:32
@paulsohn paulsohn added the run:health-check Run health-check label Feb 18, 2026
@xmfcx
Copy link
Copy Markdown
Contributor

xmfcx commented Feb 18, 2026

In Ubuntu 24.04 apt rust version 1.92.0 and the latest stable version of rust is 1.93.1 so I'm guessing that it would work.

Can you make the .sh installation conditional for Ubuntu 22.04?

@xmfcx
Copy link
Copy Markdown
Contributor

xmfcx commented Feb 18, 2026

Also could you add - name: Check rust version as well? (It's same as cargo version most likely but let's have both logs.)

@paulsohn
Copy link
Copy Markdown
Collaborator

paulsohn commented Feb 18, 2026

@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

@xmfcx
Copy link
Copy Markdown
Contributor

xmfcx commented Feb 18, 2026

image

Oh I guess it's because I had rust installed with the script before this apt installation, the default is from that for me:

mfc@whale:~/projects/autoware$ which rustc
/home/mfc/.cargo/bin/rustc

I think the .sh installation is expected for rust so let's do it that way.

@PanConChicharron
Copy link
Copy Markdown
Contributor Author

Also could you add - name: Check rust version as well? (It's same as cargo version most likely but let's have both logs.)

Addressed this last point. Just waiting for CI now.

Comment thread ansible/roles/rust/tasks/main.yaml
Comment thread ansible/roles/rust/tasks/main.yaml Outdated
@xmfcx
Copy link
Copy Markdown
Contributor

xmfcx commented Feb 18, 2026

I uninstalled both apt and script installed rust from my system.
Opened up a clean terminal.

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.

PanConChicharron and others added 3 commits February 18, 2026 21:10
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>
Co-authored-by: Mete Fatih Cırıt <mfc@autoware.org>
Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
@PanConChicharron PanConChicharron force-pushed the arjun.ram/T4DEV-9960_rust_update_fix branch from b35bcea to 69272ad Compare February 18, 2026 12:11
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
Copy link
Copy Markdown
Contributor

@xmfcx xmfcx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the documentation to match with the new method: e020710

@xmfcx xmfcx requested a review from paulsohn February 18, 2026 12:29
@xmfcx xmfcx changed the title ci: fix to rust role feat(ansible)!: install rust through rustup instead of apt Feb 18, 2026
@xmfcx xmfcx merged commit ef1fcb9 into autowarefoundation:main Feb 18, 2026
18 checks passed
xmfcx added a commit that referenced this pull request Feb 20, 2026
xmfcx added a commit that referenced this pull request Feb 21, 2026
* revert: "feat(ansible)!: install rust through rustup instead of apt (#6825)"

This reverts commit ef1fcb9.

* revert: "feat(autoware_path_optimizer): meta-repository changes for acados (#6771)"

This reverts commit 73ee57b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:health-check Run health-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants