Summary: | app-emulation/xen-tools-4.4.1 - .../temp/ccv6t1wA.s:2868: Error: missing or invalid displacement expression `vmovaps_from_mem_len@GOTPCREL' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jiří Moravec <qjim> |
Component: | Current packages | Assignee: | Gentoo Xen Devs <xen> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cyberbat83, gentoo-bz |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
xen-tools-build.log.bz2
xen-tools-build.log.bz2 the possible offend patch force compile as no-PIC code Fix assembler errors on test_x86_emulator |
Description
Jiří Moravec
2014-09-12 11:48:36 UTC
Created attachment 384618 [details]
xen-tools-build.log.bz2
Created attachment 384620 [details]
xen-tools-build.log.bz2
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 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. 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 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) 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 I'm CCing @toolchain, see if they can shed some lights on this. 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... 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. (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. (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. 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. 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.
(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). 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.
(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. (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. Confirming the patch fixes the issue. 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 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... |