Skip to content

Rustup warns against installing i686 toolchains on x86_64 #1107

@wks

Description

@wks

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testArea: Testing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions