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

Build fails with -Csplit-debuginfo is unstable on this platform #100657

Closed
gco opened this issue Aug 17, 2022 · 9 comments
Closed

Build fails with -Csplit-debuginfo is unstable on this platform #100657

gco opened this issue Aug 17, 2022 · 9 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. requires-custom-config This issue requires custom config/build for rustc in some way T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@gco
Copy link
Contributor

gco commented Aug 17, 2022

Building rust on Solaris-x86_64 for the past few releases (now 1.63.0), it seems that late in the build process it still uses the bootstrap compiler where it fails with:

`-Csplit-debuginfo` is unstable on this platform

from this code: compiler/rustc_session/src/config.rs:build_session_options()

The compiler is invoked with -Csplit-debuginfo=off, but that code doesn't handle "off" as disabling split-debuginfo.

Changing the error to a warning in the build tree does not workaround the issue, I have to change it to a warning in the previous version of rust used as a bootstrap compiler.

@gco gco added the C-bug Category: This is a bug. label Aug 17, 2022
This was referenced Aug 28, 2022
@siketyan
Copy link

Experiencing this when building for custom target (JSON file) on macOS (aarch64-apple-darwin) using Rust toolchain v1.65.0-nightly (2022-09-02)

@A1-Triard
Copy link

Can anybody suggest a workaround for this issue?

@Painter602
Copy link

I, get a similar message on Windows 10 Home:

error: -Csplit-debuginfo=unpacked is unstable on this platform

@DianaSensei
Copy link

I got same error -Csplit-debuginfo=unpacked is unstable on this platform` in Window 11 Pro version 22H2 build 22621.900 cargo 1.65 rustc 1.65

@lucasjinreal
Copy link

Same, clue?

@jyn514
Copy link
Member

jyn514 commented Apr 27, 2023

I think at this point all platforms support -C split-debuginfo=off except for MSVC:

PS C:\Users\jyn\src\rust> rg supported_split_debuginfo .\compiler\rustc_target\src\spec -A3 -g '!compiler/rustc_target/src/spec/mod.rs'
.\compiler\rustc_target\src\spec\windows_gnullvm_base.rs
44:        supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
45-        ..Default::default()
46-    }
47-}

.\compiler\rustc_target\src\spec\windows_gnu_base.rs
104:        supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
105-        ..Default::default()
106-    }
107-}

.\compiler\rustc_target\src\spec\msvc_base.rs
21:        supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Packed]),
22-        debuginfo_kind: DebuginfoKind::Pdb,
23-
24-        ..Default::default()

.\compiler\rustc_target\src\spec\linux_base.rs
14:        supported_split_debuginfo: Cow::Borrowed(&[
15-            SplitDebuginfo::Packed,
16-            SplitDebuginfo::Unpacked,
17-            SplitDebuginfo::Off,

.\compiler\rustc_target\src\spec\apple_base.rs
156:        supported_split_debuginfo: Cow::Borrowed(&[
157-            SplitDebuginfo::Packed,
158-            SplitDebuginfo::Unpacked,
159-            SplitDebuginfo::Off,

PS C:\Users\jyn\src\rust> rg -B1 \[SplitDebuginfo .\compiler\rustc_target\src\spec\mod.rs
1711-    /// Which kinds of split debuginfo are supported by the target?
1712:    pub supported_split_debuginfo: StaticCow<[SplitDebuginfo]>,
--
1958-            // `Off` is supported by default, but targets can remove this manually, e.g. Windows.
1959:            supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),

Are you still running into this issue?

@jyn514 jyn514 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Apr 27, 2023
@jyn514
Copy link
Member

jyn514 commented May 24, 2023

I'm going to close this since split-debuginfo=off has been stabilized everywhere except MSVC. I'm pretty sure this requires a custom config set anyway.

@jyn514 jyn514 closed this as completed May 24, 2023
@jyn514 jyn514 added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) requires-custom-config This issue requires custom config/build for rustc in some way labels May 24, 2023
@2l47
Copy link

2l47 commented Sep 13, 2023

@jyn514 I'm experiencing this issue on Debian stable using Rust 1.6.3 when simply trying to cargo install neon-cli.

@jyn514
Copy link
Member

jyn514 commented Sep 13, 2023

@2l47 you're using a distro-provided rustc with a rustup-provided cargo. don't do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. requires-custom-config This issue requires custom config/build for rustc in some way T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

8 participants