-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Duplicate symbols produced in armv7-linux-androideabi
staticlib targets starting with rustc 1.54
#93310
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
armv7-linux-androideabi
staticlib targets starting with rustc 1.54
Digging into the static libraries, I see the
The above symbols are all already defined by separate single object files in all versions of rustc, resulting in duplicate symbols in 1.54+. They are contained in object files that look like this:
Some of the symbols in
|
This might be related to rust-lang/compiler-builtins#420 |
Update compiler_builtins to fix duplicate symbols in `armv7-linux-androideabi` rlib I ran `./x.py dist --host= --target=armv7-linux-androideabi` before this diff: ``` $ nm build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv7-linux-androideabi/lib/libcompiler_builtins-3d9661a82c59c66a.rlib 2> /dev/null | grep __sync_fetch_and_add_4 | wc -l 2 ``` And after: ``` $ nm build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv7-linux-androideabi/lib/libcompiler_builtins-ffd2745070943321.rlib 2> /dev/null | grep __sync_fetch_and_add_4 | wc -l 1 ``` Fixes rust-lang#93310 See also rust-lang/compiler-builtins#449 and rust-lang/compiler-builtins#450
Update compiler_builtins to fix duplicate symbols in `armv7-linux-androideabi` rlib I ran `./x.py dist --host= --target=armv7-linux-androideabi` before this diff: ``` $ nm build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv7-linux-androideabi/lib/libcompiler_builtins-3d9661a82c59c66a.rlib 2> /dev/null | grep __sync_fetch_and_add_4 | wc -l 2 ``` And after: ``` $ nm build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv7-linux-androideabi/lib/libcompiler_builtins-ffd2745070943321.rlib 2> /dev/null | grep __sync_fetch_and_add_4 | wc -l 1 ``` Fixes rust-lang#93310 See also rust-lang/compiler-builtins#449 and rust-lang/compiler-builtins#450
…roideabi` rlib I ran `./x.py dist --host= --target=armv7-linux-androideabi` before this diff: ``` $ nm build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv7-linux-androideabi/lib/libcompiler_builtins-3d9661a82c59c66a.rlib 2> /dev/null | grep __sync_fetch_and_add_4 | wc -l 2 ``` And after: ``` $ nm build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv7-linux-androideabi/lib/libcompiler_builtins-ffd2745070943321.rlib 2> /dev/null | grep __sync_fetch_and_add_4 | wc -l 1 ``` Fixes rust-lang#93310
Uh oh!
There was an error while loading. Please reload this page.
I see broken staticlib compilation when targeting
armv7-linux-androideabi
using any version of rustc >= 1.54, including 1.58.1. Specifically, there are a few symbols that are duplicated. Minimal repro below:An even easier way to confirm the issue is to directly look at the compiler builtins rlib for
armv7-linux-androideabi
:The regression may have happened in compiler_builtins between its version 0.1.39 and 0.1.45:
Linking this staticlib later results in duplicate symbol errors because of the above.
The text was updated successfully, but these errors were encountered: