Skip to content

Rustc doesn't link c++ std lib #44926

Closed
Closed
@shayanjm

Description

@shayanjm

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 runcargo clean && cargo test: https://gist.github.com/shayanjm/aa7a9ebb0bddd1beb8ec4f3d3f87463b

On 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 retrying cargo clean && cargo test.

I've also verified that libc++ has the symbols in question via nm -gU /usr/lib/libc++dylib | grep dynamic, which returned 0000000000018c54 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions