-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Test run-pass\sepcomp-lib-lto.rs fails with ODR violation in debug mode #25270
Comments
I've reproduced this issue on one more machine with Windows 8.1. I don't know why build bots don't catch it. |
Probably a duplicate of #26447
|
Should actually be a dupe of #23566 which is closed by now. Can you check if this is fixed as well? Thanks! |
@dotdash
|
This test still fails as of commit f18c2aa (at least when using MSVC):
|
The problem here seems to be that the namespaces recorded in the typenames and debuginfo don't always use the original create name, but "sometimes"(?) use the alias from That way we get a duplicate definition for a |
Updated the title to reflect that this isn't specific to Windows. |
This also affects |
Somewhat unexpectedly, this also affects |
Just ran into this, so I can confirm this is still an issue |
The problem is present also on OS X with recent update 10.11.4 and XCode 7.3. I have test the master branch My configuration was:
My test command was:
The backtrace is the following:
|
Nominating so that compiler team addresses how to prioritize this. |
triage: I-nominated T-compiler |
(in particular, the fact that this is now visible on Windows and on later versions of Mac OS X is a sign that this problem is going to become a more significant problem for us than it has been in the past...) |
triage: P-medium |
It's on my radar. |
I've managed to replicate this bug in an Ubuntu virtual machine with llvm 3.8 from a fresh pull request. I built as per ituxbag above using |
I'm seeing this on Arch Linux now as well. |
Additionally, |
Just hit this issue trying to compile cargo with |
This reflects the fact that currently rust-lang/rust#25270 seems to be solved for nightly builds
Still fails today--it would be really nice to see this fixed. I'd like use LTO for my embedded platform to get smaller binaries. (I already use --gc-sections, but LTO would be even better.) |
On top of that, it looks like that, even if I set |
@whitequark FWIW it is possible to get this running with LTO -- we use LTO for Tock. You just need to, as you mentioned, ensure libcore (and friends) are compiled without debug symbols for now. One simple way to do that for libcore is to depend on the |
That crate seems quite outdated, but also not really enough. Currently I build the following for my target:
It would be great if there was some elegant way to build all that with Cargo, but for now I don't see it... putting stuff on crates.io is onerous and especially so when tracking nightlies is desired, adding Rust as a submodule brings in a massive dependency into your project, and I've had issues with that before simply because the networks over here aren't very good and some build tools (cough_conda_cough) aren't very smart. |
@whitequark Take a look at the implementation of the rust-libcore crate. It's really just a Note: obviously none of this solves the underlying bug, but just something to hold us non-compiler-folks while the professionals figure this out |
That would work well if I didn't also have to use a fork of Rust (the upstream doesn't define the ABI or have the LLVM target initialization for my architecture). But thanks for telling anyway, I might be able to use this in some other form. The complete lack of caching and reliance on POSIX sh is still an issue... |
I tried to reproduce it with the commands described in #25270 (comment) on nightly, but I couldn't. Can someone else also try it? |
New to Rust, but this was halting my first ever compile of Redox. I read this: rust-lang/cargo#1691 and changed I have a Mac running OSX 10.12.2 and Xcode 8.2.1 with Rust Nightly |
…richton Add regression test for debuginfo + LTO Fixes rust-lang#25270, which cannot be reproduced with the current nightly version of the compiler anymore (due to various fixes to debuginfo generation in the past). Should we run into the "possible ODR violation" again, the test added by this PR can be extend with the new case. r? @alexcrichton
I'm using msys2 x64 on Windows 7 and a fresh clone of Rust.
cc #23566
The text was updated successfully, but these errors were encountered: