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

warning: could not find referenced DIE when compiling on macOS #82005

Closed
djc opened this issue Feb 11, 2021 · 4 comments
Closed

warning: could not find referenced DIE when compiling on macOS #82005

djc opened this issue Feb 11, 2021 · 4 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-LTO Area: Link-time optimization (LTO) C-bug Category: This is a bug. O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@djc
Copy link
Contributor

djc commented Feb 11, 2021

I just did some of my first compiles with 1.50.0 and I'm getting these warnings:

  = note: warning: could not find referenced DIE
          note: while processing /Users/djc/src/bolt/rust/target/release/deps/build_index.build_index.cf635v6f-cgu.15.rcgu.o
          warning: could not find referenced DIE
          note: while processing /Users/djc/src/bolt/rust/target/release/deps/build_index.build_index.cf635v6f-cgu.15.rcgu.o
          warning: could not find referenced DIE
          note: while processing /Users/djc/src/bolt/rust/target/release/deps/build_index.build_index.cf635v6f-cgu.15.rcgu.o
          warning: could not find referenced DIE
          note: while processing /Users/djc/src/bolt/rust/target/release/deps/build_index.build_index.cf635v6f-cgu.15.rcgu.o

This was after running cargo run --release --bin build-index -- version in my (proprietary) project on macOS (Big Sur 11.2.1).

djc-2019 IDS-326/build-index-version rust $ cargo version
cargo 1.50.0 (f04e7fab7 2021-02-04)

I suspect this may have something to do with the split debuginfo stuff?

@djc
Copy link
Contributor Author

djc commented Feb 11, 2021

For what it's worth, this workspace has the following configuration:

[profile.release]
debug = true
lto = true

I also see warnings like this:

          warning: inconsistent range data.
          note: while processing emitting debug_ranges
          warning: inconsistent range data.
          note: while processing emitting debug_ranges
          warning: inconsistent range data.
          note: while processing emitting debug_ranges
          warning: inconsistent range data.
          note: while processing emitting debug_ranges
          warning: inconsistent range data.
          note: while processing emitting debug_ranges
          warning: no mapping for range.

@ehuss ehuss transferred this issue from rust-lang/cargo Feb 11, 2021
@ehuss
Copy link
Contributor

ehuss commented Feb 11, 2021

Transferring to rust-lang/rust, since this looks like a linking issue. Split-debuginfo is in 1.51, not 1.50.

Some more information may be helpful. Which version of xcode are you using? What is dsymutil --version? Does it happen with LTO disabled? Does it happen with "thin" LTO?

Looking at other users reporting similar things, this sounds like maybe some issue with rustc's version of LLVM doing something incompatible with dsymutil, though I'm not sure.

@djc
Copy link
Contributor Author

djc commented Feb 11, 2021

I have Xcode "Version 12.4 (12D4e)".

djc-2019 ~ $ dsymutil --version
Apple LLVM version 11.0.0 (clang-1100.0.33.12)
  Optimized build.
  Default target: x86_64-apple-darwin20.3.0
  Host CPU: skylake

If I don't enable lto, I don't see these warnings. If I set lto to thin, I also don't see these warnings.

@jonas-schievink jonas-schievink added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-LTO Area: Link-time optimization (LTO) labels Feb 11, 2021
@DianQK
Copy link
Member

DianQK commented Jul 22, 2023

#111167 should have fixed this.

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.) A-LTO Area: Link-time optimization (LTO) C-bug Category: This is a bug. O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants