Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148856 - Gaim 2.0.0_beta3 configure.ac messes with LDFLAGS (fails with --as-needed)
Summary: Gaim 2.0.0_beta3 configure.ac messes with LDFLAGS (fails with --as-needed)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Net-im project
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-23 15:14 UTC by Matteo Settenvini
Modified: 2006-10-23 17:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
gaim-2.0.0_beta3-as-needed.patch (gaim-2.0.0_beta3-as-needed.patch,1.74 KB, patch)
2006-09-23 15:48 UTC, Matteo Settenvini
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matteo Settenvini 2006-09-23 15:14:48 UTC
If you try to enable gnutls support into Gaim (for example, if you want MSN support), and you have "-Wl,--as-needed" into your LDFLAGS, the configure script will fail when trying to link against libgnutls.so, thus disabling all SSL-related features.

The culprit seems to be this snippet:
(1104-1106 of configure.ac)

AC_CACHE_CHECK([for GNUTLS libraries], gnutls_libs,
                [
                        LDFLAGS="$LDFLAGS $with_gnutls_libs -lgnutls -lgcrypt"
                        AC_TRY_LINK_FUNC(gnutls_init, gnutls_libs="yes", gnutls_libs="no")
                        LDFLAGS="$LDFLAGS_save"
                ])

There are other such uses of LDFLAGS throughout the autoconf file.
I think the correct fix should be to change the use of LDFLAGS throughout the configure.ac with the variable "LIBS". I'll try that and I'll post a patch if it works :-).
Comment 1 Matteo Settenvini 2006-09-23 15:48:37 UTC
Created attachment 97902 [details, diff]
gaim-2.0.0_beta3-as-needed.patch

This updates the already existing as-needed patch to fix the configure.ac. Please note that you should change the ebuild to call "eautoreconf" instead that only "eautomake". There are no other changes required.

Gaim now builds and executes okay for me.
Comment 2 Jory A. Pratt 2006-10-13 09:33:33 UTC
This patch should be sent upstream before it is added to gentoo's gaim package.
Comment 3 Matteo Settenvini 2006-10-16 09:08:15 UTC
I added an URL with the issue sent upstream, for reference.
Comment 4 Jory A. Pratt 2006-10-16 15:50:44 UTC
If you would please post the original error message I am not happy with your fix and I know upstream will reject it. There has to be a better way then what you are suggesting.
Comment 5 Matteo Settenvini 2006-10-17 07:55:10 UTC
Maybe there is. Anyway, my patch has been accepted upstream. If you wasn't happy with my fix you could have told me so before I posted the bug on SF, not after, since it was you that purposed to contact them in the first place.

Anyway, you just have to compile gaim with:

   USE="gnutls" LDFLAGS="-Wl,--as-needed" emerge gaim

to see the error yourself.

Just for the sake of completeness: as far as I can tell the patch I purposed just reflects the guidelines set into the autoconf info manual, and isn't so bad as you seem to think. It seems the Right Way(TM) to do it to me. If you could just elaborate about why it is a bad fix... ?
Comment 6 Kathryn Kulick (RETIRED) gentoo-dev 2006-10-23 17:57:07 UTC
Since it was accepted upstream, and beta3 is no longer in the tree, I shall close this as fixed now.