-
Notifications
You must be signed in to change notification settings - Fork 211
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
SIGSEGV when trying to link with nostartfiles flag #361
Comments
In this case the build script crashes and not rustc. Can you get a backtrace for the crash? |
Not really. GDB gives me this:
I tried on a couple machines, made sure I had glibc debug symbols installed, but no luck. Looks like the stack is completely trashed. And there's no symbols for build-script-build, so I can't break anywhere useful, either. |
Hi, I ran into this myself, took some time, but I figured out why this happens and found a solution that resolved the situation for me. In my situation, I have I found rust-lang/cargo#9453, which specifically details the feature we need in this case, we do want to pass this flag to the target, but not to any build scripts because they just won't run with this flag. This rust-lang/cargo#9634 PR and rust-lang/cargo#9753 this one have some more details around it all. As far as I understand it, there currently is a difference between TL;DR: Build with the target specified on the command line; |
Does setting these env varibles fix it?
|
That doesn't resolve the issue. The build-plan output shows the |
Oh, minimum stable version for this to work should be |
I'm on yesterday's nightly |
This is an issue in cargo and not compiler-builtins, you should open an issue there. |
I'm getting a SIGSEGV error when I try to build a project that depends on compiler-builtins, when passing the nostartfiles flag to the linker. I can also reproduce this in the git master branch of compiler-builtins with the .cargo/config file below:
.cargo/config:
Rust version:
rustc 1.45.0-nightly (74e804683 2020-05-30)
It seems similar to issue #338, but that seems like it may have been already addressed back in rust 1.41, given info in the linked Rust bug.
The text was updated successfully, but these errors were encountered: