Skip to content

Rustup warns against installing i686 toolchains on x86_64 #1107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wks opened this issue Apr 10, 2024 · 0 comments · Fixed by #1109
Closed

Rustup warns against installing i686 toolchains on x86_64 #1107

wks opened this issue Apr 10, 2024 · 0 comments · Fixed by #1109
Labels
A-test Area: Testing

Comments

@wks
Copy link
Collaborator

wks commented Apr 10, 2024

rustup gave a warning when trying to install the i686-* toolchain:

error: DEPRECATED: future versions of rustup will require --force-non-host to install a non-host toolchain.
warning: toolchain '1.71.1-i686-unknown-linux-gnu' may not be able to run on this system.
warning: If you meant to build software to target that platform, perhaps try `rustup target add i686-unknown-linux-gnu` instead?

What's happening is that the host is actually an x86_64 (using the OS image ubuntu-22.04 from GitHub), although it is possible to run 32-bit programs using lib32 libraries. The ideal solution is

  • installing an x86_64-unknown-linux-gnu toolchain, and
  • adding an i686-unknonwn-linux-gnu target, and
  • invoking cargo build and other cargo commands with the --target command line option.
    • Alternatively we can override the default build target in Cargo.toml.
@wks wks added the A-test Area: Testing label Apr 10, 2024
wks added a commit to wks/mmtk-core that referenced this issue Apr 11, 2024
This fixes a problem of installing i686 toolchain on an x86_64 host.
Instead, we use the x86_64 toolchain, but add the i686 target and force
all cargo commands to use that target using the `CARGO_BUILD_TARGET`
environment variable.

Fixes: mmtk#1107
github-merge-queue bot pushed a commit that referenced this issue Apr 11, 2024
This fixes a problem of installing i686 toolchain on an x86_64 host when
running "Minimal tests - mmtk-core" on GitHub CI. Instead, we use the
x86_64 toolchain, but add the i686 target and force all cargo commands
to use that target using the `CARGO_BUILD_TARGET` environment variable.

Fixes: #1107
@wks wks closed this as completed in #1109 Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-test Area: Testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant