Summary: | dev-libs/libxml2-2.8.0 with USE=python: version 'LIBXML2_2.7.9' not found (required by /usr/lib64/python2.7/site-packages/libxml2mod.so) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sylvain Alain (RETIRED) <d2_racing> |
Component: | [OLD] GNOME | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arfrever.fta |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugzilla.gnome.org/show_bug.cgi?id=677606 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
a proper fix for this linking problem
a more complete solution libxml2-2.8.0-linking.patch |
Description
Sylvain Alain (RETIRED)
2012-05-26 01:16:32 UTC
I'm using this version dev-libs/libxml2-2.8.0-r1000 This is a build problem in libxml2-2.8.0; during src_install(), libxml2mod.so gets relinked against /usr/lib/libxml2.so.2 instead of libxml2.so.2 from the build tree. As a quick workaround, simply re-emerge libxml2. A proper solution will be coming. Fixed. In other news, GNU libtool's corner cases are still a bad mess. >*libxml2-2.8.0-r1 (26 May 2012) > > 26 May 2012; Alexandre Rostovtsev <tetromino@gentoo.org> > -libxml2-2.8.0.ebuild, +libxml2-2.8.0-r1.ebuild: > Prevent libxml2's python module from linking to out-of-build-tree libxml2 > library by hacking the relink_command entry in its build-time .la file. Fixes > bug #417539 ("'LIBXML2_2.7.9' not found" errors). Forced to drop hppa and > amd64-fbsd keywords, bug #417569. Drop broken 2.8.0 ebuild. Are you sure the bug really did exist in the standard tree ? I built libxml2 2.8.0 before this hack was added and everything worked fine, 'import libxml2' doesn't print any errors. ...for reference, it was built with USE="ipv6 python readline -debug -doc -examples -icu -lzma -static-libs -test". (In reply to comment #4) > Are you sure the bug really did exist in the standard tree ? > > I built libxml2 2.8.0 before this hack was added and everything worked fine, > 'import libxml2' doesn't print any errors. It was 100% reproducible for me: 1. unmerge libxml2 2. emerge =libxml2-2.8.0_rc1 3. USE="icu ipv6 lzma python readline" emerge =libxml2-2.8.0 4. python -c "import libxml2" result: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/libxml2.py", line 1, in <module> import libxml2mod ImportError: /usr/lib64/libxml2.so.2: version `LIBXML2_2.7.9' not found (required by /usr/lib64/python2.7/site-packages/libxml2mod.so) Well, I upgraded straight from 2.7.9-r1 (don't ask), but both in portage *and* while built from sources it worked correctly. I'll see if it's a matter of useflags. This bug seems to occur only with USE="icu". Created attachment 313157 [details, diff]
a proper fix for this linking problem
OK, useflags did matter, but, as I expected, this was sort of like --as-needed problems.
This patch should be valid for upstream. They were misusing LDFLAGS var.
AFAICT, the problem came with icu support, but nobody noticed it back then.
It's simply due to 'icu-config --ldflags' having '-L/usr/lib' within its output.
(In reply to comment #9) Lines 157 and 201 of configure.in also contain such LDFLAGS assignments. Why have you left them unchanged? Created attachment 313161 [details, diff]
a more complete solution
Don't you mean "...and line 193" ?
But the simple answer is that my hack compatibility is almost as high as the author of current solution.
This one *should* be complete.
...Actually, now that I look at the complete picture, only part of the patch that really matters is the final block.
Created attachment 313163 [details, diff] libxml2-2.8.0-linking.patch (In reply to comment #11) > Don't you mean "...and line 193" ? I confused line 193 with 201. I suggest to handle ICU_LIBS variable similarly to other *_LIBS variables in Makefile.am, as shown in this patch. @comment 12: your patch looks fine - that's probably the most complete solution Rafał, Arfrever, thanks for figuring out how to fix this properly! Patch will be submitted upstream when gnome.bugzilla.org will be back online.
> 04 Jun 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
> libxml2-2.8.0-r1.ebuild, +files/libxml2-2.8.0-icu-linking.patch:
> De-uglify fix for bug #417539 with an upstreamable patch, thanks to Rafał
> Mużyło and Arfrever.
(In reply to comment #14) > Patch will be submitted upstream when gnome.bugzilla.org will be back online. Patch submitted upstream at https://bugzilla.gnome.org/show_bug.cgi?id=677606 |