Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 580304 - =media-libs/phonon-4.8.3-r1 fails to build with ABI_X86="32 64" USE="pulseaudio qt4" on amd64
Summary: =media-libs/phonon-4.8.3-r1 fails to build with ABI_X86="32 64" USE="pulseaud...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 587346
  Show dependency tree
 
Reported: 2016-04-17 10:30 UTC by Sergei Trofimovich (RETIRED)
Modified: 2016-07-13 18:20 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,173.73 KB, text/plain)
2016-04-17 10:30 UTC, Sergei Trofimovich (RETIRED)
Details
Build log for phonon-4.9.0 (build.log,207.61 KB, text/x-log)
2016-07-13 17:46 UTC, Viz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2016-04-17 10:30:20 UTC
Created attachment 430916 [details]
build.log

Fails as:
  /usr/include/glib-2.0/glib/gtypes.h: In function ‘gboolean _GLIB_CHECKED_ADD_U64(guint64*, guint64, guint64)’:
/usr/include/glib-2.0/glib/gtypes.h:422:3: error: size of array ‘_GStaticAssertCompileTimeAssertion_0’ is negative
   G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
   ^
phonon/CMakeFiles/phonon.dir/build.make:662: recipe for target 'phonon/CMakeFiles/phonon.dir/pulsesupport.cpp.o' failed

How to test: 
$ ABI_X86="64 32" emerge -1 phonon

[ebuild   R   ~] media-libs/phonon-4.8.3-r1::gentoo  USE="gstreamer pulseaudio qt4 qt5 vlc (-aqua) -debug -designer (-zeitgeist)" ABI_X86="32* (64) (-x32)" 0 KiB

I have mostly stable system. The cause is how phonon detects
path to internal glib directory:

    /usr/bin/x86_64-pc-linux-gnu-g++ -m32 ...-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include

I have /usr/lib pointing to /usr/lib64.

It comes from phonon-4.8.3/cmake/FindGLIB2.cmake where detection happens like that:

  find_package(PkgConfig)
  pkg_check_modules(PC_LibGLIB2 glib-2.0)

  find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
          PATH_SUFFIXES glib-2.0/include
          HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})

Looks fishy.

$ cat `equery f glib | grep pkgconfig/glib-2.0` | egrep -i 'libdir|cflags'
libdir=/usr/lib32
Libs: -L${libdir} -lglib-2.0 
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include 

libdir=/usr/lib64
Libs: -L${libdir} -lglib-2.0 
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2016-04-23 08:24:35 UTC
=media-libs/phonon-4.9.0 fails to link USE="qt4 abi_x86_32" even with USE=-pulseaudio:

[ 64%] Linking CXX shared library libphonon.so
cd /tmp/portage/media-libs/phonon-4.9.0/work/phonon-4.9.0-qt4-abi_x86_32.x86/phonon && /usr/bin/cmake -E cmake_link_script CMakeFiles/phonon.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++ -m32 -fPIC -march=corei7-avx -mtune=corei7-avx -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=8192 -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-check-new -fno-common -Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc  -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -shared -Wl,-soname,libphonon.so.4 -o libphonon.so.4.9.0 CMakeFiles/phonon.dir/abstractaudiooutput.cpp.o CMakeFiles/phonon.dir/abstractaudiooutput_p.cpp.o CMakeFiles/phonon.dir/abstractmediastream.cpp.o CMakeFiles/phonon.dir/abstractvideooutput.cpp.o CMakeFiles/phonon.dir/abstractvideooutput_p.cpp.o CMakeFiles/phonon.dir/audiodataoutput.cpp.o CMakeFiles/phonon.dir/audiooutput.cpp.o CMakeFiles/phonon.dir/audiooutputinterface.cpp.o CMakeFiles/phonon.dir/backendcapabilities.cpp.o CMakeFiles/phonon.dir/effect.cpp.o CMakeFiles/phonon.dir/effectparameter.cpp.o CMakeFiles/phonon.dir/effectwidget.cpp.o CMakeFiles/phonon.dir/factory.cpp.o CMakeFiles/phonon.dir/globalconfig.cpp.o CMakeFiles/phonon.dir/iodevicestream.cpp.o CMakeFiles/phonon.dir/mediacontroller.cpp.o CMakeFiles/phonon.dir/mediaobject.cpp.o CMakeFiles/phonon.dir/medianode.cpp.o CMakeFiles/phonon.dir/mediasource.cpp.o CMakeFiles/phonon.dir/mrl.cpp.o CMakeFiles/phonon.dir/objectdescription.cpp.o CMakeFiles/phonon.dir/objectdescriptionmodel.cpp.o CMakeFiles/phonon.dir/path.cpp.o CMakeFiles/phonon.dir/phononnamespace.cpp.o CMakeFiles/phonon.dir/platform.cpp.o CMakeFiles/phonon.dir/pulsesupport.cpp.o CMakeFiles/phonon.dir/seekslider.cpp.o CMakeFiles/phonon.dir/statesvalidator.cpp.o CMakeFiles/phonon.dir/streaminterface.cpp.o CMakeFiles/phonon.dir/swiftslider.cpp.o CMakeFiles/phonon.dir/volumefadereffect.cpp.o CMakeFiles/phonon.dir/volumeslider.cpp.o CMakeFiles/phonon.dir/videoplayer.cpp.o CMakeFiles/phonon.dir/videowidget.cpp.o CMakeFiles/phonon.dir/audiooutputadaptor.cpp.o CMakeFiles/phonon.dir/phonon_automoc.cpp.o /usr/lib64/qt4/libQtCore.so /usr/lib64/qt4/libQtGui.so /usr/lib64/qt4/libQtDBus.so -Wl,-rpath,/usr/lib64/qt4: 
/usr/lib64/qt4/libQtCore.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
phonon/CMakeFiles/phonon.dir/build.make:1007: recipe for target 'phonon/libphonon.so.4.9.0' failed
Comment 2 Tanktalus 2016-04-23 15:43:45 UTC
(In reply to Sergei Trofimovich from comment #1)

> [ 64%] Linking CXX shared library libphonon.so
> /usr/lib64/qt4/libQtCore.so: error adding symbols: File in wrong format

> collect2: error: ld returned 1 exit status
> phonon/CMakeFiles/phonon.dir/build.make:1007: recipe for target
> 'phonon/libphonon.so.4.9.0' failed

I'm getting the same issue, though at a different percentage based on the following USE flags:

[ebuild     U ~]     media-libs/phonon-4.9.0::gentoo [4.8.3-r1::gentoo] USE="designer gstreamer pulseaudio qt4 qt5 vlc (-aqua) -debug (-zeitgeist)" ABI_X86="32 (64) -x32" 0 KiB
Comment 3 Miroslaw Mieszczak 2016-04-26 05:16:41 UTC
The same problem exists with media-libs/phonon-4.9.0.
Comment 4 Luís Augusto Perles 2016-04-26 22:43:00 UTC
I'm having the same problems here with phonon-4.83.r1 and 4.9.0. Phonon 4.7.2 compiles perfectly. Follows emerge --info:

Portage 2.2.26 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-4.9.3, glibc-2.22-r4, 4.5.0-gentoo-r1 x86_64)
=================================================================
System uname: Linux-4.5.0-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-3720QM_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:     8185992 total,   2396544 free
KiB Swap:    7936104 total,   7705328 free
Timestamp of repository gentoo: Tue, 26 Apr 2016 17: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-r3::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.3.5-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.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::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-r4::gentoo
Repositories:

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

zugaina
    location: /var/lib/layman/zugaina
    masters: gentoo
    priority: 0

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 1

jtriley
    location: /var/lib/layman/jtriley
    masters: gentoo
    priority: 2

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 3

vmware
    location: /var/lib/layman/vmware
    masters: gentoo
    priority: 4

local
    location: /usr/local/portage/overlay
    masters: gentoo
    priority: 5

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/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_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/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="3dnow 3dnowext 7zip R X a52 aac aalib accessibility acl acpi alsa amd64 audiofile avahi berkdb branding bzip2 cairo cdda cdr cjk cli consolekit cracklib crypt css cups cxx dbus declarative dga djvu dri dts dv dvd dvdr dvdread dvi emboss encode exif fam fat fbsplash ffmpeg fftw firefox flac foomatic-db fortran freetype fuse gallium gcj gdbm gif gimpprint glamor glitz gnutls gphoto2 gpm gsm gstreamer gtk hal hddtemp iconv icu ieee1394 inotify ipv6 jack java joystick jpeg jpeg2k kde kerberos kipi ladspa lame laptop lcms ldap libcaca libffi libnotify live lm_sensors mad mbrola mikmod mmx mmxext mng modules mp3 mp3rtp mp4 mpeg mtp multilib musepack musicbrainz mysql ncurses nls nptl nptlonly nsplugin ogg oggvorbis openexr opengl openmp pam pango pcmcia pcre pdf phonon plasma png policykit povray ppds pulseaudio python qml qt3support qt4 qt5 rdesktop readline real reiserfs remote ruby scanner schroedinger sdl sdl-image seccomp semantic-desktop session slang smp sms sndfile snmp speex spell sse sse2 ssl startup-notification stats svg tcpd theora threads tiff tpctlir truetype udev udisks unicode upower usb v4l v4l2 vcd vdpau visualization vnc vorbis wallpapers webkit widgets wxwidgets wxwindows x264 xattr xcb xcomposite xine xinerama xml xprint xscreensaver xv xvid xvmc zlib" ABI_X86="64 32" 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="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64 arm" QEMU_USER_TARGETS="i386 x86_64 arm armeb" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev vesa vga nvidia nouveau intel" 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"
USE_PYTHON="2.7 3.4"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Viz 2016-04-28 06:45:25 UTC
The same problem as Tanktalus with USE flags:

[ebuild     U ~] media-libs/phonon-4.9.0::gentoo [4.8.3-r1::gentoo] USE="designer pulseaudio qt4 qt5 (-aqua) -debug -gstreamer -vlc (-zeitgeist)" ABI_X86="32 (64) (-x32)" 0 KiB

However 4.8.3-r1 was fine.
Comment 6 Michael Palimaka (kensington) gentoo-dev 2016-04-28 15:06:47 UTC
There's been substantial changes upstream to the build system which probably caused this regression. If someone is able to produce a simplified testcase it would be nice to report upstream.
Comment 7 Tanktalus 2016-05-14 14:38:05 UTC
(In reply to Michael Palimaka (kensington) from comment #6)
> There's been substantial changes upstream to the build system which probably
> caused this regression. If someone is able to produce a simplified testcase
> it would be nice to report upstream.

Are you saying that this doesn't happen every time you try to build 32-bit phonon on a 64-bit (multilib) machine?
Comment 8 Michael Palimaka (kensington) gentoo-dev 2016-05-14 18:18:42 UTC
(In reply to Tanktalus from comment #7)
> (In reply to Michael Palimaka (kensington) from comment #6)
> > There's been substantial changes upstream to the build system which probably
> > caused this regression. If someone is able to produce a simplified testcase
> > it would be nice to report upstream.
> 
> Are you saying that this doesn't happen every time you try to build 32-bit
> phonon on a 64-bit (multilib) machine?

I mean we can't tell upstream to reproduce by telling them to "emerge phonon with ABI_X86="32"".
Comment 9 Michael Palimaka (kensington) gentoo-dev 2016-07-13 17:36:14 UTC
Could someone please attach a failing build log for 4.9.0? I cannot reproduce.
Comment 10 Viz 2016-07-13 17:46:42 UTC
Created attachment 440606 [details]
Build log for phonon-4.9.0

(In reply to Michael Palimaka (kensington) from comment #9)
> Could someone please attach a failing build log for 4.9.0? I cannot
> reproduce.

Here is one, as you can see, it is trying to link 32-bit binary with 64-bit library.
Comment 11 Michael Palimaka (kensington) gentoo-dev 2016-07-13 17:53:34 UTC
(In reply to Viz from comment #10)
> Created attachment 440606 [details]
> Build log for phonon-4.9.0
> 
> (In reply to Michael Palimaka (kensington) from comment #9)
> > Could someone please attach a failing build log for 4.9.0? I cannot
> > reproduce.
> 
> Here is one, as you can see, it is trying to link 32-bit binary with 64-bit
> library.

Thanks, which version of cmake do you have installed?
Comment 12 Viz 2016-07-13 17:56:30 UTC
(In reply to Michael Palimaka (kensington) from comment #11)
> Thanks, which version of cmake do you have installed?

dev-util/cmake-3.3.1-r1::gentoo was built with the following:
USE="ncurses qt5 -doc -emacs -qt4 -system-jsoncpp -test" ABI_X86="64"
Comment 13 Michael Palimaka (kensington) gentoo-dev 2016-07-13 17:59:13 UTC
Thanks, your info helps a lot. It looks like the problem is caused by calling directly /usr/bin/qmake (which is queried to get the library location) instead of the ABI-specific version. This should be fixed in cmake-3.3.2-r1 and later.
Comment 14 Michael Palimaka (kensington) gentoo-dev 2016-07-13 18:13:42 UTC
Thanks everyone, workaround applied in git.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d6d88abf31d2b8cbe45b298f9c7fb7a37e96ca1
Comment 15 Viz 2016-07-13 18:19:54 UTC
(In reply to Michael Palimaka (kensington) from comment #13)
> Thanks, your info helps a lot. It looks like the problem is caused by
> calling directly /usr/bin/qmake (which is queried to get the library
> location) instead of the ABI-specific version. This should be fixed in
> cmake-3.3.2-r1 and later.

Confirmed the old ebuild works as cmake upgraded to 3.3.2-r1, thanks!