Skip to content
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

Issues with aarch64-unknown-linux-musl #3095

Closed
JonathanWoollett-Light opened this issue Oct 17, 2022 · 3 comments
Closed

Issues with aarch64-unknown-linux-musl #3095

JonathanWoollett-Light opened this issue Oct 17, 2022 · 3 comments
Labels
bug not-rustup Whatever is described in this issue isn't Rustup's fault

Comments

@JonathanWoollett-Light
Copy link

JonathanWoollett-Light commented Oct 17, 2022

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:.`                [email protected] 
      `.:+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)
@petreeftime
Copy link

This is most likely related to rust-lang/rust#79556.

@briansmith
Copy link

Is this fixed after rust-lang/rust#111575 added the profiler builtins for this target?

@rami3l rami3l added the not-rustup Whatever is described in this issue isn't Rustup's fault label Jul 10, 2024
@rami3l
Copy link
Member

rami3l commented Jul 10, 2024

I'm now closing this issue due as inactive and out of scope. If this problem still persists, please feel free to transfer it to https://github.com/rust-lang/rust.

@rami3l rami3l closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug not-rustup Whatever is described in this issue isn't Rustup's fault
Projects
None yet
Development

No branches or pull requests

4 participants