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

binstall tries to build for x86_64-unknown-linux-musl instead of x86_64-unknown-linux-gnu #1420

Closed
tyilo opened this issue Sep 28, 2023 · 8 comments · Fixed by #1421
Closed

Comments

@tyilo
Copy link
Contributor

tyilo commented Sep 28, 2023

I haven't got the x86_64-unknown-linux-musl rust target installed, but binstall still tries to use it when building crates from source.
I am using Arch Linux.

$ cargo binstall -V
1.4.2
$ rustup target list --installed
aarch64-linux-android
aarch64-unknown-linux-gnu
armv7-linux-androideabi
armv7-unknown-linux-gnueabihf
i686-linux-android
i686-pc-windows-gnu
i686-unknown-linux-gnu
thumbv7neon-linux-androideabi
x86_64-linux-android
x86_64-pc-windows-gnu
x86_64-unknown-linux-gnu
cargo binstall --verbose rtx-cli
$ cargo binstall --verbose rtx-cli
DEBUG using (/home/tyilo/.cargo) as cargo home
DEBUG Using install path: /home/tyilo/.cargo/bin
 WARN Failed to read git credential file /home/tyilo/.git-credentials err=Os { code: 2, kind: NotFound, message: "No such file or directory" }
DEBUG get_target_from_rustc()=Some("x86_64-unknown-linux-gnu")
DEBUG Running `/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --version`: err=Os { code: 2, kind: NotFound, message: "No such file or directory" }
DEBUG Running `/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --version`: err=Os { code: 2, kind: NotFound, message: "No such file or directory" }
DEBUG `/lib/ld-linux-x86-64.so.2 --version`: status=exit status: 0, stdout='ld.so (GNU libc) stable release version 2.38.
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
', stderr=''
 INFO resolve: Resolving package: 'rtx-cli'
DEBUG resolve:fetch_crate_matched{self=SparseRegistry { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/", query: None, fragment: None }, dl_template: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 293321873 }, state: Ready { rem: 1 } }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" version_req=VersionReq { comparators: [] }}: Downloading from: 'https://index.crates.io/config.json'
DEBUG resolve:fetch_crate_matched{self=SparseRegistry { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/", query: None, fragment: None }, dl_template: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 293321873 }, state: Ready { rem: 1 } }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" version_req=VersionReq { comparators: [] }}: Downloading from: 'https://index.crates.io/rt/x-/rtx-cli'
DEBUG resolve:fetch_crate_matched{self=SparseRegistry { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/", query: None, fragment: None }, dl_template: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 293321873 }, state: Ready { rem: 1 } }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" version_req=VersionReq { comparators: [] }}:parse_manifest{client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" crate_url=Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None } version="2023.9.2" cksum="9776d1814ee45fa72b2ede693fbf66ddf6db2502756fd158673ab86e7c341102"}: Fetching crate from: https://crates.io/api/v1/crates/rtx-cli/2023.9.2/download and extracting Cargo.toml from it
DEBUG resolve:fetch_crate_matched{self=SparseRegistry { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/", query: None, fragment: None }, dl_template: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 293321873 }, state: Ready { rem: 1 } }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" version_req=VersionReq { comparators: [] }}:parse_manifest{client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" crate_url=Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None } version="2023.9.2" cksum="9776d1814ee45fa72b2ede693fbf66ddf6db2502756fd158673ab86e7c341102"}:and_visit_tar{self=Download { client: Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None }, data_verifier: Some(PhantomData<&mut dyn binstalk_downloader::download::DataVerifier>) } fmt=Tgz}: Downloading from: 'https://crates.io/api/v1/crates/rtx-cli/2023.9.2/download'
DEBUG resolve:fetch_crate_matched{self=SparseRegistry { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/", query: None, fragment: None }, dl_template: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 293321873 }, state: Ready { rem: 1 } }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" version_req=VersionReq { comparators: [] }}:parse_manifest{client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" crate_url=Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None } version="2023.9.2" cksum="9776d1814ee45fa72b2ede693fbf66ddf6db2502756fd158673ab86e7c341102"}:and_visit_tar{self=Download { client: Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None }, data_verifier: Some(PhantomData<&mut dyn binstalk_downloader::download::DataVerifier>) } fmt=Tgz}: Downloading and extracting then in-memory processing
DEBUG resolve:fetch_crate_matched{self=SparseRegistry { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/", query: None, fragment: None }, dl_template: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 293321873 }, state: Ready { rem: 1 } }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" version_req=VersionReq { comparators: [] }}:parse_manifest{client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" crate_url=Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None } version="2023.9.2" cksum="9776d1814ee45fa72b2ede693fbf66ddf6db2502756fd158673ab86e7c341102"}:and_visit_tar{self=Download { client: Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None }, data_verifier: Some(PhantomData<&mut dyn binstalk_downloader::download::DataVerifier>) } fmt=Tgz}: Extracting from Tgz archive to process it in memory
DEBUG resolve:fetch_crate_matched{self=SparseRegistry { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/", query: None, fragment: None }, dl_template: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 293321873 }, state: Ready { rem: 1 } }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" version_req=VersionReq { comparators: [] }}:parse_manifest{client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" crate_url=Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None } version="2023.9.2" cksum="9776d1814ee45fa72b2ede693fbf66ddf6db2502756fd158673ab86e7c341102"}:and_visit_tar{self=Download { client: Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None }, data_verifier: Some(PhantomData<&mut dyn binstalk_downloader::download::DataVerifier>) } fmt=Tgz}: Download, extraction and in-memory procession OK
DEBUG resolve:fetch_crate_matched{self=SparseRegistry { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/", query: None, fragment: None }, dl_template: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 293321873 }, state: Ready { rem: 1 } }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" version_req=VersionReq { comparators: [] }}:parse_manifest{client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191620, tv_nsec: 552363733 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } }) crate_name="rtx-cli" crate_url=Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("crates.io")), port: None, path: "/api/v1/crates/rtx-cli/2023.9.2/download", query: None, fragment: None } version="2023.9.2" cksum="9776d1814ee45fa72b2ede693fbf66ddf6db2502756fd158673ab86e7c341102"}: Loading manifest directly from extracted file
DEBUG resolve: Building metadata for target: x86_64-unknown-linux-musl
DEBUG resolve: Found metadata: PkgMeta { pkg_url: None, pkg_fmt: None, bin_dir: Some("rtx/bin/rtx"), signing: None, overrides: {} }
DEBUG Downloading from: 'https://raw.githubusercontent.com/cargo-bins/cargo-quickinstall/main/supported-targets'
DEBUG get_repo_info{self=Data { name: "rtx-cli", version: "2023.9.2", repo: Some("https://github.com/jdx/rtx"), repo_info: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191621, tv_nsec: 218168771 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } })}: Downloading from: 'https://github.com/jdx/rtx'
DEBUG Checking for package at: 'https://github.com/cargo-bins/cargo-quickinstall/releases/download/rtx-cli-2023.9.2/rtx-cli-2023.9.2-x86_64-unknown-linux-musl.tar.gz'
DEBUG Using GitHub API to check for existence of artifact, which will also cache the API response
DEBUG Sending graphql query to https://api.github.com/graphql: '{"query":"\nquery {\n  repository(owner:\"cargo-bins\",name:\"cargo-quickinstall\") {\n    release(tagName:\"rtx-cli-2023.9.2\") {\n      releaseAssets(first:100) {\n        nodes { name }\n        pageInfo { endCursor hasNextPage }\n      }\n    }\n  }\n}"}'
DEBUG Downloading from: 'https://api.github.com/graphql'
DEBUG get_repo_info{self=Data { name: "rtx-cli", version: "2023.9.2", repo: Some("https://github.com/jdx/rtx"), repo_info: OnceCell { value: None } } client=Client(Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, service: DelayRequest { inner: Mutex { data: Inner { client: Client { accepts: Accepts { gzip: true, brotli: true, deflate: true }, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*", "user-agent": "cargo-binstall/1.4.2"} }, num_request: 1, per: 10ms, until: Instant { tv_sec: 191621, tv_nsec: 218168771 }, state: Limited }, poisoned: false, .. }, hosts_to_delay: Mutex { data: {}, poisoned: false, .. } } })}: Resolved repo_info = RepoInfo {
    repo: Url {
        scheme: "https",
        cannot_be_a_base: false,
        username: "",
        password: None,
        host: Some(
            Domain(
                "github.com",
            ),
        ),
        port: None,
        path: "/jdx/rtx",
        query: None,
        fragment: None,
    },
    repository_host: GitHub,
    subcrate: None,
}
DEBUG render url template template=Template { items: [Key("repo"), Text("/releases/download/"), Key("version"), Text("/"), Key("name"), Text("-"), Key("target"), Text("-v"), Key("version"), Key("archive-suffix"), Text("")], default: None } context=Context { name: "rtx-cli", repo: Some("https://github.com/jdx/rtx"), target: "x86_64-unknown-linux-musl", version: "2023.9.2", archive_format: Some("tar"), binary_ext: "", subcrate: None, url: None, .. }
DEBUG render url template template=Template { items: [Key("repo"), Text("/releases/download/"), Key("version"), Text("/"), Key("name"), Text("-"), Key("target"), Text("-v"), Key("version"), Key("archive-suffix"), Text("")], default: None } context=Context { name: "rtx-cli", repo: Some("https://github.com/jdx/rtx"), target: "x86_64-unknown-linux-musl", version: "2023.9.2", archive_format: Some("tbz2"), binary_ext: "", subcrate: None, url: None, .. }
DEBUG Checking for package at: 'https://github.com/jdx/rtx/releases/download/2023.9.2/rtx-cli-x86_64-unknown-linux-musl-v2023.9.2.tar'
DEBUG render url template template=Template { items: [Key("repo"), Text("/releases/download/"), Key("version"), Text("/"), Key("name"), Text("-"), Key("target"), Text("-v"), Key("version"), Key("archive-suffix"), Text("")], default: None } context=Context { name: "rtx-cli", repo: Some("https://github.com/jdx/rtx"), target: "x86_64-unknown-linux-musl", version: "2023.9.2", archive_format: Some("tar.bz2"), binary_ext: "", subcrate: None, url: None, .. }
DEBUG Using GitHub API to check for existence of artifact, which will also cache the API response
DEBUG Sending graphql query to https://api.github.com/graphql: '{"query":"\nquery {\n  repository(owner:\"jdx\",name:\"rtx\") {\n    release(tagName:\"2023.9.2\") {\n      releaseAssets(first:100) {\n        nodes { name }\n        pageInfo { endCursor hasNextPage }\n      }\n    }\n  }\n}"}'
DEBUG Downloading from: 'https://api.github.com/graphql'
DEBUG render url template template=Template { items: [Key("repo"), Text("/releases/download/"), Key("version"), Text("/"), Key("name"), Text("-"), Key("target"), Text("-v"), Key("version"), Key("archive-suffix"), Text("")], default: None } context=Context { name: "rtx-cli", repo: Some("https://github.com/jdx/rtx"), target: "x86_64-unknown-linux-musl", version: "2023.9.2", archive_format: Some("tgz"), binary_ext: "", subcrate: None, url: None, .. }
DEBUG render url template template=Template { items: [Key("repo"), Text("/releases/download/"), Key("version"), Text("/"), Key("name"), Text("-"), Key("target"), Text("-v"), Key("version"), Key("archive-suffix"), Text("")], default: None } context=Context { name: "rtx-cli", repo: Some("https://github.com/jdx/rtx"), target: "x86_64-unknown-linux-musl", version: "2023.9.2", archive_format: Some("tar.gz"), binary_ext: "", subcrate: None, url: None, .. }
DEBUG Checking for package at: 'https://github.com/jdx/rtx/releases/download/2023.9.2/rtx-cli-x86_64-unknown-linux-musl-v2023.9.2.tbz2'
DEBUG Checking for package at: 'https://github.com/jdx/rtx/releases/download/2023.9.2/rtx-cli-x86_64-unknown-linux-musl-v2023.9.2.tar.bz2'
DEBUG Using GitHub API to check for existence of artifact, which will also cache the API response
DEBUG Using GitHub API to check for existence of artifact, which will also cache the API response
DEBUG Checking for package at: 'https://github.com/jdx/rtx/releases/download/2023.9.2/rtx-cli-x86_64-unknown-linux-musl-v2023.9.2.tgz'
DEBUG Using GitHub API to check for existence of artifact, which will also cache the API response
DEBUG render url template template=Template { items: [Key("repo"), Text("/releases/download/"), Key("version"), Text("/"), Key("name"), Text("-"), Key("target"), Text("-v"), Key("version"), Key("archive-suffix"), Text("")], default: None } context=Context { name: "rtx-cli", repo: Some("https://github.com/jdx/rtx"), target: "x86_64-unknown-linux-musl", version: "2023.9.2", archive_format: Some("txz"), binary_ext: "", subcrate: None, url: None, .. }
DEBUG Checking for package at: 'https://github.com/jdx/rtx/releases/download/2023.9.2/rtx-cli-x86_64-unknown-linux-musl-v2023.9.2.tar.gz'
...
DEBUG Using GitHub API to check for existence of artifact, which will also cache the API response
DEBUG render url template template=Template { items: [Key("repo"), Text("/releases/download/v"), Key("version"), Text("/"), Key("name"), Text("_"), Key("target"), Key("archive-suffix"), Text("")], default: None } context=Context { name: "rtx-cli", repo: Some("https://github.com/jdx/rtx"), target: "x86_64-unknown-linux-musl", version: "2023.9.2", archive_format: Some("bin"), binary_ext: "", subcrate: None, url: None, .. }
DEBUG Checking for package at: 'https://github.com/jdx/rtx/releases/download/v2023.9.2/rtx-cli_x86_64-unknown-linux-musl.zip'
DEBUG Using GitHub API to check for existence of artifact, which will also cache the API response
DEBUG render url template template=Template { items: [Key("repo"), Text("/releases/download/v"), Key("version"), Text("/"), Key("name"), Text("_"), Key("target"), Key("archive-suffix"), Text("")], default: None } context=Context { name: "rtx-cli", repo: Some("https://github.com/jdx/rtx"), target: "x86_64-unknown-linux-musl", version: "2023.9.2", archive_format: Some("bin"), binary_ext: "", subcrate: None, url: None, .. }
DEBUG Checking for package at: 'https://github.com/jdx/rtx/releases/download/v2023.9.2/rtx-cli_x86_64-unknown-linux-musl'
DEBUG Checking for package at: 'https://github.com/jdx/rtx/releases/download/v2023.9.2/rtx-cli_x86_64-unknown-linux-musl.bin'
DEBUG Using GitHub API to check for existence of artifact, which will also cache the API response
DEBUG Using GitHub API to check for existence of artifact, which will also cache the API response
 WARN The package rtx-cli v2023.9.2 will be installed from source (with cargo)
DEBUG Sending installation report to quickinstall (https://warehouse-clerk-tmp.vercel.app/api/crate/rtx-cli-2023.9.2-x86_64-unknown-linux-musl.tar.gz)
DEBUG Downloading from: 'https://warehouse-clerk-tmp.vercel.app/api/crate/rtx-cli-2023.9.2-x86_64-unknown-linux-musl.tar.gz'
Do you wish to continue? yes/[no]
? yes
DEBUG Running `/home/tyilo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo install rtx-cli --version 2023.9.2 --target x86_64-unknown-linux-musl`
DEBUG Spawned command pid=Some(1143865)
    Updating crates.io index
  Installing rtx-cli v2023.9.2
    Updating crates.io index
   Compiling libc v0.2.148
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.67
   Compiling unicode-ident v1.0.12
   Compiling once_cell v1.18.0
   Compiling pkg-config v0.3.27
   Compiling vcpkg v0.2.15
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-unknown-linux-musl` target may not be installed
  = help: consider downloading the target with `rustup target add x86_64-unknown-linux-musl`

error[E0463]: can't find crate for compiler_builtins

For more information about this error, try rustc --explain E0463.
error: could not compile cfg-if (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for std
|
= note: the x86_64-unknown-linux-musl target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl

error[E0463]: can't find crate for alloc
--> /home/tyilo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:370:1
|
370 | extern crate alloc;
| ^^^^^^^^^^^^^^^^^^^ can't find crate

^CDEBUG run time: 62.563349961s ] 2/311: vcpkg, proc-macro2(build.rs), autocfg, libc(build.rs), libc(build.rs), once_cell, pkg-config
WARN Installation cancelled

@NobodyXu
Copy link
Member

Thanks, I will submit a fix for this shortly.

It is surprising how glibc from different distro behaves so differently.

@tyilo
Copy link
Contributor Author

tyilo commented Sep 28, 2023

Is there a reason for not always using the same target as cargo install does?

@NobodyXu
Copy link
Member

Is there a reason for not always using the same target as cargo install does?

On NixOS, there isn't a global libc in /lib, the glibc is put in a different location as a separate nix package.

If someone installed rustc on NixOS with glibc, the rustc -vV will give x86_64-unknown-linux-gnu, however downloaded gnu binaries cannot run due to missing libc.

NobodyXu added a commit that referenced this issue Sep 28, 2023
Fixed #1420

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@tyilo
Copy link
Contributor Author

tyilo commented Sep 28, 2023

Shouldn't a user of such as system configure cargo to use x86_64-unknown-linux-musl as the default target?

NobodyXu added a commit that referenced this issue Sep 29, 2023
Fixed #1420

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@JCallicoat
Copy link

JCallicoat commented Sep 29, 2023

I was about to post about this same issue. I checked on arch and fedora37 - 39/rawhide and they all have the vanilla GNU libc instead of ubuntu's GLIBC in the ld-linux output, but I just saw @NobodyXu fixed that in 104b399.

Another problem is that fedora ld-linux is under /lib64/ld-linux-x86-64.so.2 / /usr/lib64/ld-linux-x86-64.so.2 so it would not be found by the three locations here.

format!("/lib/ld-linux-{cpu_arch_suffix}.so.2"),
format!("/lib/{cpu_arch}-linux-gnu/ld-linux-{cpu_arch_suffix}.so.2"),
format!("/usr/lib/{cpu_arch}-linux-gnu/ld-linux-{cpu_arch_suffix}.so.2"),

@tyilo
Copy link
Contributor Author

tyilo commented Sep 29, 2023

It seems to me that the target for building shouldn't necessarily be the same as for downloading.
For building it should always be a target that is installed, otherwise it would fail anyway. So if the user only has one of musl and gnu targets, that target should always be picked no matter what the detection algorithm determines.

@NobodyXu
Copy link
Member

Thanks for the feedback @JCallicoat @tyilo

I will also add PR for lib64 glibc and fallback to cargo without the --target

NobodyXu added a commit that referenced this issue Sep 29, 2023
Fixed #1420

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu
Copy link
Member

@tyilo Opened #1430 for your idea

github-merge-queue bot pushed a commit that referenced this issue Sep 30, 2023
* Fix `detect-targets` glibc detection

Fixed #1420

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `detect-targets` glibc detection for Fedora

Fedora 37-39 has glibc installed in `/lib64` and `/usr/lib64` instead of
`/lib` or `/usr/lib`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Improve caching in `detect-targets-alpine-test`

Make sure it reuses cached artifacts instead of recompiling everything.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Mv `test-detect-targets-musl.sh` into `.github/scripts/`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor `ci.yml`: Extract new job `detect-targets-build`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* FIx `detect-targets-ubuntu-test`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Avoid building the entire workspacein `detect-targets-build`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `detect-targets-*-test`: `chmod +x detect-targets`

Also fixed testing on Alpine, to make sure it exits with status 1 on
assertion failure.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix typo

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Cache all crates in `detect-targets-build`

Since `detect-targets` rarely changes and is quite small, it is also
reasonable to cache it.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add job `detect-targets-more-glibc-test`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add `detect-targets-nix-test`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `detect-targets-nix-test` executing `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix workflow: Add all `detect-targets-*` jobs to be dep of `tests-pass`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants