Skip to content

Link jemalloc with C++ stdlib #43586

@ishitatsuyuki

Description

@ishitatsuyuki

The new jemalloc is causing issue with dylib linking. It's missing one of the libstdc++ symbols.

/tmp/rustdoctest.FVvtw8VcGTYm/rust_out: symbol lookup error: /usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd-0fc58a047151a831.so: undefined symbol: __cxa_end_catch

C++ matters were added to jemalloc "recently", but Rust haven't merged that yet. That's why it can be only reproduced on Arch, which uses system up-to-date jemalloc.

One of the effects: nix-rust/nix#708

Some solutions I can think:

  • link system jemalloc dynamically.
  • link jemalloc with stdlib.
  • building with the --disable-cxx flag. This however doesn't allow existing system library built with C++ extensions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions