Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 478158 - dev-python/pypy-2.0.2 fails to build with -march=core-avx2 on gcc-4.8.1
Summary: dev-python/pypy-2.0.2 fails to build with -march=core-avx2 on gcc-4.8.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-25 17:42 UTC by Julian Ospald
Modified: 2016-01-05 14:48 UTC (History)
3 users (show)

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


Attachments
pypy-2.0.2:20130725-145058.log.xz (pypy-2.0.2:20130725-145058.log.xz,29.54 KB, application/x-xz)
2013-07-25 18:52 UTC, Julian Ospald
Details
Fix missing instruction bugs in pypy:2.0 ebuilds (pypy-2.0.2-bextr-blsr.patch,642 bytes, patch)
2014-03-18 08:54 UTC, Greg Turner
Details | Diff
fix missing blsr instruction for pypy:0 ebuilds (blsr.patch,621 bytes, patch)
2014-03-18 08:55 UTC, Greg Turner
Details | Diff
build log (build.log.xz,29.92 KB, application/x-xz)
2014-04-14 20:04 UTC, lumbrius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ospald 2013-07-25 17:42:30 UTC
Portage 2.2.0_alpha188 (default/linux/amd64/13.0, gcc-4.8.1, glibc-2.15-r3, 3.8.13-gnu-ck1 x86_64)
=================================================================
System uname: Linux-3.8.13-gnu-ck1-x86_64-Intel-R-_Core-TM-_i7-4770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16459708 total,   6145516 free
KiB Swap:    4194300 total,   4107024 free
Timestamp of tree: Wed, 24 Jul 2013 15:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-lang/python:          2.5.4-r5, 2.6.8-r1, 2.7.5, 3.1.5-r1, 3.2.5-r1, 3.3.2-r1
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.4.7, 4.5.4, 4.6.3, 4.7.3, 4.8.1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo gentoo-zh Neurogeek arx-libertatis maggu2810-overlay hasufell sunrise toolchain mrueg mgorny gentoo-haskell crossdev hasufell-overlay science
Installed sets: @bleh, @development, @games, @optional, @steam, @test, @xfce
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe -Wall -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/applications /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="-march=core-avx2 -O2 -pipe -Wall -g"
DISTDIR="/home/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch protect-owned sandbox sfperms sign split-log splitdebug strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.netcologne.de/gentoo/ ftp://gentoo.imj.fr/pub/gentoo/ ftp://de-mirror.org/gentoo/"
INSTALL_MASK="/usr/lib/systemd/*"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j8"
PKGDIR="/home/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-z -9"
PORTAGE_CONFIGROOT="/"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gentoo-zh /var/lib/layman/neurogeek /var/lib/layman/arx-libertatis /var/lib/layman/maggu2810-overlay /var/lib/layman/hasufell /var/lib/layman/sunrise /var/lib/layman/toolchain /var/lib/layman/mrueg /var/lib/layman/mgorny /var/lib/layman/gentoo-haskell /usr/local/crossdev /usr/local/portage /usr/local/portage-science"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apng bash-completion berkdb bzip2 cairo cdr cli consolekit cracklib crypt cscope css cxx dbus dri dv dvd dvdr exif fat ffmpeg flac fontconfig fortran gdbm gif gpm gstreamer hddtemp iconv icq icu ipv6 jabber jpeg jpeg2k lame libnotify lm_sensors matroska mmx modules mp3 mp4 mpeg mudflap multilib musepack ncurses nls nptl nsplugin ntfs ogg opengl openmp oscar pam pcre pdf png policykit python qt3support raw readline sdl session sound sse sse2 ssl ssse3 svg tcpd threads tiff timidity truetype udev unicode usb v4l vcd vdpau vim-syntax vnc vorbis wavpack win32codecs wmf x264 xv xvid xvmc zlib" ABI_X86="64 32" 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 ubx" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport presenter-console presenter-minimizer" LINGUAS="en de" NETBEANS_MODULES="*" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="pypy2_0 python2_5 python2_6 python2_7 python3_1 python3_2 python3_3" QEMU_SOFTMMU_TARGETS="i386 ppc ppc64 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" 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.5 2.6 2.7 3.1 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Julian Ospald 2013-07-25 17:42:57 UTC
-march=core-avx-i works fine

-O2/-O3 do not make any difference
Comment 2 Julian Ospald 2013-07-25 18:52:12 UTC
Created attachment 354196 [details]
pypy-2.0.2:20130725-145058.log.xz
Comment 3 Mike Gilbert gentoo-dev 2013-07-25 19:11:17 UTC
Is this the same issue as bug 475482?
Comment 4 Julian Ospald 2013-07-25 19:13:07 UTC
no, as explained it doesn't matter which optimization level and I already have that upstream patch applied
Comment 5 Mike Gilbert gentoo-dev 2013-07-25 19:18:26 UTC
Ah, here's the relevant bit:

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pypy-2.0.2/work/pypy-2.0.2-src/rpython/translator/c/gcc/trackgcroot.py", line 2037, in <module>
    tracker.process(f, g, filename=fn)
  File "/var/tmp/portage/dev-python/pypy-2.0.2/work/pypy-2.0.2-src/rpython/translator/c/gcc/trackgcroot.py", line 1930, in process
    tracker = parser.process_function(lines, filename)
  File "/var/tmp/portage/dev-python/pypy-2.0.2/work/pypy-2.0.2-src/rpython/translator/c/gcc/trackgcroot.py", line 1445, in process_function
    table = tracker.computegcmaptable(self.verbose)
  File "/var/tmp/portage/dev-python/pypy-2.0.2/work/pypy-2.0.2-src/rpython/translator/c/gcc/trackgcroot.py", line 53, in computegcmaptable
    self.parse_instructions()
  File "/var/tmp/portage/dev-python/pypy-2.0.2/work/pypy-2.0.2-src/rpython/translator/c/gcc/trackgcroot.py", line 207, in parse_instructions
    self.find_missing_visit_method(opname)
  File "/var/tmp/portage/dev-python/pypy-2.0.2/work/pypy-2.0.2-src/rpython/translator/c/gcc/trackgcroot.py", line 237, in find_missing_visit_method
    raise UnrecognizedOperation(opname)
__main__.UnrecognizedOperation: blsr
Comment 6 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2014-03-14 08:35:15 UTC
Please try the last version of dev-python/pypy and if is still a problem report the bug upstream and report the link.
Comment 7 Greg Turner 2014-03-18 08:53:34 UTC
This bug also happens on for me with -march=native on my fx8350.  After fixing it another very similar problem will appear wrt. bextr.  I have a patch for those two, and a corresponding patch for pypy-2.2.1, where bextr was added but not blsr.

However, note that these are upstream bugs and should really be reported there. I'll attach patches.
Comment 8 Greg Turner 2014-03-18 08:54:31 UTC
Created attachment 372910 [details, diff]
Fix missing instruction bugs in pypy:2.0 ebuilds
Comment 9 Greg Turner 2014-03-18 08:55:30 UTC
Created attachment 372912 [details, diff]
fix missing blsr instruction for pypy:0 ebuilds
Comment 10 lumbrius 2014-04-14 20:04:32 UTC
Created attachment 374926 [details]
build log

pypy-2.0.2-r1 fails to build on my Intel Haswell (i7-4700HQ) with -march=native and gcc-4.8.2.
Comment 11 lumbrius 2014-04-14 20:05:26 UTC
lucius@mercurius /var/tmp $ emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop, gcc-4.8.2, glibc-2.17, 3.12.2-gentoo x86_64)
=================================================================
System uname: Linux-3.12.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-4700HQ_CPU_@_2.40GHz-with-gentoo-2.2
KiB Mem:    16314996 total,   5756552 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Wed, 02 Apr 2014 14:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
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
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo science gamerlay bumblebee
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write=y"
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"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
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"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /var/lib/layman/gamerlay /var/lib/layman/bumblebee"
USE="X a52 aac acl acpi alsa amd64 avx avx2 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit cpudetection cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk gtk3 iconv ipv6 jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl session spell sse sse2 sse3 sse4 sse4_1 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid 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="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB ru" 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 nvidia" 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 12 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-04-15 15:35:04 UTC
Can you please file a bug upstream and link us to it?

In the past I have for example filed https://bugs.pypy.org/issue1587 which can inspire you on how to file a new bug report, what information is nedeed, how to test adding the instruction works, how to find further instructions, ...
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-05 09:01:04 UTC
Does this still happen with modern PyPy versions?
Comment 14 lumbrius 2016-01-05 14:46:13 UTC
(In reply to Michał Górny from comment #13)
> Does this still happen with modern PyPy versions?

I have pypy-2.6.0 merged with no failures. (-march=native,  Intel(R) Core(TM) i5-2410M CPU)
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-05 14:48:29 UTC
Yeah, it looks like upstream fixed quite some instruction sets already.