undefined symbol: _ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17hd0ba07f053fd4c7fE
My project structure:
parent
main.rs # binary, loads libchild.so via libloading
lib.rs # dylib, shared code
child
lib.rs # dylib, dynamically linked to libparent.so
This compiles fine, but fails to load libchild.so when compiled on anything newer than 1.36.0. If the parent library is made non-dylib, it works fine, however this is not a viable solution for my project as it causes libchild.so to contain all the shared code, and my project has many libchild.so-equivalent crates.
Demo case: https://github.com/GinjaNinja32/rust-issues/tree/undefined-symbol-core-fmt-debug (has 70 dependency crates, mostly indirect; I'm not sure exactly where it goes wrong or how to make it smaller)
Bisected to merge dbebcee, #59752.
rustc 1.39.0 (4560ea788 2019-11-04)
binary: rustc
commit-hash: 4560ea788cb760f0a34127156c78e2552949f734
commit-date: 2019-11-04
host: x86_64-unknown-linux-gnu
release: 1.39.0
LLVM version: 9.0
undefined symbol: _ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17hd0ba07f053fd4c7fEMy project structure:
This compiles fine, but fails to load
libchild.sowhen compiled on anything newer than 1.36.0. If theparentlibrary is made non-dylib, it works fine, however this is not a viable solution for my project as it causeslibchild.soto contain all the shared code, and my project has manylibchild.so-equivalent crates.Demo case: https://github.com/GinjaNinja32/rust-issues/tree/undefined-symbol-core-fmt-debug (has 70 dependency crates, mostly indirect; I'm not sure exactly where it goes wrong or how to make it smaller)
Bisected to merge dbebcee, #59752.