Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 223845 - dev-libs/glib configure problem with libtool-2.2*
Summary: dev-libs/glib configure problem with libtool-2.2*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-27 14:51 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2008-06-02 15:14 UTC (History)
0 users

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


Attachments
fixes configure (glib-libtool.patch,489 bytes, patch)
2008-05-27 14:52 UTC, Jeremy Olexa (darkside) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-05-27 14:51:23 UTC
I need some advice with this one..

This is a prefix only bug, I have confirmed with the gnome herd that glib works with libtool-2.2* on a !prefix system.

configure fails with "error: Cannot determine shared library suffix from libtool" and only with libtool-2.2, previous versions work fine. I have pinpointed the error and patched it to make it work for me. Should I apply it? Why does it only happen for prefix? Any insights? Thanks.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-05-27 14:52:04 UTC
Created attachment 154475 [details, diff]
fixes configure
Comment 2 Fabian Groffen gentoo-dev 2008-05-27 15:21:09 UTC
the former uses the provided libtool, the latter system libtool.  (by the way this breaks on darwin, where libtool is glibtool)

Aparently our libtool is different.  Maybe an elibtoolize fixes the problem?
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-05-27 15:33:43 UTC
(In reply to comment #2)
> the former uses the provided libtool, the latter system libtool.  (by the way
> this breaks on darwin, where libtool is glibtool)

Good point. We need to figure out what is removing(?) the "provided" libtool because it doesn't exist when emerging. 

Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-05-28 17:18:39 UTC
Update: I reverted all prefix specific changes in the ebuild and found that eautreconf is causing the problem with libtool-2.2.4.

This will probably causes problems on interix I bet since it looks like that is why the change went in. http://overlays.gentoo.org/proj/alt/changeset/19134 - if I revert the eautoreconf bit (lines 54-58) glib builds again on x86-linux and with libtool-2.2.4.

Ideas on how to fix this so both interix and linux platforms are happy?
Comment 5 Rafał Mużyło 2008-05-29 12:40:07 UTC
Well, I have a rather silly idea.
In dev-python/pygoobject, they provide AS_AC_EXPAND macro.
They've created this macro for the sake of expanding $(prefix) dirs.
But it works great for changing lines like:
export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
to
AS_AC_EXPAND(export_dynamic, $export_dynamic_flag_spec)
The variable is correctly and fully expanded
and some posts on libtool mailing list suggest this should work with libtool 1.5, too.
Comment 6 Rafał Mużyło 2008-05-29 12:44:51 UTC
Of course, temporarily you could simply add LT_OUTPUT
after AC_PROG_LIBTOOL, but this would be a better long-term solution (as that would work only for libtool 2, before there was no such macro, as libtool was generated during AC_PROG_LIBTOOL, not in AC_CONFIG_FILES).
Even upstream should consider it.
Comment 7 Rafał Mużyło 2008-05-29 12:49:37 UTC
And comment 5 was referring to changes in configure.in, of course.
Comment 8 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-05-29 21:42:10 UTC
(In reply to comment #6)

Rafał,
Wow, you understand the problem quite well. Would you have time to supply a patch to me? I'm not quite up to par on this libtool stuff. Thanks.
Comment 9 Rafał Mużyło 2008-05-29 22:03:12 UTC
Well, it's not like I really understand it.
It came simply through much trial and error.
But I'll see if I can drop something useful.
Comment 10 Rafał Mużyło 2008-05-29 22:50:09 UTC
It looks like the simplest fix would be something similar, to what has been done in bug 213789, adding:
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
right after AM_PROG_LIBTOOL in configure.in,
that works for both 1.5 and =>2.
This way, libtool will be created in the same place it was before,
and those checks won't fail.
Of course upstream should do something saner.
Comment 11 Rafał Mużyło 2008-05-29 23:01:35 UTC
When I tried to came up with something more complex,
I learned that glib does at least one check, that is currently
beyond my understanding, namely:
*** check for OSF1/5.0 RTLD_GLOBAL brokenness
While G_MODULE_LDFLAGS should work with AS_AC_EXPAND flawlessly
and shrext_cmds looks like it should too, that one is more than a bit beyond me.

And, as I can't tell what it actually does in the first place, I decided to not touch it.
Comment 12 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-06-02 14:43:06 UTC
(In reply to comment #10)
> It looks like the simplest fix would be something similar, to what has been
> done in bug 213789, adding:
> m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
> right after AM_PROG_LIBTOOL in configure.in,
> that works for both 1.5 and =>2.

Great. Works. Thanks!

> This way, libtool will be created in the same place it was before,
> and those checks won't fail.
> Of course upstream should do something saner.

I'll ping the glib maintainers.
Comment 13 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-06-02 15:14:03 UTC
Tested with libtool-1.5* & 2.2* - works.

Committed in prefix tree. Thanks again!

Committed revision 22927.