Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475482 (PR57777) - [4.7/4.8] dev-lang/python-2.7.5 fails to build with "-march=core-avx2 -O3"
Summary: [4.7/4.8] dev-lang/python-2.7.5 fails to build with "-march=core-avx2 -O3"
Status: RESOLVED FIXED
Alias: PR57777
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR57777
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-02 10:31 UTC by Julian Ospald
Modified: 2013-08-27 04:47 UTC (History)
1 user (show)

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


Attachments
python-2.7.5:20130702-102644.log (python-2.7.5:20130702-102644.log,155.21 KB, text/plain)
2013-07-02 10:31 UTC, Julian Ospald
Details
_randommodule-preprocessed.c (_randommodule-preprocessed.c,343.29 KB, text/x-csrc)
2013-07-02 12:31 UTC, Julian Ospald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ospald 2013-07-02 10:31:49 UTC
Created attachment 352440 [details]
python-2.7.5:20130702-102644.log

I expect stable packages to

a) fix it
or
b) filter flags that make compilation fail



Portage 2.2.0_alpha186 (default/linux/amd64/13.0, gcc-4.7.3, 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,    875932 free
KiB Swap:    4194300 total,   4191388 free
Timestamp of tree: Tue, 02 Jul 2013 09:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.5.4-r5, 2.6.8-r1, 2.7.5, 3.1.5-r1, 3.2.3-r2, 3.3.2
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.22-r1
sys-devel/gcc:            4.4.7, 4.5.4, 4.6.3, 4.7.3
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 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 /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 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-3" 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"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Julian Ospald 2013-07-02 10:53:31 UTC
got it nailed down... does not affect stable gcc-4.6 (can't use gcc-4.6 since it does not support -march=core-avx2)

"-march=core-avx2 -O2" works fine
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2013-07-02 11:08:51 UTC
Relevant bits:

building '_random' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core-avx2 -O2 -pipe -Wall -g -O3 -fwrapv -DNDEBUG -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.5/work/Python-2.7.5/Include -I/var/tmp/portage/dev-lang/python-2.7.5/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.5/work/Python-2.7.5/Modules/_randommodule.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.5/work/Python-2.7.5/Modules/_randommodule.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -L. -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -L. -fno-strict-aliasing -march=core-avx2 -O2 -pipe -Wall -g -O3 -fwrapv -DNDEBUG -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.5/work/Python-2.7.5/Include build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.5/work/Python-2.7.5/Modules/_randommodule.o -L/usr/local/lib -L. -lpython2.7 -o build/lib.linux-x86_64-2.7/_random.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.5/work/Python-2.7.5/Modules/_randommodule.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.5/work/Python-2.7.5/Modules/_randommodule.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
Comment 3 Julian Ospald 2013-07-02 11:17:39 UTC
for clarification:

gcc-4.7 "-march=core-avx2 -O3" -> fails
gcc-4.7 "-march=core-avx2 -O2" -> succeeds

gcc-4.7 "-march=core-avx-i -O3" -> succeeds
gcc-4.7 "-march=core-avx-i -O2" -> succeeds

gcc-4.6 "-march=core-avx-i -O3" -> succeeds
gcc-4.6 "-march=core-avx-i -O2" -> succeeds
Comment 4 Dirkjan Ochtman (RETIRED) gentoo-dev 2013-07-02 12:17:58 UTC
gcc upstream would like to have the preprocessed source of _randommodule.c.
Comment 5 Julian Ospald 2013-07-02 12:31:28 UTC
Created attachment 352452 [details]
_randommodule-preprocessed.c
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2013-08-27 04:47:00 UTC
Fixed in 4.7.3 p1.2 and 4.8.1 p1.1.