Closed as not planned
Description
Problem
When attempting to build with the --target=aarch64-unknown-linux-musl
target it produces the error:
Compiling test-lib v0.1.0 (/home/ec2-user/test-lib)
error[E0463]: can't find crate for `profiler_builtins`
|
= note: the compiler may have been built without the profiler runtime
For more information about this error, try `rustc --explain E0463`.
error: could not compile `test-lib` due to previous error
Steps
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
cargo new test-lib
cd test-lib
rustup target add aarch64-unknown-linux-musl
export RUSTFLAGS="-Cinstrument-coverage"
cargo build --target=aarch64-unknown-linux-musl
Possible Solution(s)
It has been suggested this may be a specific issue with the -Cinstructment-coverage
flag not currently being supported in this toolchain.
Notes
I've been suggested a related PR: rust-lang/rust#79556.
I found a similar issue rust-lang/rust#81684.
neofetch
:
`-/oydNNdyo:.` ec2-user@ip-172-31-36-240.eu-west-2.compute.internal
`.:+shmMMMMMMMMMMMMMMmhs+:.` ----------------------------------------------------
-+hNNMMMMMMMMMMMMMMMMMMMMMMNNho- OS: Amazon Linux 2 aarch64
.`` -/+shmNNMMMMMMNNmhs+/- ``. Host: Amazon EC2
dNmhs+:. `.:/oo/:.` .:+shmNd Kernel: 5.10.135-122.509.amzn2.aarch64
dMMMMMMMNdhs+:.. ..:+shdNMMMMMMMd Uptime: 57 mins
dMMMMMMMMMMMMMMNds odNMMMMMMMMMMMMMMd Packages: 526 (rpm)
dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd Shell: bash 4.2.46
dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd Terminal: node
dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd CPU: (64)
dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd Memory: 2142MiB / 128555MiB
dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd
dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd
dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd
dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd
dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd
.:+ydNMMMMMMMMMMMh yMMMMMMMMMMMNdy+:.
`.:+shNMMMMMh yMMMMMNhs+:``
`-+shy shs+:`
rustc --version --verbose
:
rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: aarch64-unknown-linux-gnu
release: 1.64.0
LLVM version: 14.0.6
cargo build --target=aarch64-unknown-linux-musl -vvv
:
Compiling test-lib v0.1.0 (/home/ec2-user/test-lib)
Running `CARGO=/home/ec2-user/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=test-lib CARGO_CRATE_NAME=test_lib CARGO_MANIFEST_DIR=/home/ec2-user/test-lib CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=test-lib CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/ec2-user/test-lib/target/debug/deps:/home/ec2-user/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib:/home/ec2-user/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib' rustc --crate-name test_lib --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=14081f7fcdbc2abc -C extra-filename=-14081f7fcdbc2abc --out-dir /home/ec2-user/test-lib/target/aarch64-unknown-linux-musl/debug/deps --target aarch64-unknown-linux-musl -C incremental=/home/ec2-user/test-lib/target/aarch64-unknown-linux-musl/debug/incremental -L dependency=/home/ec2-user/test-lib/target/aarch64-unknown-linux-musl/debug/deps -L dependency=/home/ec2-user/test-lib/target/debug/deps -Cinstrument-coverage`
error[E0463]: can't find crate for `profiler_builtins`
|
= note: the compiler may have been built without the profiler runtime
For more information about this error, try `rustc --explain E0463`.
error: could not compile `test-lib` due to previous error
Caused by:
process didn't exit successfully: `CARGO=/home/ec2-user/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=test-lib CARGO_CRATE_NAME=test_lib CARGO_MANIFEST_DIR=/home/ec2-user/test-lib CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=test-lib CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/ec2-user/test-lib/target/debug/deps:/home/ec2-user/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib:/home/ec2-user/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib' rustc --crate-name test_lib --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=14081f7fcdbc2abc -C extra-filename=-14081f7fcdbc2abc --out-dir /home/ec2-user/test-lib/target/aarch64-unknown-linux-musl/debug/deps --target aarch64-unknown-linux-musl -C incremental=/home/ec2-user/test-lib/target/aarch64-unknown-linux-musl/debug/incremental -L dependency=/home/ec2-user/test-lib/target/aarch64-unknown-linux-musl/debug/deps -L dependency=/home/ec2-user/test-lib/target/debug/deps -Cinstrument-coverage` (exit status: 1)
Rustup version
rustup 1.25.1 (bb60b1e89 2022-07-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.64.0 (a55dd71d5 2022-09-19)`
Installed toolchains
Default host: aarch64-unknown-linux-gnu
rustup home: /home/ec2-user/.rustup
installed targets for active toolchain
--------------------------------------
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
active toolchain
----------------
stable-aarch64-unknown-linux-gnu (default)
rustc 1.64.0 (a55dd71d5 2022-09-19)