Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMultiple codegen units breaks linking: "undefined reference to rust_begin_unwind" #47074
Comments
This comment has been minimized.
This comment has been minimized.
|
After bisecting it seems that this broke between nightly-2017-12-27 (good) and nightly-2017-12-28 (bad). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton the |
This comment has been minimized.
This comment has been minimized.
|
Ok cool, makes sense! In that case I believe this is indeed the same issue as #18807. The compiler knows who needs I believe the correct fix here (and for #18807) is for rustc to detect which crate defines |
alexcrichton
added
the
A-linkage
label
Dec 31, 2017
This comment has been minimized.
This comment has been minimized.
|
ugh, I'm now seeing this linker error in another project when compiling it using the dev profile even though codegen-units is set to 1 and incremental is disabled in the Cargo.toml. My current fix is ... to enable LTO on the dev profile. @alexcrichton any chance you'll have to time soon to implement the fix you mentioned? Otherwise I can look into it next week, probably. |
This comment has been minimized.
This comment has been minimized.
|
@japaric unfortunately I don't think I'll have time to look into this, but I can certainly help out with questions if they come up! |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton alright. I'll ping you on IRC when I get a chance to look into this. |
japaric
referenced this issue
Feb 26, 2018
Closed
Fix linking issues when using multiple codegen units #53
dvc94ch
added a commit
to riscv-rust/riscv-crates
that referenced
this issue
Feb 27, 2018
japaric
added a commit
to rust-embedded/discovery
that referenced
this issue
Mar 2, 2018
bors bot
added a commit
to rust-embedded/discovery
that referenced
this issue
Mar 2, 2018
This was referenced Mar 14, 2018
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 23, 2018
alexcrichton
referenced this issue
Mar 23, 2018
Merged
rustc: Group linked libraries where needed #49316
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 23, 2018
This comment has been minimized.
This comment has been minimized.
|
I've opened a PR for this at #49316 |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 23, 2018
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 25, 2018
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 25, 2018
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 27, 2018
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 28, 2018
bors
added a commit
that referenced
this issue
Mar 29, 2018
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 29, 2018
bors
added a commit
that referenced
this issue
Mar 29, 2018
bors
closed this
in
#49316
Mar 30, 2018
XAMPPRocky
added a commit
to XAMPPRocky/rust
that referenced
this issue
May 1, 2018
berkus
added a commit
to metta-systems/vesper
that referenced
this issue
Nov 10, 2018
This comment has been minimized.
This comment has been minimized.
MightyPork
commented
Feb 12, 2019
•
|
I just had something similar with It's an error in the final linking stage, but when I use
the work-around from here also helped
|
japaric commentedDec 30, 2017
•
edited
STR
Meta
cc @alexcrichton @clebi