Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 522642 - app-emulation/xen-tools-4.4.1 - .../temp/ccv6t1wA.s:2868: Error: missing or invalid displacement expression `vmovaps_from_mem_len@GOTPCREL'
Summary: app-emulation/xen-tools-4.4.1 - .../temp/ccv6t1wA.s:2868: Error: missing or i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-12 11:48 UTC by Jiří Moravec
Modified: 2015-05-12 15:33 UTC (History)
2 users (show)

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


Attachments
xen-tools-build.log.bz2 (xen-tools-build.log.bz2,37.40 KB, application/x-bzip)
2014-09-12 11:54 UTC, Jiří Moravec
Details
xen-tools-build.log.bz2 (xen-tools-build.log.bz2,37.40 KB, application/x-bzip)
2014-09-12 11:56 UTC, Jiří Moravec
Details
the possible offend patch (xen-revert-x86_emulate.patch,15.24 KB, patch)
2014-09-13 14:43 UTC, Yixun Lan
Details | Diff
force compile as no-PIC code (xen-4-force-no-pic.patch,505 bytes, patch)
2014-09-16 15:04 UTC, Yixun Lan
Details | Diff
Fix assembler errors on test_x86_emulator (xen-4-force-no-pie.patch,702 bytes, patch)
2014-09-20 09:36 UTC, Claudio Calvelli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiří Moravec 2014-09-12 11:48:36 UTC
Every attempt to build xen-tools now failing with message:

gcc -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -Wdeclaration-after-statement -I/var/tmp/portage/app-emulation/xen-tools-4.3.3/work/xen-4.3.3/tools/tests/x86_emulator/../../../tools/include -c -o test_x86_emulator.o test_x86_emulator.c
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s: Assembler messages:
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:1411: Error: missing or invalid displacement expression `vmovaps_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:1450: Error: missing or invalid displacement expression `movsd_to_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:1490: Error: missing or invalid displacement expression `vmovdqu_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:1568: Error: missing or invalid displacement expression `movaps_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:1639: Error: missing or invalid displacement expression `vmovsd_to_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:1833: Error: missing or invalid displacement expression `vmovdqu_to_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:1918: Error: missing or invalid displacement expression `movdqu_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:1956: Error: missing or invalid displacement expression `movdqu_to_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:2017: Error: missing or invalid displacement expression `movq_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.3.3/temp/ccdD5tmv.s:2055: Error: missing or invalid displacement expression `movq_to_mem_len@GOTPCREL'
make[4]: *** [test_x86_emulator.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-4.3.3/work/xen-4.3.3/tools/tests/x86_emulator'
make[3]: *** [subdir-all-x86_emulator] Error 2


Reproducible: Always

Steps to Reproduce:
1. emerge -v1 app-emulation/xen-tools

Actual Results:  
 * ERROR: app-emulation/xen-tools-4.3.3::gentoo failed (compile phase):
 *   emake failed


Expected Results:  
build done without problems

gcc-4.7.4/4.8.3/4.9.0 and xen-tools-4.3.3/4.4.1 in any combination with same results

emerge -pqv '=app-emulation/xen-tools-4.4.1::gentoo':
-----------------------------------------------------
[ebuild     U ] app-emulation/xen-tools-4.4.1 [4.4.0-r9] USE="hvm pam python qemu -api -custom-cflags -debug -doc -flask -ocaml -pygrub -screen -static-libs -system-qemu -system-seabios" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7"



emerge --info '=app-emulation/xen-tools-4.4.1::gentoo':
-------------------------------------------------------
WARNING: One or more repositories have been ignored due to duplicate
  profiles/repo_name entries:

  /, gentoo, /usr/portage/ebuilds overrides
    /opt32/portage/ebuilds

  All profiles/repo_name entries must be unique in order to avoid having
  duplicates ignored. Set PORTAGE_REPO_DUPLICATE_WARN="0" in
  /etc/portage/make.conf if you would like to disable this warning.


Portage 2.2.12-r1 (python 2.7.7-final-0, hardened/linux/amd64, gcc-4.8.3, glibc-2.17, 3.16.1-x1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.16.1-x1-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.2
KiB Mem:    24637068 total,    842976 free
KiB Swap:   41942352 total,  41936804 free
Timestamp of tree: Fri, 12 Sep 2014 08:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.7, 3.2.5-r6, 3.3.5-r1
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.1
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.4_p6-r1, 1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.20.1-r1, 2.21.1-r1, 2.22-r1, 2.23.1, 2.23.2
sys-devel/gcc:            4.5.4, 4.6.4, 4.7.4, 4.8.3, 4.9.0
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo x11 openstreetmap sunrise seden java gentoo-el jim-private crossdev
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -mtune=native -fno-lto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /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/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /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="-march=native -O2 -pipe -mtune=native -fno-lto"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --ask-enter-invalid --quiet-build=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache collision-protect 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 http://ftp.sh.cvut.cz/MIRRORS/gentoo http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
LANG="cs_CZ.utf-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -fno-lto"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages/k10"
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"
PORTDIR="/usr/portage/ebuilds"
PORTDIR_OVERLAY="/usr/portage/overlays/layman/x11 /usr/portage/overlays/layman/openstreetmap /usr/portage/overlays/layman/sunrise /usr/portage/overlays/layman/seden /usr/portage/overlays/layman/java /usr/portage/overlays/layman/gentoo-el /usr/portage/overlays/jim /usr/portage/overlays/crossdev"
USE="3dnow 3dnowext 7zip X aac acl acpi alsa amd64 bash-completion berkdb bzip2 cairo caps cli cracklib crypt cxx dbus dri dvd encode faac faad fbcon fbcondecor fbsplash ffmpeg fftw flac gallium gdbm gif gnutls gpm gtk hardened hvm iconv id3tag iproute2 ipv6 java java6 jpeg jpeg2k justify kde kerberos lzma lzo mad matroska mmx mng mod modules mp3 mp4 mpeg mpeg2 mpeg4 multilib mysql ncurses netlink nfs nfsv3 nfsv4 nls nptl nsplugin ntfs ogg openal opengl openmp pam pax_kernel pcre pdf perl php pic pie png python qt3support qt4 rdp readline samba sdl semantic-desktop session slang sse sse2 sse3 sse4a ssl svg tcpd theora tiff truetype unicode urandom usb userlocales vdpau vlc vnc vorbis vpx webkit webp x264 x265 xattr xen xml xtpax xv xvmc 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 proxy proxy_fcgi proxy_ftp proxy_http" 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" 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" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="cs" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="i386 x86_64 or32 ppc64" QEMU_USER_TARGETS="i386 x86_64 or32 ppc64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Jiří Moravec 2014-09-12 11:54:27 UTC
Created attachment 384618 [details]
xen-tools-build.log.bz2
Comment 2 Jiří Moravec 2014-09-12 11:56:05 UTC
Created attachment 384620 [details]
xen-tools-build.log.bz2
Comment 3 Yixun Lan archtester gentoo-dev 2014-09-12 14:34:46 UTC
it seems i can't reproduce this, could you double check your CFLAGS?
works for me with following command.
USE="hvm pam python qemu -api -custom-cflags -debug -doc -flask -ocaml -pygrub -screen -static-libs -system-qemu -system-seabios" emerge -q1 xen-tools



 ~ # emerge --info                                                                                                              
Portage 2.2.12 (python 3.3.5-final-0, default/linux/amd64/13.0, gcc-4.9.1, glibc-2.19-r1, 3.16.2-gentoo x86_64)
=================================================================
System uname: Linux-3.16.2-gentoo-x86_64-Intel-R-_Core-TM-_i5-2400_CPU_@_3.10GHz-with-gentoo-2.2
KiB Mem:     3890980 total,   1314236 free
KiB Swap:    2097148 total,   2097148 free
Timestamp of tree: Fri, 12 Sep 2014 13:45:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p47
dev-lang/python:          2.7.8, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.7.3-r1, 4.8.3, 4.9.1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo local dlan
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -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/php/apache2-p
hp5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/home/gentoo/locals"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-li
bs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ofire http://mirrors.163.com/gentoo http://mirrors.xmu.edu.cn/gentoo   http://mirrors.stuhome.net/gentoo/ http://gentoo.mirrors.hoobly.com/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6 -l6"
PKGDIR="/home/gentoo/package"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --hum
an-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/local /var/lib/layman/dlan"
SYNC="rsync://mirrors.xmu.edu.cn/gentoo-portage"
USE="X acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx modules multilib ncurses nls nptl openmp openrc-force p
am pcre readline session sse sse2 ssl tcpd unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci em
u10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MOD
ULES="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 exp
ires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling statu
s unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERA
S="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 t
ripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mt
xorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" P
YTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint in
tel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv
4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.3"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, POR
TAGE_RSYNC_EXTRA_OPTS
Comment 4 Yixun Lan archtester gentoo-dev 2014-09-12 14:40:34 UTC
 CFLAGS="-march=native -O2 -pipe -mtune=native -fno-lto"  USE="hvm pam python qemu -api -custom-cflags -debug -doc -flask -ocaml -pygrub -screen -static-libs -system-qemu -system-seabios" emerge -1q xen-tools

up command also works for me, note I simply change CFLAGS for this ebuild.

also could you double check if you still have problem with old version 4.4.0-r9 (the old version you already installed successfully), assume you can get this ebuild from old portage.
Comment 5 Claudio Calvelli 2014-09-13 10:22:02 UTC
I get exactly the same problem:

gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -Wdeclaration-after-statement -I/var/tmp/portage/app-emulation/xen-tools-4.4.1/work/xen-4.4.1/tools/tests/x86_emulator/../../../tools/include -c -g -o test_x86_emulator.o test_x86_emulator.c
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s: Assembler messages:
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:2831: Error: missing or invalid displacement expression `vmovaps_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:2900: Error: missing or invalid displacement expression `movaps_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:3021: Error: missing or invalid displacement expression `vmovsd_to_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:3092: Error: missing or invalid displacement expression `movsd_to_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:3167: Error: missing or invalid displacement expression `vmovdqu_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:3310: Error: missing or invalid displacement expression `movdqu_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:3378: Error: missing or invalid displacement expression `movdqu_to_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:3489: Error: missing or invalid displacement expression `movq_from_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:3557: Error: missing or invalid displacement expression `movq_to_mem_len@GOTPCREL'
/var/tmp/portage/app-emulation/xen-tools-4.4.1/temp/ccv8ohOQ.s:3959: Error: missing or invalid displacement expression `vmovdqu_to_mem_len@GOTPCREL'
make[4]: *** [test_x86_emulator.o] Error 1


# emerge -pqv '=app-emulation/xen-tools-4.4.1::gentoo'
[ebuild     U ] app-emulation/xen-tools-4.4.1 [4.4.0-r9] USE="hvm pam qemu -api -custom-cflags -debug -doc -flask -ocaml -pygrub -python -screen -static-libs -system-qemu -system-seabios" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" 


# emerge --info '=app-emulation/xen-tools-4.4.1::gentoo'
Portage 2.2.8-r1 (hardened/linux/amd64, gcc-4.7.3, glibc-2.19-r1, 3.16.2 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.16.2-x86_64-Intel-R-_Core-TM-_i3-3220_CPU_@_3.30GHz-with-gentoo-2.2
KiB Mem:      948944 total,     25352 free
KiB Swap:    8388604 total,   8383580 free
Timestamp of tree: Sat, 13 Sep 2014 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.7, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.1
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -mtune=native -pipe"
DISTDIR="/var/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news 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://mirror.bytemark.co.uk/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/var/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--omit-dir-times"
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"
PORTDIR="/var/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://proxy.intercal.org.uk/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri gdbm hardened hvm iconv ipv6 justify mmx modules multilib ncurses nls nptl pam pax_kernel pcre qemu readline session sse sse2 ssl ssse3 tcpd unicode urandom xtpax zlib" ABI_X86="64" 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" 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" 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="keyboard mouse evdev" 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_3" RUBY_TARGETS="ruby19 ruby20" 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"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 6 Claudio Calvelli 2014-09-13 13:49:52 UTC
Looks like the problem may be caused by something gcc does.

gcc-config x86_64-pc-linux-gnu-4.7.3-vanilla
. /etc/profile
emerge =app-emulation/xen-tools-4.4.1

That worked fine.  Then

gcc-config x86_64-pc-linux-gnu-4.7.3
. /etc/profile
emerge =app-emulation/xen-tools-4.4.1

Fails as described in previous comments.  Version of gcc doesn't seem to make a difference (also tried with 4.9.1)
Comment 7 Yixun Lan archtester gentoo-dev 2014-09-13 14:18:12 UTC
interesting, I don't have vanilla version gcc installed, but still have no problem with xen-tools-4.4.1

 ~ # gcc-config -l
 [1] x86_64-pc-linux-gnu-4.7.3
 [2] x86_64-pc-linux-gnu-4.8.3
 [3] x86_64-pc-linux-gnu-4.9.1 *

 ~ # emerge -pv =sys-devel/gcc-4.9.1                                                                                                   
[ebuild   R   *] sys-devel/gcc-4.9.1:4.9  USE="cxx fortran (multilib) nls nptl openmp (-altivec) -awt -doc (-fixed-point) -gcj -go -graphite (-hardened) (-libssp) (-multislot) -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla" 0 KiB
Comment 8 Yixun Lan archtester gentoo-dev 2014-09-13 14:19:59 UTC
I'm CCing @toolchain, see if they can shed some lights on this.
Comment 9 Claudio Calvelli 2014-09-13 14:39:33 UTC
Yixun Lan: I expect the difference is that we use a "hardened" profile, while you appear to be using default/linux/amd64/13.0 - this will make a difference on what gcc-profile offers.
Anyway, about to reboot into the updated xen and xen-tools, fingers crossed...
Comment 10 Yixun Lan archtester gentoo-dev 2014-09-13 14:43:07 UTC
Created attachment 384672 [details, diff]
the possible offend patch

for the file test_x86_emulator.c, xen-4.4.1 introduced changes at commit [1] 
could you try to test the attached patch, just put it under directory /etc/portage/patches/app-emulation/xen-tools-4.4.1, and re-emerge

also, my previous question: does this problem also happens with xen-tools-4.4.0-r9? guess the answer is: No


[1] xen's upstream commit
commit 91a13bcf99d1a47f6f7ccd364b95b1b8500c2be2
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Aug 22 14:07:36 2014 +0200

    x86_emulate: properly do IP updates and other side effects on success
    
    The two MMX/SSE/AVX code blocks failed to update IP properly, and these
    as well as get_reg_refix(), which "manually" updated IP so far, failed
    to do the TF and RF processing needed at the end of successfully
    emulated instructions.
    
    Fix the test utility at once to check IP is properly getting updated,
    and while at it macroize the respective code quite a bit, hopefully
    making it easier to add further tests when the need arises.
Comment 11 Yixun Lan archtester gentoo-dev 2014-09-13 14:46:33 UTC
(In reply to Claudio Calvelli from comment #9)
> Anyway, about to reboot into the updated xen and xen-tools, fingers
> crossed...
don't worry, no panic..
the xen-tools-4.4.1 is a forward version for 4.4.0, which take from xen's stable-4.4 branch (xen upstream actually tested those branch), the changes is actually quite minimal, since we've already tracking that branch very closely.
Comment 12 Claudio Calvelli 2014-09-13 15:08:48 UTC
(In reply to Yixun Lan from comment #10)
> for the file test_x86_emulator.c, xen-4.4.1 introduced changes at commit [1] 
> could you try to test the attached patch, just put it under directory
> /etc/portage/patches/app-emulation/xen-tools-4.4.1, and re-emerge

OK, just added that patch and yes, I can confirm that it builds without problems on a hardened profile.

All looks like working fine.

Thanks.
Comment 13 SpanKY gentoo-dev 2014-09-15 19:50:54 UTC
looks like your "normal" PIC vs non-PIC problem.  the inline assembly isn't PIC friendly so fails when using a toolchain that defaults to on (like hardened).

looks like you've found the broken code, so i don't think you need anything from toolchain here.
Comment 14 Yixun Lan archtester gentoo-dev 2014-09-16 15:04:13 UTC
Created attachment 384864 [details, diff]
force compile as no-PIC code

hello, can anyone help test this patch? this force gcc compile it as non PIC code, which passed here.
Comment 15 Claudio Calvelli 2014-09-18 08:52:30 UTC
(In reply to Yixun Lan from comment #14)
> Created attachment 384864 [details, diff] [details, diff]
> force compile as no-PIC code
> 
> hello, can anyone help test this patch? this force gcc compile it as non PIC
> code, which passed here.

I get a different error:

gcc -o test_x86_emulator x86_emulate.o test_x86_emulator.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: test_x86_emulator.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
test_x86_emulator.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[4]: *** [test_x86_emulator] Error 1
make[4]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-4.4.1/work/xen-4.4.1/tools/tests/x86_emulator'

Full ebuild log etc available if it helps.

Tested with x86_64-pc-linux-gnu-4.7.3 (from hardened profile).
Comment 16 Claudio Calvelli 2014-09-20 09:36:53 UTC
Created attachment 385164 [details, diff]
Fix assembler errors on test_x86_emulator

This patch works for me - needs to have -fno-pie both when compiling and linking to avoid a link error.
Comment 17 cyberbat 2014-09-23 21:29:12 UTC
(In reply to Yixun Lan from comment #10)
> Created attachment 384672 [details, diff] [details, diff]
> the possible offend patch
> 
> for the file test_x86_emulator.c, xen-4.4.1 introduced changes at commit [1] 
> could you try to test the attached patch, just put it under directory
> /etc/portage/patches/app-emulation/xen-tools-4.4.1, and re-emerge

I've tried this patch on hardened amd64 and xen-tools-4.4.1 emerged successfully.
Comment 18 Jiří Moravec 2014-09-27 11:56:54 UTC
(In reply to cyberbat from comment #17)
> (In reply to Yixun Lan from comment #10)
> > Created attachment 384672 [details, diff] [details, diff] [details, diff]
> > the possible offend patch
> > 
> > for the file test_x86_emulator.c, xen-4.4.1 introduced changes at commit [1] 
> > could you try to test the attached patch, just put it under directory
> > /etc/portage/patches/app-emulation/xen-tools-4.4.1, and re-emerge
> 
> I've tried this patch on hardened amd64 and xen-tools-4.4.1 emerged
> successfully.

Me too, with same result :-)
Thanks for patch.
Comment 19 Radoslaw Szkodzinski 2014-10-01 05:20:28 UTC
Confirming the patch fixes the issue.
Comment 20 Ian Delaney (RETIRED) gentoo-dev 2014-10-09 00:51:41 UTC
sheeeesh

Bug 494604

I noted this back then and made this for the hardened team to finish off since my attempt didn't quite get there, and they NEVER touched it.
I have to find dlan
Comment 21 Yixun Lan archtester gentoo-dev 2015-05-12 15:33:43 UTC
we should close this as fixed,  but notice that I didn't take patch as in comment #10.

I completely disable the compiling of  "tools/tests/x86_emulator'", since it only get built but never installed.

please re-open if you still have problem...