-
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
Rustc doesn't link c++ std lib #44926
Comments
This doesn't feel like a If you can reduce this to a small example demonstrating that it's a |
Maybe this isn't the problem on your machine, but in the build.rs script, libc++ must be printed last. It's a really weird issue, I've just encountered this while fixing mozjs to build on FreeBSD. Somehow no one encountered it with Trying to build
— fixed that by, well, recompiling the system |
@myfreeweb unfortunately this didn't fix the build on my machine :( |
Based on a conversation on IRC, it appears this issue was resolved by switching from |
@retep998 +1 - I'll also be creating a PR to the upstream |
I am currently trying to work with https://github.com/flier/rust-hyperscan. I recently updated cargo via rustup and started noticing that my code breaks when run.
I am currently running MacOS 10.12.6 and rustc 1.20.0
This is a contrived example, mostly from the upstream "rust-hyperscan" project, which includes the output error I'm seeing when I run
cargo clean && cargo test
: https://gist.github.com/shayanjm/aa7a9ebb0bddd1beb8ec4f3d3f87463bOn L80 of build.rs (https://gist.github.com/shayanjm/aa7a9ebb0bddd1beb8ec4f3d3f87463b#file-build-rs-L80) I've verified that the
println!
runs as expected by changing c++ to something I know would break and retryingcargo clean && cargo test
.I've also verified that libc++ has the symbols in question via
nm -gU /usr/lib/libc++dylib | grep dynamic
, which returned0000000000018c54 I ___dynamic_cast
(the first "undefined symbol" in the error)Is this an issue with the way rustc is linking the c++ std lib? Or have I done something wrong?
The text was updated successfully, but these errors were encountered: