Canonicalize the library path returned by dladdr
On systems using UsrMerge (like openSUSE or Fedora), /lib64 is a symlink to /usr/lib64. So dladdr is returning the path to the gstreamer library in /lib64 in priv_gst_get_relocated_libgstreamer. Later gst_plugin_loader_spawn tries to build the path to the gst-plugin-scanner helper from /lib64 and ends up trying to use /lib64/../libexec/gstreamer-1.0/gst-plugin-scanner which doesn't exist.
By canonicalizing the path with a call to realpath, gst-plugin-scanner is found correctly under /usr/lib64/../libexec/gstreamer-1.0/gst-plugin-scanner
Fixes: #2877 (closed)
Edited by Antonio Larrosa