x86_64
作为我的一个项目的一部分,我必须i686
在 Linux 上交叉编译一个 Rust crate 。我目前正在为此使用 Travis CI,它带有一个简单的Hello World板条箱(默认的二进制板条箱)。我对相关矩阵条目的 Travis CI 配置是:
# ...
matrix:
include:
# ...
- os: linux
rust: 1.30.0
before_script:
- sudo apt-get update
- sudo apt-get install -y libc6-dev:i386
env: TARGET=i686-unknown-linux-gnu
# ...
script:
- rustup target install $TARGET
- cargo build --release --target=$TARGET
不幸的是,当我将此配置推送到 Travis CI 时,出现构建错误:
$ cargo build --release --target=$TARGET
Compiling test-rust-deploy-releases v0.1.0 (/home/travis/build/arnavb/test-rust-deploy-releases)
error: linker `cc` not found
|
= note: No such file or directory (os error 2)
error: aborting due to previous error
error: Could not compile `test-rust-deploy-releases`.
To learn more, run the command again with --verbose.
The command "cargo build --release --target=$TARGET" exited with 101.
我该如何解决?