GNOME Bugzilla – Bug 342830
patches for -Wl,--as-needed
Last modified: 2009-11-19 21:56:34 UTC
Hello, Please see [1] for more information about as-needed. when compiling evolution exchange with as-needed you get errors such as: /usr/lib/libexchange-storage-1.2.so: undefined reference to `krb5_get_init_creds_opt_set_renew_life' /usr/lib/libexchange-storage-1.2.so: undefined reference to `krb5_get_init_creds_opt_set_tkt_life' /usr/lib/libexchange-storage-1.2.so: undefined reference to `krb5_free_principal' Therefore, you can see in [2] that KRB5_LDFLAGS were added to libexchange_storage. Then I noticed that libexchange_storage library was never linked to the kerberos libraries ( even when explicitly specifying the install/library/include locations ), and looked at configure.in. It was always failing to find kerberos because the test program does not include krb5.h. Therefore, I made a patch to fix that, along with the logic of the kerberos test since it was slightly wrong as well. see patch at [3] After compiling with these patches, you get errors like this: /usr/lib/libexchange-storage-1.2.so: undefined reference to `e_passwords_get_password' /usr/lib/libexchange-storage-1.2.so: undefined reference to `e_passwords_forget_password' /usr/lib/libexchange-storage-1.2.so: undefined reference to `e_passwords_ask_password' so, I added $(top_builddir)/libedataserverui/libedataserverui-1.2.la\ to LIBADD as you can see in [2]. However, that causes make to stop since libedataserverui is built after the servers directory. So, I created a new directory called 'server.deps'. The ebuild script and commands I used to move some build directories around are located at [4]. The portion you are interested in is after the "Upstream GNOME look here" section. The server.deps directory contains the following old directories: addressbook/backends/groupwise camel/providers/groupwise calendar/backends/groupwise You can see in [5] I have moved the servers directory after libedataserverui and added the server.deps directory after the servers directory. Please let me know if you find anything confusing, need clarification, or want anything revised. [1] http://www.gentoo.org/proj/en/qa/asneeded.xml [2] http://dev.gentoo.org/~allanonjl/temp/evolution-data-server-as-needed.patch [3] http://dev.gentoo.org/~allanonjl/temp/evolution-data-server-krb5-fix.patch [4] http://dev.gentoo.org/~allanonjl/temp/evolution-data-server-1.6.1.ebuild [5] http://dev.gentoo.org/~allanonjl/temp/evolution-data-server-order-fix.patch
*** Bug 356614 has been marked as a duplicate of this bug. ***
I can confirm that this is still an issue in evolution-data-server-1.8.
Currently, I have only 2.16.x version of binutils which is not quite right to try "--as-needed" and "Wl". Will install 2.17.x and commit this one after 2.9.6 release. Thanks for the patches.
Any news on this? It's still an issue on 2.9.91
None of those patches exist anymore, I get a 404. Can you attach them to this bug?
Created attachment 88718 [details] [review] as-needed patch The patch Gentoo Linux is applying to e-d-s 1.11.2 in the gnome experimental overlay. Patches also seen at http://overlays.gentoo.org/proj/gnome/browser/gnome-extra/evolution-data-server/files
Created attachment 88719 [details] The ebuild script used for building instructions for e-d-s in gentoo The latest ebuild script to see the "Upstream GNOME look here" parts
Attachment in comment #6 _seems to me_ to be all the three patches combined into one - probably for our downstream better use.
*** Bug 335038 has been marked as a duplicate of this bug. ***
An alternative solution would be to move the contents of servers/ up to the top level, and then build groupwise after libedataserver, and exchange after libedataserverui.
Confirmed, splitting servers/ into two top-level folders allows the build to complete if the configure.ac patch here is applied.
After chatting to srini, we think a better solution might be to move the exchange code into evolution-exchange. Veerapuram, what do you think of this?
I've committed the krb5 fix in configure.in for now, we'll sort out the other issues next.
Would it make sense to move the Camel provider to Evolution-Exchange as well?
Matthew: the Camel provider is already in evolution-exchange.
Ah, you're right. My bad.
Varadhan: Ping.
The patch has changed slightly for 1.11.x. The current patch can always be found in our overlay svn at: http://overlays.gentoo.org/proj/gnome/browser/gnome-extra/evolution-data-server The current ebuild will be there (with the sed magic for moving directories) and the patch will be in the files subdir named evolution-data-server-<version>-as-needed.patch
(In reply to comment #12) > After chatting to srini, we think a better solution might be to move the > exchange code into evolution-exchange. Veerapuram, what do you think of this? I'm strongly in favor of this solution. By the same token, would it make sense to split the groupwise server/provider code into a new evolution-groupwise package? Post-2.12, obviously.
I'm in favor of this too, if only because it reduces the number of deps in e-d-s.
I've split the proposal to move the Exchange code to evolution-exchange to #456240.
Please have a look at http://bugzilla.gnome.org/show_bug.cgi?id=456240#c4.
Still an issue in e-d-s-1.12.3
Created attachment 118233 [details] [review] evolution-data-server-2.23.6-as-needed.patch until evolution-exchange code move is effective could we at least get this fixed ? here is an updated patch to still applys to 2.23.91. Thanks for considering.
ping. As of e-d-s-2.24.4, libexchange-storage is now even worse...it also doesn't link against libldap even though (via servers/exchange/lib/e2k-global-catalog.c) it uses ldap_ntlm_bind() and ldap_parse_ntlm_bind_result().
I take back the ldap problem...unrelated weirdness in the KRB*_* flags (will file separately if I can figure out what's happening) broke -lldap, which was correctly passed and should have resolved those two symbols.
Created attachment 138144 [details] [review] evolution-data-server-2.25.5-as-needed.patch
Created attachment 138145 [details] [review] evolution-data-server-2.26.2-as-needed-configure.patch krb5 detection isn't semantically correct as well.
attachment #138145 [details] was commited in bug #584101, marking obsolete.
As of today, all Exchange code in E-D-S and Evolution now resides in Evolution-Exchange (in git master). Could someone retest this issue and summarize where we stand now?
Looking at evolution-data-server-2.25.5-as-needed.patch, I'm pretty sure moving the Exchange code out of E-D-S has addressed the issue. Marking the patch as obsolete and closing the bug as FIXED. Reopen if we've missed anything in 2.29.