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

incorrect value for codegen option split-debuginfo #11659

Closed
omac777 opened this issue Jan 31, 2023 · 10 comments
Closed

incorrect value for codegen option split-debuginfo #11659

omac777 opened this issue Jan 31, 2023 · 10 comments
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.

Comments

@omac777
Copy link

omac777 commented Jan 31, 2023

Problem

The error output was:

error: incorrect value `...` for codegen option `split-debuginfo` - one of supported split-debuginfo modes (`off`, `packed`, or `unpacked`) was expected

error: could not compile `libc` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `proc-macro2` due to previous error
error: could not compile `autocfg` due to previous error
error: could not compile `unicode-ident` due to previous error
error: could not compile `quote` due to previous error
error: could not compile `cfg-if` due to previous error
error: could not compile `serde_derive` due to previous error
error: could not compile `syn` due to previous error

Steps

  1. did a rustup update

nightly-x86_64-unknown-linux-gnu updated - rustc 1.69.0-nightly (001a77fac 2023-01-30) (from rustc 1.68.0-nightly (61a415be5 2023-01-12))

  1. set the env variable as requested in https://blog.rust-lang.org/inside-rust/2023/01/30/cargo-sparse-protocol.html

CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

  1. then proceeded to build an app
cargo clean
cargo update
RUSTFLAGS=-Awarnings cargo +nightly build --release

Possible Solution(s)

No response

Notes

No response

Version

rustc 1.69.0-nightly (001a77fac 2023-01-30)
@omac777 omac777 added the C-bug Category: bug label Jan 31, 2023
@omac777
Copy link
Author

omac777 commented Jan 31, 2023

I tried to revert to a previous nightly and the above error remains.

@weihanglo
Copy link
Member

You may want to check your Cargo.toml or .cargo/config.toml if there is any profile.split-debuginfo being set.

I guess someone copy-pasting the split-debuginfo = "..." from the sample configuration here.

@weihanglo weihanglo added the S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. label Jan 31, 2023
@omac777
Copy link
Author

omac777 commented Jan 31, 2023

I checked everywhere in all my Cargo.toml files in my workspace and there were no occurrences there.

There is no file .cargo/config.toml

I checked the .cargo/ looking for Cargo.toml files containing "..." and found some occurrences but nothing with split-debuginfo being used.

 $ find ~/.cargo/ -name "Cargo.toml" -print|xargs grep -n -H "\.\.\."
/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/toml-0.5.11/Cargo.toml:57:replace = "...{{tag_name}}"
/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/toml-0.5.11/Cargo.toml:80:[Unreleased]: https://github.com/toml-rs/toml_edit/compare/{{tag_name}}...HEAD"""
/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-1.0.23/Cargo.toml:19:description = "Quasi-quoting macro quote!(...)"
/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/env_logger-0.10.0/Cargo.toml:50:replace = "...{{tag_name}}"
/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/env_logger-0.10.0/Cargo.toml:73:[Unreleased]: https://github.com/rust-cli/env_logger/compare/{{tag_name}}...HEAD"""
/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_lex-0.2.4/Cargo.toml:48:replace = "...{{tag_name}}"
/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_lex-0.2.4/Cargo.toml:71:[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD"""
/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.23/Cargo.toml:66:replace = "...{{tag_name}}"
/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.23/Cargo.toml:89:[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD"""

My only suggestion is that the rust compiler could help out here and indicate what crate/file/line the occurrence was found as the origin of this error reported.

I re-ran my build like so:

cargo +nightly-x86_64-unknown-linux-gnu build --release --verbose --verbose --verbose
Here's the verbose error output, but I'm finding it hard to read and understand.

     Running `CARGO=/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.152 CARGO_PKG_AUTHORS='Erick Tryzelaar <[email protected]>:David Tolnay <[email protected]>' CARGO_PKG_DESCRIPTION='Macros 1.1 implementation of #[derive(Serialize, Deserialize)]' CARGO_PKG_HOMEPAGE='https://serde.rs' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=serde_derive CARGO_PKG_REPOSITORY='https://github.com/serde-rs/serde' CARGO_PKG_RUST_VERSION=1.31 CARGO_PKG_VERSION=1.0.152 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=152 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib' /var/home/davidm/.cargo/bin/sccache rustc --crate-name build_script_build /var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.152/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=238 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=... -C debuginfo=0 -C debug-assertions=off --cfg 'feature="default"' -C metadata=bd4c0e60a12d6a61 -C extra-filename=-bd4c0e60a12d6a61 --out-dir /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/build/serde_derive-bd4c0e60a12d6a61 -C linker=/usr/bin/clang -L dependency=/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps --cap-lints warn -Clink-arg=-fuse-ld=lld -Zshare-generics=y -Clink-arg=-fuse-ld=lld -Zshare-generics=y`
error: incorrect value `...` for codegen option `split-debuginfo` - one of supported split-debuginfo modes (`off`, `packed`, or `unpacked`) was expected

error: could not compile `autocfg` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=autocfg CARGO_MANIFEST_DIR=/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/autocfg-1.1.0 CARGO_PKG_AUTHORS='Josh Stone <[email protected]>' CARGO_PKG_DESCRIPTION='Automatic cfg for Rust compiler features' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='Apache-2.0 OR MIT' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=autocfg CARGO_PKG_REPOSITORY='https://github.com/cuviper/autocfg' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=1.1.0 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib' /var/home/davidm/.cargo/bin/sccache rustc --crate-name autocfg /var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/autocfg-1.1.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=238 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C split-debuginfo=... -C debuginfo=0 -C debug-assertions=off -C metadata=d9a5599000218fcf -C extra-filename=-d9a5599000218fcf --out-dir /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps -C linker=/usr/bin/clang -L dependency=/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps --cap-lints warn -Clink-arg=-fuse-ld=lld -Zshare-generics=y -Clink-arg=-fuse-ld=lld -Zshare-generics=y` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
error: could not compile `unicode-ident` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=unicode_ident CARGO_MANIFEST_DIR=/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-ident-1.0.6 CARGO_PKG_AUTHORS='David Tolnay <[email protected]>' CARGO_PKG_DESCRIPTION='Determine whether characters have the XID_Start or XID_Continue properties according to Unicode Standard Annex #31' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='(MIT OR Apache-2.0) AND Unicode-DFS-2016' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=unicode-ident CARGO_PKG_REPOSITORY='https://github.com/dtolnay/unicode-ident' CARGO_PKG_RUST_VERSION=1.31 CARGO_PKG_VERSION=1.0.6 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=6 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib' /var/home/davidm/.cargo/bin/sccache rustc --crate-name unicode_ident --edition=2018 /var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-ident-1.0.6/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=238 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C split-debuginfo=... -C debuginfo=0 -C debug-assertions=off -C metadata=197acc11bdba6b9a -C extra-filename=-197acc11bdba6b9a --out-dir /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps -C linker=/usr/bin/clang -L dependency=/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps --cap-lints warn -Clink-arg=-fuse-ld=lld -Zshare-generics=y -Clink-arg=-fuse-ld=lld -Zshare-generics=y` (exit status: 1)
error: could not compile `cfg-if` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=cfg_if CARGO_MANIFEST_DIR=/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0 CARGO_PKG_AUTHORS='Alex Crichton <[email protected]>' CARGO_PKG_DESCRIPTION='A macro to ergonomically define an item depending on a large number of #[cfg]
  parameters. Structured like an if-else chain, the first matching branch is the
  item that gets emitted.
  ' CARGO_PKG_HOMEPAGE='https://github.com/alexcrichton/cfg-if' CARGO_PKG_LICENSE=MIT/Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=cfg-if CARGO_PKG_REPOSITORY='https://github.com/alexcrichton/cfg-if' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=1.0.0 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib' /var/home/davidm/.cargo/bin/sccache rustc --crate-name cfg_if --edition=2018 /var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=238 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C split-debuginfo=... -C codegen-units=256 -C debuginfo=0 -C metadata=a9a4e0b94902a777 -C extra-filename=-a9a4e0b94902a777 --out-dir /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps -C linker=/usr/bin/clang -L dependency=/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps --cap-lints warn -Clink-arg=-fuse-ld=lld -Zshare-generics=y -Clink-arg=-fuse-ld=lld -Zshare-generics=y` (exit status: 1)
error: could not compile `libc` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.139 CARGO_PKG_AUTHORS='The Rust Project Developers' CARGO_PKG_DESCRIPTION='Raw FFI bindings to platform libraries like libc.
  ' CARGO_PKG_HOMEPAGE='https://github.com/rust-lang/libc' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=libc CARGO_PKG_REPOSITORY='https://github.com/rust-lang/libc' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.139 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=139 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib' /var/home/davidm/.cargo/bin/sccache rustc --crate-name build_script_build /var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.139/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=238 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=... -C debuginfo=0 -C debug-assertions=off --cfg 'feature="align"' --cfg 'feature="default"' --cfg 'feature="extra_traits"' --cfg 'feature="std"' -C metadata=dac8c7fb3a17a9ac -C extra-filename=-dac8c7fb3a17a9ac --out-dir /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/build/libc-dac8c7fb3a17a9ac -C linker=/usr/bin/clang -L dependency=/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps --cap-lints warn -Clink-arg=-fuse-ld=lld -Zshare-generics=y -Clink-arg=-fuse-ld=lld -Zshare-generics=y` (exit status: 1)
error: could not compile `quote` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-1.0.23 CARGO_PKG_AUTHORS='David Tolnay <[email protected]>' CARGO_PKG_DESCRIPTION='Quasi-quoting macro quote'\!'(...)' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=quote CARGO_PKG_REPOSITORY='https://github.com/dtolnay/quote' CARGO_PKG_RUST_VERSION=1.31 CARGO_PKG_VERSION=1.0.23 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=23 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib' /var/home/davidm/.cargo/bin/sccache rustc --crate-name build_script_build --edition=2018 /var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-1.0.23/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=238 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=... -C debuginfo=0 -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=dac0e993138ff886 -C extra-filename=-dac0e993138ff886 --out-dir /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/build/quote-dac0e993138ff886 -C linker=/usr/bin/clang -L dependency=/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps --cap-lints warn -Clink-arg=-fuse-ld=lld -Zshare-generics=y -Clink-arg=-fuse-ld=lld -Zshare-generics=y` (exit status: 1)
error: could not compile `proc-macro2` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.50 CARGO_PKG_AUTHORS='David Tolnay <[email protected]>:Alex Crichton <[email protected]>' CARGO_PKG_DESCRIPTION='A substitute implementation of the compiler'\''s `proc_macro` API to decouple token-based libraries from the procedural macro use case.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=proc-macro2 CARGO_PKG_REPOSITORY='https://github.com/dtolnay/proc-macro2' CARGO_PKG_RUST_VERSION=1.31 CARGO_PKG_VERSION=1.0.50 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=50 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib' /var/home/davidm/.cargo/bin/sccache rustc --crate-name build_script_build --edition=2018 /var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.50/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=238 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=... -C debuginfo=0 -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="proc-macro"' --cfg 'feature="span-locations"' -C metadata=08705f9b69bb03c4 -C extra-filename=-08705f9b69bb03c4 --out-dir /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/build/proc-macro2-08705f9b69bb03c4 -C linker=/usr/bin/clang -L dependency=/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps --cap-lints warn -Clink-arg=-fuse-ld=lld -Zshare-generics=y -Clink-arg=-fuse-ld=lld -Zshare-generics=y` (exit status: 1)
error: could not compile `syn` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.107 CARGO_PKG_AUTHORS='David Tolnay <[email protected]>' CARGO_PKG_DESCRIPTION='Parser for Rust source code' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=syn CARGO_PKG_REPOSITORY='https://github.com/dtolnay/syn' CARGO_PKG_RUST_VERSION=1.31 CARGO_PKG_VERSION=1.0.107 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=107 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib' /var/home/davidm/.cargo/bin/sccache rustc --crate-name build_script_build --edition=2018 /var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.107/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=238 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=... -C debuginfo=0 -C debug-assertions=off --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' --cfg 'feature="visit"' --cfg 'feature="visit-mut"' -C metadata=4042059020d77f4e -C extra-filename=-4042059020d77f4e --out-dir /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/build/syn-4042059020d77f4e -C linker=/usr/bin/clang -L dependency=/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps --cap-lints warn -Clink-arg=-fuse-ld=lld -Zshare-generics=y -Clink-arg=-fuse-ld=lld -Zshare-generics=y` (exit status: 1)
error: could not compile `serde_derive` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.152 CARGO_PKG_AUTHORS='Erick Tryzelaar <[email protected]>:David Tolnay <[email protected]>' CARGO_PKG_DESCRIPTION='Macros 1.1 implementation of #[derive(Serialize, Deserialize)]' CARGO_PKG_HOMEPAGE='https://serde.rs' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=serde_derive CARGO_PKG_REPOSITORY='https://github.com/serde-rs/serde' CARGO_PKG_RUST_VERSION=1.31 CARGO_PKG_VERSION=1.0.152 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=152 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/var/home/davidm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib' /var/home/davidm/.cargo/bin/sccache rustc --crate-name build_script_build /var/home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.152/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=238 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=... -C debuginfo=0 -C debug-assertions=off --cfg 'feature="default"' -C metadata=bd4c0e60a12d6a61 -C extra-filename=-bd4c0e60a12d6a61 --out-dir /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/build/serde_derive-bd4c0e60a12d6a61 -C linker=/usr/bin/clang -L dependency=/var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/target/release/deps --cap-lints warn -Clink-arg=-fuse-ld=lld -Zshare-generics=y -Clink-arg=-fuse-ld=lld -Zshare-generics=y` (exit status: 1)

@weihanglo
Copy link
Member

Have you checked the config discovery chain?

You could also use the unstable cargo config command to help you find where is the origin of a config value.

cargo +nightly config get -Z unstable-options --show-origin

@weihanglo
Copy link
Member

Just saw you use -Zshare-generics=y and other unstable features. Maybe you have installed fleet before? I got an impression that they had a bad configuration back in the day. dimensionhq/fleet#55

@omac777
Copy link
Author

omac777 commented Jan 31, 2023

I was searching for occurrences in all Cargo.toml files within my workspace, but I never searched for occurrences in all config.toml files within my workspace and your command caught that. That helped a great deal. thank you.

 $ cargo +nightly config get -Z unstable-options --show-origin
build.rustc-wrapper = "/var/home/davidm/.cargo/bin/sccache" # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
profile.dev.codegen-units = 512 # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
profile.dev.debug = 2 # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
profile.dev.incremental = true # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
profile.dev.opt-level = 0 # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
profile.release.codegen-units = 256 # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
profile.release.debug = 0 # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
profile.release.incremental = false # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
profile.release.opt-level = 3 # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
profile.release.split-debuginfo = "..." # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
target.x86_64-apple-darwin.rustflags = [
    "-C", # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
    "link-arg=-fuse-ld=/usr/local/bin/zld", # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
    "-Zshare-generics=y", # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
    "-Csplit-debuginfo=unpacked", # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
    "-C", # /var/home/davidm/mfwrstools23Apr2022/.cargo/config.toml
    "link-arg=-fuse-ld=/usr/local/bin/zld", # /var/home/davidm/mfwrstools23Apr2022/.cargo/config.toml
    "-Zshare-generics=y", # /var/home/davidm/mfwrstools23Apr2022/.cargo/config.toml
    "-Csplit-debuginfo=unpacked", # /var/home/davidm/mfwrstools23Apr2022/.cargo/config.toml
]
target.x86_64-pc-windows-msvc.linker = "rust-lld.exe" # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
target.x86_64-pc-windows-msvc.rustflags = [
    "-Zshare-generics=y", # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
    "-Zshare-generics=y", # /var/home/davidm/mfwrstools23Apr2022/.cargo/config.toml
]
target.x86_64-unknown-linux-gnu.linker = "/usr/bin/clang" # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
target.x86_64-unknown-linux-gnu.rustflags = [
    "-Clink-arg=-fuse-ld=lld", # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
    "-Zshare-generics=y", # /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
    "-Clink-arg=-fuse-ld=lld", # /var/home/davidm/mfwrstools23Apr2022/.cargo/config.toml
    "-Zshare-generics=y", # /var/home/davidm/mfwrstools23Apr2022/.cargo/config.toml
]
# The following environment variables may affect the loaded values.
# CARGO_HOME=/var/home/davidm/.cargo
davidm@carouselYOW 2023-01-31_17:49:33_EST : ~/mfwrstools23Apr2022/rs-mfw-wrkspc
 $ cat /var/home/davidm/mfwrstools23Apr2022/rs-mfw-wrkspc/.cargo/config.toml
[build]
rustc-wrapper = '/var/home/davidm/.cargo/bin/sccache'
[target.x86_64-unknown-linux-gnu]
rustflags = [
    '-Clink-arg=-fuse-ld=lld',
    '-Zshare-generics=y',
]
linker = '/usr/bin/clang'

[target.x86_64-pc-windows-msvc]
rustflags = ['-Zshare-generics=y']
linker = 'rust-lld.exe'

[target.x86_64-apple-darwin]
rustflags = [
    '-C',
    'link-arg=-fuse-ld=/usr/local/bin/zld',
    '-Zshare-generics=y',
    '-Csplit-debuginfo=unpacked',
]
[profile.dev]
opt-level = 0
debug = 2
incremental = true
codegen-units = 512

[profile.release]
opt-level = 3
debug = 0
incremental = false
codegen-units = 256
split-debuginfo = '...'

@omac777
Copy link
Author

omac777 commented Jan 31, 2023

I decided to go with split-debuginfo = 'packed'

@weihanglo
Copy link
Member

Glad you figure it out. Going to close this.

@omac777
Copy link
Author

omac777 commented Jan 31, 2023

Usually this workspace the build time takes 2-3 minutes. In this case, it actually completed it in 36 seconds. That's a startling improvement just by setting the CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse environment variable!!!

@omac777
Copy link
Author

omac777 commented Jan 31, 2023

Yes please close this issue. You're a super-hero @weihanglo :)
Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.
Projects
None yet
Development

No branches or pull requests

2 participants