Skip to content
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

Duplicate symbols when linking Android on Rust 1.60 #415

Open
YuhanLiin opened this issue Apr 21, 2022 · 1 comment
Open

Duplicate symbols when linking Android on Rust 1.60 #415

YuhanLiin opened this issue Apr 21, 2022 · 1 comment
Labels
Android Only Android related issues Java/JNI Case specific only for Java/JNI interface generation may be bug

Comments

@YuhanLiin
Copy link
Contributor

When building multiple crates that export Android APIs via flapigen, the final linking step fails with the error: ld error: duplicate symbol: JNI_OnLoad. This only happens on Rust 1.60 and not older versions. This is caused because of rust-lang/rust#83822, which removes support for duplicate symbols on Android targets.

@Dushistov Dushistov added Java/JNI Case specific only for Java/JNI interface generation Android Only Android related issues may be bug labels Apr 21, 2022
@Dushistov
Copy link
Owner

Not sure that going to fix this. This project is designed to work with the idea that only top level crate uses flapigen.
Not the many crate provides C API and somehow combined into big library, the idea that all crates provide Rust API,
and only top level crate provides C API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Only Android related issues Java/JNI Case specific only for Java/JNI interface generation may be bug
Projects
None yet
Development

No branches or pull requests

2 participants