Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 575212 - dev-libs/wayland-1.10.0 with multilib support need dev-libs/libxml2 and dev-libs/icu with multilib support
Summary: dev-libs/wayland-1.10.0 with multilib support need dev-libs/libxml2 and dev-l...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-20 10:55 UTC by Cyril
Modified: 2016-03-01 18:02 UTC (History)
0 users

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


Attachments
Patch I would push if upstream --{enable,disable}-dtd-validation wasn't broken (wayland-multilib-fixes.patch,1.05 KB, patch)
2016-02-29 08:33 UTC, Mart Raudsepp
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cyril 2016-02-20 10:55:30 UTC
Without libxml2 and icu with USE="abi_x86_32" on Amd64 arch, wayland fails to configure.

Reproducible: Always




Recompile dev-libs/libxml2 and dev-libs/icu with USE="abi_x86_32",
solves the problem and wayland compiles without failed.
Comment 1 vltg0903 2016-02-22 03:22:49 UTC
Hi all,

I can confirm this. emerge --info gives:

Portage 2.2.26 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/kde, gcc-5.3.0, glibc-2.22-r2, 4.4.2-gentoo x86_64)
=================================================================
System uname: Linux-4.4.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-5600U_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:     8055128 total,   3674388 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 22 Feb 2016 02:00:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

aeoverlay
    location: /data/portage/overlay
    masters: gentoo
    priority: 1000

Installed sets: @mykde5, @networking, @plasma_apps, @toolbox
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=corei7 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=corei7 -pipe"
DISTDIR="/data/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LC_ALL="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
PKGDIR="/data/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X X509 a52 aac aacplus acpi alsa amd64 apng bluetooth bzip2 cairo caps cdda cdr cli clucene consolekit cracklib crypt cups cxx dbus declarative dri dri3 dts dvd dvdr dvdread egl encode exif faad fdk firefox flac foomaticdb gif gles gles1 gles2 gles3 glut glx gps iconv icu inotify ipv6 jpeg kde kipi kpathsea latex ldns libinput mmx mmxext modules mp3 mp4 mpeg multilib ncurses networkmanager nls nmea2000 nptl ogg opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qt3support quicktime rdp readline sasl seccomp session spell sse sse2 ssl startup-notification svg system-sqlite tcpd theora threads tiff truetype udev udisks udisks2 unicode upower usb v4l vorbis vpx wayland wayland-compositor x264 xattr xcb xcomposite xetex xinerama xml xv xvfb xvid xwayland zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 author" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" 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 ublox ubx" GRUB_PLATFORMS="pc efi-64" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4" QEMU_SOFTMMU_TARGETS="arm x86_64 i386 aarch64" QEMU_USER_TARGETS="arm armeb x86_64 i386 aarch64" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="intel i965" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Mart Raudsepp gentoo-dev 2016-02-29 03:37:34 UTC
wayland-1.10 requires libxml2 on all arches right now, but the dependency was omitted on the bump for some reason, even though configure.ac clearly shows the addition. --disable-dtd-validation would avoid this dependency, and might be the way to go if it does what I think it does (maybe if tests are enabled it would be useful to run that validation?).
icu is probably a side effect of that via libxml2[icu], I don't see anything about icu in wayland itself.
Comment 3 Mart Raudsepp gentoo-dev 2016-02-29 06:21:28 UTC
Looked into it - it's for enabling proper DTD validation via libxml2 for the wayland-scanner tool, which does this itself:

Converts XML protocol descriptions supplied on stdin or input file to client
headers, server headers, or protocol marshalling code.

This in turn is needed while build things that ship with a wayland protocol and needs to do that operation at buildtime, e.g weston specifically checks for it.

So if we start passing --disable-dtd-validation, then wayland-scanner doesn't validate the DTD and doesn't print out a warning in case of problems, which is bad for developers doing wayland protocol stuff on a Gentoo system, doesn't show issues to spotty users, etc. In case of DTD validation issues, it just prints that warning with libxml2 dep it seems, but in case of more serious issues (e.g XML itself not valid) it aborts out completely in this libxml2 dependent code (however the actual header generation or marshalling code generation might do the same - didn't check).

I would just add the dep unconditionally, but I guess not everyone would agree, so maybe a default enabled USE flag, but I'm having trouble thinking what USE flag name to use or reuse.
Comment 4 Mart Raudsepp gentoo-dev 2016-02-29 06:50:19 UTC
wayland-scanner is actually a host tool in /usr/bin - it doesn't get installed for 32bit. However a /usr/lib32/pkgconfig file for the tool does get installed, and I suspect is necessary to build other 32bit multilib things (if any compositor-like library needs a multilib version and checks for it) - but it points to the /usr/bin native version.

So technically we don't need 32bit libxml2 at runtime at least either way, but if making it expressed and work as such, need to take care of the /usr/lib32/pkgconfig thing (keep it generated IF it's needed, etc).

Then the question would be if to hard dep libxml2 on native, or USE flag it. Most people probably have native libxml2, so the automagic dep (or rather a missing dep) that it is right now too actually was not spotted and similarly might be OK to just hard dep for native.
Comment 5 Mart Raudsepp gentoo-dev 2016-02-29 08:08:57 UTC
Great, in fixing this I found out that:

1) wayland multilib ebuild is just completely broken. It believes 32bit build is native, and so none of that ! multilib_is_native_abi stuff is working right, so USE=doc multilib builds will fail just as well, because --disable-doc is not passed.

2) Upstream --enable-dtd-validation code seems broken. So if you e.g pass --enable-dtd-validation, it'll actually skip all checks and just enable it - then proceed to fail on the embedded dtd stuff because the links or whatever were not done, while they would if just no flag is passed. And --disable-dtd-validation seems to act weird too. I think this might be due to upstream configure.ac having a enable_dtdvalidation thing for action-if-not-found, instead of enable_dtd_validation, so the conditional only gets called if no --foo-dtd-validation is passed. Maybe I'm just going nuts due to point 1) though.
Comment 6 Mart Raudsepp gentoo-dev 2016-02-29 08:33:44 UTC
Created attachment 426960 [details, diff]
Patch I would push if upstream --{enable,disable}-dtd-validation wasn't broken

Fix multilib src_configure handling and new libxml2 depedency

Changes src_configure to multilib_src_configure, which is ran once per each ABI; with src_configure it was only ran once for native ABI, resulting in multilib_is_native_abi always being true, so that block wasn't doing what it was supposed to.
FIXME: Do we need to give src_test the same treatment, or it's fine with no multilib_* checks made?

Removes static-libs handling, because it was resulting in it being passed twice, as the eclasses (autotools-utils down in the chain) already handled it also when static-libs is in IUSE, so we were ending up with --enable-shared --disable-static --disable-static when USE=-static-libs.

Move documentation handling to multilib_native_use_enable, to not end up with --enable-documentation --disable-documentation being passed to 32bit builds, now that the old block would work; this wouldn't be a problem as the latter one takes with autotools, but just cleaner.
Comment 7 Mart Raudsepp gentoo-dev 2016-02-29 08:49:21 UTC
(In reply to Mart Raudsepp from comment #6)
> FIXME: Do we need to give src_test the same treatment, or it's fine with no
> multilib_* checks made?

mgorny says it's fine.

I'm out of time for now to work on the upstream configure.ac bits or file a bug upstream.

Could push a version that doesn't pass any --*-dtd-validation flags and adds 32bit libxml2 dependency, but that would make people enable 32bit for icu, which is a huge build, so not sure it's worth fixing the temporary ~arch breakage by forcing that rebuild temporarily to people, instead of a couple more days to fix it properly. It fails hard only for users who are building multilib 32bit wayland anyways.
Comment 8 Pekka Paalanen 2016-02-29 13:02:42 UTC
Tentative upstream patch to fix --disable-dtd-validation:
https://patchwork.freedesktop.org/patch/75285/
Comment 9 Pekka Paalanen 2016-03-01 08:55:39 UTC
(In reply to Pekka Paalanen from comment #8)
> Tentative upstream patch to fix --disable-dtd-validation:
> https://patchwork.freedesktop.org/patch/75285/

The patch has landed in upstream master branch.
Comment 10 Mart Raudsepp gentoo-dev 2016-03-01 17:42:05 UTC
Thanks Pekka. Included that with added bits to configure and Makefile.in to avoid eautoreconf

commit bd0be58e1d9fd7f19ccf9a24bb963b5fdb742c3d
Author: Mart Raudsepp <leio@gentoo.org>
Date:   Tue Mar 1 12:51:20 2016 +0200

    dev-libs/wayland: Fix multilib and add missing libxml2 dependency
    
    Multilib support was broken in previous versions, as the configure
    options were in src_configure, not multilib_src_configure, and so
    it always built with configuration for "native" ABI, meaning that
    USE=doc with multilib was probably broken. Now with 1.10 this
    becomes more apparent with a new libxml2 dependency in wayland-scanner
    for DTD validation.
    As we do not currently install /usr/bin/wayland-scanner for other ABIs,
    just disable the dtd validation support there. Ideally we wouldn't
    build it at all then, but not a clean way to do so upstream right now.
    For --{dis,en}able-dtd-validation to work, we need to patch the
    build system to fix the support for the configure flag.
    Thanks to this we are able to add the missing libxml2 dependency
    without requiring multilib libxml2 for that (and commonly then also
    multilib icu), which is nice, as many users haven't had a need for
    a 32bit version of those as of yet and icu is a bit bigger compile.
    
    Remove USE=static-libs handling, as autotools-utils takes care
    of it for us when it's in IUSE. Also make use of the
    multilib_native_use_enable helper to simplify the ebuild.
    
    Gentoo-bug: 575212
Comment 11 Mart Raudsepp gentoo-dev 2016-03-01 18:02:22 UTC
I opened bug 576146 to remember about the remaining wayland-scanner points and track it on our end.