After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 342830 - patches for -Wl,--as-needed
patches for -Wl,--as-needed
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
1.6.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Veerapuram Varadhan
Evolution QA team
: 335038 356614 (view as bug list)
Depends on: 456240
Blocks:
 
 
Reported: 2006-05-24 18:51 UTC by John N. Laliberte
Modified: 2009-11-19 21:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
as-needed patch (3.23 KB, patch)
2007-05-24 09:50 UTC, Mart Raudsepp
none Details | Review
The ebuild script used for building instructions for e-d-s in gentoo (4.33 KB, text/plain)
2007-05-24 09:58 UTC, Mart Raudsepp
  Details
evolution-data-server-2.23.6-as-needed.patch (3.39 KB, patch)
2008-09-07 15:56 UTC, Gilles Dartiguelongue
none Details | Review
evolution-data-server-2.25.5-as-needed.patch (3.41 KB, patch)
2009-07-09 20:34 UTC, Gilles Dartiguelongue
none Details | Review
evolution-data-server-2.26.2-as-needed-configure.patch (1.31 KB, patch)
2009-07-09 20:35 UTC, Gilles Dartiguelongue
none Details | Review

Description John N. Laliberte 2006-05-24 18:51:15 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
Comment 1 Matthew Barnes 2006-09-18 20:28:03 UTC
*** Bug 356614 has been marked as a duplicate of this bug. ***
Comment 2 Matthew Barnes 2006-09-18 20:32:55 UTC
I can confirm that this is still an issue in evolution-data-server-1.8.
Comment 3 Veerapuram Varadhan 2007-01-22 16:00:32 UTC
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.
Comment 4 Andreas Proschofsky 2007-02-14 07:53:54 UTC
Any news on this? It's still an issue on 2.9.91
Comment 5 Ross Burton 2007-05-24 07:31:40 UTC
None of those patches exist anymore, I get a 404.  Can you attach them to this bug?
Comment 6 Mart Raudsepp 2007-05-24 09:50:52 UTC
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
Comment 7 Mart Raudsepp 2007-05-24 09:58:57 UTC
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
Comment 8 Mart Raudsepp 2007-05-24 10:00:51 UTC
Attachment in comment #6 _seems to me_ to be all the three patches combined into one - probably for our downstream better use.
Comment 9 Ross Burton 2007-05-24 10:22:11 UTC
*** Bug 335038 has been marked as a duplicate of this bug. ***
Comment 10 Ross Burton 2007-05-24 10:32:29 UTC
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.
Comment 11 Ross Burton 2007-05-24 10:47:37 UTC
Confirmed, splitting servers/ into two top-level folders allows the build to complete if the configure.ac patch here is applied.
Comment 12 Ross Burton 2007-05-24 10:59:52 UTC
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?
Comment 13 Ross Burton 2007-05-24 13:14:54 UTC
I've committed the krb5 fix in configure.in for now, we'll sort out the other issues next.
Comment 14 Matthew Barnes 2007-05-24 14:09:30 UTC
Would it make sense to move the Camel provider to Evolution-Exchange as well?
Comment 15 Ross Burton 2007-05-24 14:17:17 UTC
Matthew: the Camel provider is already in evolution-exchange.
Comment 16 Matthew Barnes 2007-05-24 14:56:10 UTC
Ah, you're right.  My bad.
Comment 17 Srinivasa Ragavan 2007-06-10 19:02:38 UTC
Varadhan: Ping.
Comment 18 Daniel Gryniewicz 2007-06-10 21:24:22 UTC
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
Comment 19 Matthew Barnes 2007-07-10 16:38:05 UTC
(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.
Comment 20 Daniel Gryniewicz 2007-07-10 17:52:54 UTC
I'm in favor of this too, if only because it reduces the number of deps in e-d-s.
Comment 21 Ross Burton 2007-07-12 13:55:18 UTC
I've split the proposal to move the Exchange code to evolution-exchange to #456240.
Comment 22 Chenthill P 2007-08-14 03:48:55 UTC
Please have a look at  http://bugzilla.gnome.org/show_bug.cgi?id=456240#c4.
Comment 23 Daniel Macks 2008-07-01 17:25:24 UTC
Still an issue in e-d-s-1.12.3
Comment 24 Gilles Dartiguelongue 2008-09-07 15:56:26 UTC
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.
Comment 25 Daniel Macks 2009-02-02 03:33:27 UTC
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().
Comment 26 Daniel Macks 2009-02-02 03:36:22 UTC
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.
Comment 27 Gilles Dartiguelongue 2009-07-09 20:34:20 UTC
Created attachment 138144 [details] [review]
evolution-data-server-2.25.5-as-needed.patch
Comment 28 Gilles Dartiguelongue 2009-07-09 20:35:22 UTC
Created attachment 138145 [details] [review]
evolution-data-server-2.26.2-as-needed-configure.patch

krb5 detection isn't semantically correct as well.
Comment 29 Gilles Dartiguelongue 2009-07-20 21:33:34 UTC
attachment #138145 [details] was commited in bug #584101, marking obsolete.
Comment 30 Matthew Barnes 2009-10-08 17:10:23 UTC
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?
Comment 31 Matthew Barnes 2009-11-19 21:56:19 UTC
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.