Skip to content

Linking issue with Rust 1.37.0 #64340

Closed
Closed
@vitvakatu

Description

@vitvakatu

See build log.

It looks like name mangling doesn't work correctly when linking with a dynamic library which is also depends on libstd.

The application structure is the following:

  1. Large dylib crate java_bindings, containing 400+ dependencies and is dynamically linked to libstd.dylib.
  2. exonum-java binary application, depends on java_bindings and is dynamically linked to libstd.dylib.

The compilation works well on Rust 1.36.0, but doesn't work on 1.37.0 and nightly versions (such as rustc 1.39.0-nightly (c6e9c76c5 2019-09-04)).

To reproduce:

git clone https://github.com/exonum/exonum-java-binding
cd exonum-java-binding/exonum-java-binding/core/rust/exonum-java
rustup default nightly
cargo build

Sorry for such heavy project, couldn't reproduce on an easier example.

Metadata

Metadata

Assignees

Labels

A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions