Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420705 - x11-libs/qt-core-4.8.2 fails to compile with ABI=x32
Summary: x11-libs/qt-core-4.8.2 fails to compile with ABI=x32
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
Keywords: PATCH
Depends on:
Blocks: x32
  Show dependency tree
Reported: 2012-06-11 17:25 UTC by Xavier Miller (RETIRED)
Modified: 2012-06-19 22:34 UTC (History)
2 users (show)

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

build.log (build.log,210.16 KB, text/plain)
2012-06-11 17:27 UTC, Xavier Miller (RETIRED)
qt-core-4.8.2-qatomic-x32.patch (qt-core-4.8.2-qatomic-x32.patch,1.29 KB, patch)
2012-06-13 13:47 UTC, Davide Pesavento
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Miller (RETIRED) gentoo-dev 2012-06-11 17:25:14 UTC
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h: Assembler messages:
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:178: Error: incorrect register `%ebx' used with `q' suffix
make: *** [.obj/release-shared/qlibraryinfo.o] Error 1
make: *** Waiting for unfinished jobs....
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h: Assembler messages:
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:178: Error: incorrect register `%ebx' used with `q' suffix
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h: Assembler messages:
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:178: Error: incorrect register `%ebx' used with `q' suffix
make: *** [.obj/release-shared/qthreadpool.o] Error 1
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:178: Error: incorrect register `%ebp' used with `q' suffix
make: *** [.obj/release-shared/qglobal.o] Error 1
 * ERROR: x11-libs/qt-core-4.8.2 failed (compile phase):
 *   emake failed
 * If you need support, post the output of `emerge --info '=x11-libs/qt-core-4.8.2'`,
 * the complete build log and the output of `emerge -pqv '=x11-libs/qt-core-4.8.2'`.
 * The complete build log is located at '/var/tmp/portage/x11-libs/qt-core-4.8.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/qt-core-4.8.2/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-libs/qt-core-4.8.2/work/qt-everywhere-opensource-src-4.8.2/src/corelib'
 * S: '/var/tmp/portage/x11-libs/qt-core-4.8.2/work/qt-everywhere-opensource-src-4.8.2'

Reproducible: Always
Comment 1 Xavier Miller (RETIRED) gentoo-dev 2012-06-11 17:26:02 UTC
emerge --info =x11-libs/qt-core-4.8.2
Portage 2.2.0_alpha110 (default/linux/amd64/10.0/x32, gcc-4.7.0, glibc-2.15-r2, 3.4.0-gentoo x86_64)
                        System Settings
System uname: Linux-3.4.0-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Mon, 11 Jun 2012 15:30:01 +0000
distcc 3.1 x86_64-gentoo-linux-gnu [disabled]
app-shells/bash:          4.2_p29
dev-lang/python:          2.7.3-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.5, 1.12.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.7.0
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo local pandaboard pd-overlay proaudio
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native"
EMERGE_DEFAULT_OPTS="--with-bdeps y --buildpkg --quiet-build=n"
FEATURES="assume-digests binpkg-logs buildpkg candy collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles multilib-strict news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/local/portage/overlay /var/lib/layman/pandaboard /var/lib/layman/pd-overlay /var/lib/layman/pro-audio"
USE="X aac acl alsa amd64 amr apng branding btrfs bzip2 cairo cdda cddb cli consolekit cracklib crypt cups cxx dbus device-mapper dri dssi encode exif fat ffmpeg fftw flac fortran gif gpm gstreamer gudev iconv id3tag jack jpeg ladspa lame libsamplerate lxde mmx modules mp3 mpeg mudflap multilib ncurses nls nptl ntfs ogg opengl openmp osc pam pcre pdf png policykit pppd qt3support qt4 readline rubberband samba sdl session sna sqlite sse sse2 ssl ssse3 svg tcpd threads tiff truetype udev unicode usb vorbis wmf x264 xcb xetex xorg xvid zlib" ALSA_CARDS="hda-intel usb-audio virmidi" 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" DVB_CARDS="usb-af9015" 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="keyboard mouse evdev synaptics" 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" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="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"
Comment 2 Xavier Miller (RETIRED) gentoo-dev 2012-06-11 17:27:14 UTC
Created attachment 315021 [details]
Comment 3 Davide Pesavento gentoo-dev 2012-06-12 19:16:14 UTC
@toolchain, any ideas?
Comment 4 SpanKY gentoo-dev 2012-06-13 03:00:02 UTC
try dropping the "q" suffix on the insn in the inline assembly.  iirc, the assembler will automatically select the right variable (quad or long) based on the registers, and the right registers will be used based on the target (x86_64 or x32/x86).

as an example:
Comment 5 Xavier Miller (RETIRED) gentoo-dev 2012-06-13 05:50:19 UTC
(In reply to comment #4)
> try dropping the "q" suffix on the insn in the inline assembly.  iirc, the
> assembler will automatically select the right variable (quad or long) based
> on the registers, and the right registers will be used based on the target
> (x86_64 or x32/x86).
> as an example:
> pulseaudio/libatomics-ops/libatomics-ops_fix_for_x32.
> patch?id=e3a384578f677c05d812d99c2c92aa13670bd06a

OK, I will take a look those days. I'm quite busy until this week-end, but as I'm interested in x32 ABI, I can involve me more in the bug hunting process (I can program in C/C++ and have seen many ASM code, especially 6502 when I was teenager)
Comment 6 Davide Pesavento gentoo-dev 2012-06-13 13:47:26 UTC
Created attachment 315191 [details, diff]

Thanks a lot Mike!

Xavier, does the attached patch work for you?
Comment 7 Xavier Miller (RETIRED) gentoo-dev 2012-06-13 17:59:00 UTC
It's OK.

Now I have a bug in qt-script (new bug).
Comment 8 Xavier Miller (RETIRED) gentoo-dev 2012-06-13 20:02:58 UTC
This patch is needed for qt-sql (build OK with the patch), qt-dbus (idem)

The other qt ebuilds depends on qt-script which fails on other errors (bug 421009)
Comment 9 Davide Pesavento gentoo-dev 2012-06-14 14:52:35 UTC
Patch submitted upstream.
Comment 10 Davide Pesavento gentoo-dev 2012-06-19 15:16:53 UTC
Merged upstream
Comment 11 Davide Pesavento gentoo-dev 2012-06-19 22:34:42 UTC
Patch applied in tree to all qt-*-4.8.2 ebuilds. Thanks for reporting.