So apparently libdbus-glib-1 has the priority to be linked first, and all invocations of the dbus-glib functions call into the system wide library firstly.
libgvfsdaemon.so doesn't not link to dbus-glib-1, but links to the local dbus-gmain.c, which means some other calls into libgvfsdaemon.so could end up calling the functions in dbus-gmain.c, which creates a more complicated mixture.
At this moment, and considering the upstream is working on a solution, I believe a quicker way would be to make libgvfsdaemon statically linked.
Checked with daemon/Makefile.am, obexftp is special because of a different linkage below:
gvfsd_ obexftp_ LDADD = $(OBEXFTP_LIBS) $(EXPAT_LIBS) $(libraries) obexftp_ LDADD += $(HAL_LIBS)
if USE_HAL
gvfsd_
endif
After configuration, OBEXFTP_LIBS is
OBEXFTP_LIBS = -ldbus-glib-1 -ldbus-1 -lpthread -lrt -lgobject-2.0 -lglib-2.0 -lbluetooth
So apparently libdbus-glib-1 has the priority to be linked first, and all invocations of the dbus-glib functions call into the system wide library firstly.
libgvfsdaemon.so doesn't not link to dbus-glib-1, but links to the local dbus-gmain.c, which means some other calls into libgvfsdaemon.so could end up calling the functions in dbus-gmain.c, which creates a more complicated mixture.
At this moment, and considering the upstream is working on a solution, I believe a quicker way would be to make libgvfsdaemon statically linked.