Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417539 - 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)
Summary: dev-libs/libxml2-2.8.0 with USE=python: version 'LIBXML2_2.7.9' not found (re...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-26 01:16 UTC by Sylvain Alain (RETIRED)
Modified: 2012-06-07 07:37 UTC (History)
1 user (show)

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


Attachments
a proper fix for this linking problem (libxml2-fix-linking.patch,619 bytes, patch)
2012-05-26 16:30 UTC, Rafał Mużyło
Details | Diff
a more complete solution (libxml2-fix-linking.patch,1.46 KB, patch)
2012-05-26 17:09 UTC, Rafał Mużyło
Details | Diff
libxml2-2.8.0-linking.patch (libxml2-2.8.0-linking.patch,2.80 KB, patch)
2012-05-26 17:37 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain Alain (RETIRED) gentoo-dev 2012-05-26 01:16:32 UTC
Everytime that I'm trying to compile gedit, it crash.



Reproducible: Always

Steps to Reproduce:
1. time emerge -auDNv @world
2.
3.
Actual Results:  
make[2] : on entre dans le répertoire « /var/tmp/portage/app-editors/gedit-3.4.2/work/gedit-3.4.2/help »
  GEN    fr/fr.mo
  GEN    fr/
Traceback (most recent call last):
  File "/usr/bin/itstool", line 25, in <module>
    import libxml2
  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)
make[2]: *** [fr/fr.stamp] Erreur 1
make[2] : on quitte le répertoire « /var/tmp/portage/app-editors/gedit-3.4.2/work/gedit-3.4.2/help »
make[1]: *** [all-recursive] Erreur 1
make[1] : on quitte le répertoire « /var/tmp/portage/app-editors/gedit-3.4.2/work/gedit-3.4.2 »
make: *** [all] Erreur 2
 * ERROR: app-editors/gedit-3.4.2 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-editors/gedit-3.4.2'`,
 * the complete build log and the output of `emerge -pqv '=app-editors/gedit-3.4.2'`.
 * The complete build log is located at '/var/tmp/portage/app-editors/gedit-3.4.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-editors/gedit-3.4.2/temp/environment'.
 * Working directory: '/var/tmp/portage/app-editors/gedit-3.4.2/work/gedit-3.4.2'
 * S: '/var/tmp/portage/app-editors/gedit-3.4.2/work/gedit-3.4.2'


Expected Results:  
Compilation success

Portage 2.3.4-r2 (default/linux/amd64/2008.0/desktop, gcc-4.6.2, glibc-2.13-r4, 3.4.0-rc7 x86_64)
=================================================================
System uname: Linux-3.4.0-rc7-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.1.8
Timestamp of tree: Fri, 25 May 2012 18:00:01 +0000
app-shells/bash:          4.2_p24
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r1000, 3.2.3-r1000
dev-util/cmake:           2.8.8-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1.8-r3
sys-apps/openrc:          0.8.3-r8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.5
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.2-r1
sys-devel/gcc-config:     1.5
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=5 --load-average=5.0 --with-bdeps y"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://distfiles.gentoo.org"
LANG="fr_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="fr"
MAKEOPTS="-j5 -l5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="git://github.com/funtoo/ports-2012.git"
SYNC_USER="root"
USE="X a52 aac acl acpi alac alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr dvdread emboss encode exif fam firefox flac fortran gdbm gif gnome gpm gtk gtk3 iconv ipv6 jpeg lame lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb userlocales vorbis wavpack wxwidgets x264 xcb xcomposite xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="vesa nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC_UMASK
Comment 1 Sylvain Alain (RETIRED) gentoo-dev 2012-05-26 01:40:11 UTC
I'm using this version 
dev-libs/libxml2-2.8.0-r1000
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-05-26 01:48:38 UTC
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.
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-05-26 07:59:20 UTC
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.
Comment 4 Rafał Mużyło 2012-05-26 08:17:58 UTC
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.
Comment 5 Rafał Mużyło 2012-05-26 08:21:03 UTC
...for reference, it was built with USE="ipv6 python readline -debug -doc -examples -icu -lzma -static-libs -test".
Comment 6 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-05-26 08:31:27 UTC
(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)
Comment 7 Rafał Mużyło 2012-05-26 15:38:44 UTC
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.
Comment 8 Arfrever Frehtes Taifersar Arahesis 2012-05-26 16:28:34 UTC
This bug seems to occur only with USE="icu".
Comment 9 Rafał Mużyło 2012-05-26 16:30:50 UTC
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.
Comment 10 Arfrever Frehtes Taifersar Arahesis 2012-05-26 16:36:01 UTC
(In reply to comment #9)

Lines 157 and 201 of configure.in also contain such LDFLAGS assignments. Why have you left them unchanged?
Comment 11 Rafał Mużyło 2012-05-26 17:09:04 UTC
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.
Comment 12 Arfrever Frehtes Taifersar Arahesis 2012-05-26 17:37:43 UTC
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 13 Rafał Mużyło 2012-05-26 18:41:06 UTC
@comment 12:
your patch looks fine - that's probably the most complete solution
Comment 14 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-06-04 04:37:21 UTC
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.
Comment 15 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-06-07 07:37:53 UTC
(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