GNOME Bugzilla – Bug 641239
evolution-data-server links against older out-of-tree libraries
Last modified: 2013-09-05 04:11:43 UTC
Been noticing this for a while now (basically with every ABI break). This is what I get, when I upgrade from e-d-s-2.91.5 to e-d-s-2.91.6: plaes@sol ~/code/gentoo/gnome $ for i in `qlist evolution-data-server | grep so$ `; do echo $i ; ldd $i |grep found ; done /usr/lib64/libedata-cal-1.2.so /usr/lib64/evolution-data-server/addressbook-backends/libebookbackendfile.so libcamel-1.2.so.22 => not found /usr/lib64/evolution-data-server/addressbook-backends/libebookbackendwebdav.so libcamel-1.2.so.22 => not found /usr/lib64/evolution-data-server/addressbook-backends/libebookbackendgoogle.so libcamel-1.2.so.22 => not found /usr/lib64/evolution-data-server/addressbook-backends/libebookbackendgroupwise.so libcamel-1.2.so.22 => not found /usr/lib64/evolution-data-server/addressbook-backends/libebookbackendvcf.so libcamel-1.2.so.22 => not found /usr/lib64/evolution-data-server/calendar-backends/libecalbackendgroupwise.so /usr/lib64/evolution-data-server/calendar-backends/libecalbackendcontacts.so libcamel-1.2.so.22 => not found /usr/lib64/evolution-data-server/calendar-backends/libecalbackendhttp.so /usr/lib64/evolution-data-server/calendar-backends/libecalbackendfile.so /usr/lib64/evolution-data-server/calendar-backends/libecalbackendcaldav.so /usr/lib64/evolution-data-server/calendar-backends/libecalbackendweather.so /usr/lib64/evolution-data-server/camel-providers/libcamelimap.so /usr/lib64/evolution-data-server/camel-providers/libcamelsendmail.so /usr/lib64/evolution-data-server/camel-providers/libcamelpop3.so /usr/lib64/evolution-data-server/camel-providers/libcamelgroupwise.so /usr/lib64/evolution-data-server/camel-providers/libcamelimapx.so /usr/lib64/evolution-data-server/camel-providers/libcamellocal.so /usr/lib64/evolution-data-server/camel-providers/libcamelsmtp.so /usr/lib64/evolution-data-server/camel-providers/libcamelnntp.so /usr/lib64/libedataserver-1.2.so /usr/lib64/libedata-book-1.2.so libcamel-1.2.so.22 => not found /usr/lib64/libecal-1.2.so /usr/lib64/libegroupwise-1.2.so /usr/lib64/libebackend-1.2.so /usr/lib64/libebook-1.2.so libcamel-1.2.so.22 => not found /usr/lib64/libedataserverui-3.0.so libcamel-1.2.so.22 => not found /usr/lib64/libcamel-provider-1.2.so /usr/lib64/libcamel-1.2.so
Thanks for a bug report. This seems to work fine for me, at least I do not see any such issue in my build tree, neither in the source tree. For example, I go to my source tree, just below evolution-data-server and run this command: for i in `find -name \*.so`; do echo $i ; ldd $i | grep found ; done (it's similar as that yours, I only do not have qlist here, but I expect this doing same results as that your command) and I get this result: > ./libedataserver/.libs/libedataserver-1.2.so > ./libebackend/.libs/libebackend-1.2.so > ./servers/groupwise/.libs/libegroupwise-1.2.so > ./libedataserverui/.libs/libedataserverui-3.0.so > ./addressbook/backends/groupwise/.libs/libebookbackendgroupwise.so > ./addressbook/backends/file/.libs/libebookbackendfile.so > ./addressbook/backends/google/.libs/libebookbackendgoogle.so > ./addressbook/backends/webdav/.libs/libebookbackendwebdav.so > ./addressbook/backends/ldap/.libs/libebookbackendldap.so > ./addressbook/backends/vcf/.libs/libebookbackendvcf.so > ./addressbook/libebook/.libs/libebook-1.2.so > ./addressbook/libedata-book/.libs/libedata-book-1.2.so > ./camel/providers/imapx/.libs/libcamelimapx.so > ./camel/providers/groupwise/.libs/libcamelgroupwise.so > ./camel/providers/imap/.libs/libcamelimap.so > ./camel/providers/nntp/.libs/libcamelnntp.so > ./camel/providers/local/.libs/libcamellocal.so > ./camel/providers/smtp/.libs/libcamelsmtp.so > ./camel/providers/sendmail/.libs/libcamelsendmail.so > ./camel/providers/pop3/.libs/libcamelpop3.so > ./camel/.libs/libcamel-1.2.so > ./camel/.libs/libcamel-provider-1.2.so > ./calendar/backends/weather/.libs/libecalbackendweather.so > ./calendar/backends/http/.libs/libecalbackendhttp.so > ./calendar/backends/groupwise/.libs/libecalbackendgroupwise.so > ./calendar/backends/caldav/.libs/libecalbackendcaldav.so > ./calendar/backends/file/.libs/libecalbackendfile.so > ./calendar/backends/contacts/.libs/libecalbackendcontacts.so > ./calendar/libedata-cal/.libs/libedata-cal-1.2.so > ./calendar/libecal/.libs/libecal-1.2.so and no not-found. When you are compiling to /usr/lib64, are those files with "not-found" also rewritten, together with the libcamel-1.2 file? They should be, but it seems to me that they are not for some reason. Could that be that those files are not in /usr/lib64, but /usr/lib?
The issue is *only* visible if the soname of the system-installed e-d-s is different from the current source: try installing e-d-s-2.91.5 system wide and see whether the libraries built in source tree still are linked to local e-d-s libs, not system ones...
I tried to simulate the issue by copying my /usr/lib64/libcamel-1.2.* to my build prefix (which is /build/local/lib) and the only I see is a warning during compilation of eds: libtool: install: warning: relinking `libebackend-1.2.la' libtool: install: warning: relinking `libegroupwise-1.2.la' libtool: install: warning: `libcamel-1.2.la' has not been installed in `/build/local/lib' libtool: install: warning: relinking `libcamel-1.2.la' and when invoking the comment #1 command, then I get no issue in both build directory for eds and the source directory of eds. I suppose the above libtool warning exhibits the issue you are seeing, only in a slightly different way for me than for you?
Shall we keep the bug open ?
This bug is triggered only in make install. I have just compiled evolution-data-server-3.0.2.1 on a system with evolution-data-server-2.32.2 installed. In the build directory after make, evolution-data-server-3.0.2.1/addressbook/libebook/.deps/libebook-1.2.so.10.3.1 is (correctly) linked with libcamel-1.2.so.23 However, in DESTDIR after make install, /usr/lib/libebook-1.2.so.10.3.1 is for some reason linked with libcamel-1.2.so.19, which belongs to eds-2.32.2.
Created attachment 199558 [details] ugly script to work around out-of-tree linking This is a perl script that we in Gentoo have had to resort to calling after "make" and before "make install" to work around the e-d-s's out-of-tree linking issue. Perhaps other distros or users building from source may also find it useful.
Out of curiosity, does it avoid warnings like this during make install? > libtool: install: warning: relinking `libcamel-1.2.la'
(In reply to comment #7) > Out of curiosity, does it avoid warnings like this during make install? > > libtool: install: warning: relinking `libcamel-1.2.la' No. But at least with the script, when it relinks, it doesn't relink to the wrong libraries :)
Closing as OBSOLETE. I'll happily review Makefile.am patches, but afaict we're doing things correctly to the extent that libtool allows.