Undefined symbol when loading plugin
Hello,
First of all thank you for your work on this project, being able to use GStreamer through Rust is just amazing! I'm currently writing some custom plugins and I'm having an issue that I can't seem to debug myself. I built my plugin without any issue but it doesn't want to be loaded because of a missing symbol when I inspect it:
$ gst-inspect-1.0 ../target/debug/libgstgbt.so
(gst-inspect-1.0:134149): GStreamer-WARNING **: 19:48:02.112: Failed to load plugin '../target/debug/libgstgbt.so': ../target/debug/libgstgbt.so: undefined symbol: _ZN58_$LT$glib..value..GetError$u20$as$u20$core..fmt..Debug$GT$3fmt17h65361abc613071b3E
Could not load plugin file: Opening module failed: ../target/debug/libgstgbt.so: undefined symbol: _ZN58_$LT$glib..value..GetError$u20$as$u20$core..fmt..Debug$GT$3fmt17h65361abc613071b3E
Running ldd
on the plugin gives me this, which seems normal:
$ ldd ../target/debug/libgstgbt.so
linux-vdso.so.1 (0x00007fff21b31000)
libgstmeta.so => $HOME/gbt/target/debug/libgstmeta.so (0x00007f2ffb08b000)
libstd-672309112770bee9.so => $HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libstd-672309112770bee9.so (0x00007f2ffad99000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2ffab87000)
libgstvideo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0 (0x00007f2feb92d000)
libgstbase-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0 (0x00007f2feb8af000)
libgstreamer-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007f2feb768000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f2feb708000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f2feb5df000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2feb5ba000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2feb59f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2feb3ad000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2ffc1e1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2feb25e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2feb258000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2feb24b000)/lib/libgomp-75eea7e8.so.1 (0x00007f2feb026000)
liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007f2feafa3000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f2feaf9d000)
libffi.so.7 => /usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007f2feaf91000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f2feaf1e000)
I don't know if that's relevant but I created a dynamic library with Meta APIs (libgstmeta.so
) so I can share it between different plugins.
My guess is that it has to do with something I don't know about the way dynamic linking works.
Any tip about how to debug this would be highly appreciated :)