First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 146211
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Donnie Berkholz <dberkholz@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
gettext-expat.patch patch to not use dlopen to load expat on linux patch Emanuele Giaquinta (RETIRED) 2006-09-05 04:45 0000 803 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 146211 depends on: Show dependency tree
Show dependency graph
Bug 146211 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-09-03 22:47 0000
New in gettext 0.15, there is supposedly support for libexpat.so.1 rather than
libexpat.so.0. But this is broken on OS's for which gettext uses dlopen(),
namely Linux.

`strings /usr/bin/xgettext | grep expat` will return libexpat.so.0 rather than
libexpat.so.1. This originates in gettext-0.15/gettext-tools/src/x-glade.c.
When using dlopen(), XML_MAJOR_VERSION never gets defined, so the code defaults
to using libexpat.so.0 rather than libexpat.so.1.

Really it should be smart enough to try either at runtime, but it should at
least get fixed to use XML_MAJOR_VERSION. Just adding an #include <expat.h> in
the appropriate section was not enough, as that caused other conflicting
definitions.

------- Comment #1 From Kevin F. Quinn (RETIRED) 2006-09-04 16:06:50 0000 -------
(Just plonking a note here, for reference:
dev-libs/expat-1.x generates libexpat.so.0, with XML_MAJOR_VERSION = 1
dev-libs/expat-2.x generates libexpat.so.1, with XML_MAJOR_VERSION = 2)

x-glade.c is manually defining the interface when it uses dlopen() in place of
including <expat.h>, so clearly including <expat.h> isn't what the author
intended - although I don't see why it's done that way.  XML_MAJOR_VERSION is
only defined in expat.h; my guess is that in gettext it should have been
defined by a configure check which detects which version of libexpat is
installed.

Assuming this is the case, we will would have to force a rebuild of gettext
whenever expat is upgraded from .0 to .1.  The other way of getting around it
is to slot dev-libs/libexpat (with dev-libs/expat-2.0.0 at SLOT="1").

------- Comment #2 From Emanuele Giaquinta (RETIRED) 2006-09-05 04:41:10 0000 -------
(In reply to comment #1)
> x-glade.c is manually defining the interface when it uses dlopen() in place of
> including <expat.h>, so clearly including <expat.h> isn't what the author
> intended - although I don't see why it's done that way.  XML_MAJOR_VERSION is
> only defined in expat.h; my guess is that in gettext it should have been
> defined by a configure check which detects which version of libexpat is
> installed.

I proposed this solution to upstream but received no answer.

> Assuming this is the case, we will would have to force a rebuild of gettext
> whenever expat is upgraded from .0 to .1.  The other way of getting around it
> is to slot dev-libs/libexpat (with dev-libs/expat-2.0.0 at SLOT="1").

configure.ac forces the dl* interface for expat on linux, while on every other
system it uses standard linking; we can patch it to use the latter also on
linux. Alternatively, as proposed by Donnie, we can modify x-glade.c to always
load libexpat.so.1 and depend on expat-2.

------- Comment #3 From Emanuele Giaquinta (RETIRED) 2006-09-05 04:45:03 0000 -------
Created an attachment (id=96054) [edit]
patch to not use dlopen to load expat on linux

------- Comment #4 From SpanKY 2006-09-05 21:58:01 0000 -------
feel free to do whichever you think is best Emanuele ;)

------- Comment #5 From Ziga Boehm 2006-09-25 08:45:12 0000 -------
Opting for slotted solution would probably be best solution as too many thing
could otherwise break? Regardin latter please also look at bug #128108.

------- Comment #6 From Bob McDonald 2006-10-24 06:04:30 0000 -------
This appears to affect other packages as well.  After emerging
dev-libs/expat-2.0.0, emerging sys-apps/kbd and sys-apps-net-tools failed as
described above.  After I went back to dev-libs/expat-1.95.8, these packages
emerge without error.  Perhaps it be a good idea to add >=dev-libs/expat-2.0.0
to the mask file until you decide to slot or not.

------- Comment #7 From SpanKY 2006-12-29 16:48:40 0000 -------
gettext-0.15-r1 has this fix, just forgot to close this bug

First Last Prev Next    No search results available      Search page      Enter new bug