Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 443778 - flag-o-matic.eclass test-flag-PROG() is broken for <gcc-4.7 (was: sci-libs/scipy-0.11.0: Fails to build of x86-64 (missing -fPIC flag))
Summary: flag-o-matic.eclass test-flag-PROG() is broken for <gcc-4.7 (was: sci-libs/sc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal with 4 votes (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-18 13:58 UTC by Maciej Piechotka
Modified: 2014-05-19 13:23 UTC (History)
9 users (show)

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


Attachments
sci-libs:scipy-0.11.0:20121118-134947.log.gz.gz (sci-libs:scipy-0.11.0:20121118-134947.log.gz.gz,63.53 KB, application/x-gzip)
2012-11-18 17:06 UTC, Maciej Piechotka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Piechotka 2012-11-18 13:58:02 UTC
/usr/bin/x86_64-pc-linux-gnu-gfortran -Wall -Wl,-O1 -Wl,--as-needed -Wl,--add-needed -Wl,--hash-style=both -Wl,--sort-common -Wl,--no-keep-memory -shared build-2.7/temp.linux-x86_64-2.7/build-2.7/src.linux-x86_64-2.7/scipy/fftpack/_fftpackmodule.o build-2.7/temp.linux-x86_64-2.7/scipy/fftpack/src/zfft.o build-2.7/temp.linux-x86_64-2.7/scipy/fftpack/src/drfft.o build-2.7/temp.linux-x86_64-2.7/scipy/fftpack/src/zrfft.o build-2.7/temp.linux-x86_64-2.7/scipy/fftpack/src/zfftnd.o build-2.7/temp.linux-x86_64-2.7/build-2.7/src.linux-x86_64-2.7/scipy/fftpack/src/dct.o build-2.7/temp.linux-x86_64-2.7/build-2.7/src.linux-x86_64-2.7/scipy/fftpack/src/dst.o build-2.7/temp.linux-x86_64-2.7/build-2.7/src.linux-x86_64-2.7/fortranobject.o -L/usr/lib64 -Lbuild-2.7/temp.linux-x86_64-2.7 -ldfftpack -lfftpack -lpython2.7 -lgfortran -o build-2.7/lib.linux-x86_64-2.7/scipy/fftpack/_fftpack.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: build-2.7/temp.linux-x86_64-2.7/libdfftpack.a(zffti1.o): relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC
build-2.7/temp.linux-x86_64-2.7/libdfftpack.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: build-2.7/temp.linux-x86_64-2.7/libdfftpack.a(zffti1.o): relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC
build-2.7/temp.linux-x86_64-2.7/libdfftpack.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: Command "/usr/bin/x86_64-pc-linux-gnu-gfortran -Wall -Wl,-O1 -Wl,--as-needed -Wl,--add-needed -Wl,--hash-style=both -Wl,--sort-common -Wl,--no-keep-memory -shared build-2.7/temp.linux-x86_64-2.7/build-2.7/src.linux-x86_64-2.7/scipy/fftpack/_fftpackmodule.o build-2.7/temp.linux-x86_64-2.7/scipy/fftpack/src/zfft.o build-2.7/temp.linux-x86_64-2.7/scipy/fftpack/src/drfft.o build-2.7/temp.linux-x86_64-2.7/scipy/fftpack/src/zrfft.o build-2.7/temp.linux-x86_64-2.7/scipy/fftpack/src/zfftnd.o build-2.7/temp.linux-x86_64-2.7/build-2.7/src.linux-x86_64-2.7/scipy/fftpack/src/dct.o build-2.7/temp.linux-x86_64-2.7/build-2.7/src.linux-x86_64-2.7/scipy/fftpack/src/dst.o build-2.7/temp.linux-x86_64-2.7/build-2.7/src.linux-x86_64-2.7/fortranobject.o -L/usr/lib64 -Lbuild-2.7/temp.linux-x86_64-2.7 -ldfftpack -lfftpack -lpython2.7 -lgfortran -o build-2.7/lib.linux-x86_64-2.7/scipy/fftpack/_fftpack.so" failed with exit status 1
 * ERROR: sci-libs/scipy-0.11.0 failed (compile phase):
 *   Building failed with CPython 2.7 in distutils_building() function
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 5516:  Called distutils_src_compile 'config_fc' '--noopt' '--noarch'
 *   environment, line 1440:  Called python_execute_function 'distutils_building' 'config_fc' '--noopt' '--noarch'
 *   environment, line 3807:  Called die
 * The specific snippet of code:
 *                       die "${failure_message}";
 * 
 * If you need support, post the output of `emerge --info '=sci-libs/scipy-0.11.0'`,
 * the complete build log and the output of `emerge -pqv '=sci-libs/scipy-0.11.0'`.
 * The complete build log is located at '/var/log/portage/sci-libs:scipy-0.11.0:20121118-134947.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sci-libs/scipy-0.11.0/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-libs/scipy-0.11.0/work/scipy-0.11.0'
 * S: '/var/tmp/portage/sci-libs/scipy-0.11.0/work/scipy-0.11.0'
Comment 1 Rafał Mużyło 2012-11-18 15:18:11 UTC
Attach full build log.
Comment 2 Maciej Piechotka 2012-11-18 17:06:27 UTC
Created attachment 329868 [details]
sci-libs:scipy-0.11.0:20121118-134947.log.gz.gz
Comment 3 Rafał Mużyło 2012-11-18 17:47:04 UTC
Well, ebuild does have 'append-fflags -fPIC' so it should be already handled.

Your 'emerge --info' ?
Comment 4 Maciej Piechotka 2012-11-18 21:18:22 UTC
(In reply to comment #3)
> Well, ebuild does have 'append-fflags -fPIC' so it should be already handled.
> 
> Your 'emerge --info' ?

Portage 2.2.0_alpha142 (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.3, glibc-2.16.0, 3.6.6-gentoo x86_64)
=================================================================
System uname: Linux-3.6.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-3820QM_CPU_@_2.70GHz-with-gentoo-2.2
Timestamp of tree: Sun, 18 Nov 2012 12:15:01 +0000
ld GNU ld (Linux/GNU Binutils) 2.23.51.0.5.20121110
app-shells/bash:          4.2_p39
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.5
sys-devel/binutils:       2.23.51.0.5
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r5::gnome
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo crossdev gnome x11 gentoo-haskell local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -ggdb -w -Wa,--compress-debug-sections"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /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="-O2 -march=native -pipe -ggdb -w -Wa,--compress-debug-sections"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="-j4 --load-average=7"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--add-needed -Wl,--hash-style=both -Wl,--sort-common -Wl,--no-keep-memory"
LINGUAS="en pl en_GB"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
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="/usr/local/portage-crossdev /var/lib/layman/gnome /var/lib/layman/x11 /var/lib/layman/haskell /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 avx berkdb bluetooth branding bzip2 bzr c++0x cairo caps cdda cdr cli clutter colord cracklib crypt cryptsetup cups cxx dbus dconf debugger device-mapper dri dts dvd dvdr eds emacs emboss encode evo exif fam ffmpeg firefox firewalld flac flash fontconfig fortran fprint fuse g3dvl gdbm gdm gif git gmp gnome gnome-keyring gnome-online-accounts gnutls gpm grilo gsettings gstreamer gtk gtk3 gtkstyle gui iconv introspection ipsec ipv6 ipython irc ithreads jabber jpeg kerberos laptop latex lcms ldap libkms libnotify libproxy llvm lvm lzma mad map mercurial mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nsplugin ogg opencl opengl openmp oss pam pango parted pch pcre pdf perl pkcs11 png policykit postgres ppds pppd profiler pulseaudio python qemu qt4 readline realtime samba sdl session sna socialweb spell spice sqlite sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification subversion svg symlink systemd tcpd theora threads tiff tracker truetype udev udisks unicode upower usb v4l vaapi vala vdpau virt-network virtfs virtualbox vorbis vpx webkit wxwidgets x264 xattr xcb xcomposite xinerama xml xv xvid zlib zsh-completion" 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" 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="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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="caps crypt lvm syslog systemd" 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" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev synaptics mouse mutouch" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en pl en_GB" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="arm x86_64 i386" QEMU_USER_TARGETS="arm x86_64 i386" RUBY_TARGETS="ruby19" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 5 François Bissey 2012-11-18 21:33:53 UTC
For some reasons dfftpack has been compiled as a static archive, from your log:
[[39mbuilding 'dfftpack' library^[[0m
^[[39mcompiling Fortran sources^[[0m
^[[39mFortran f77 compiler: /usr/bin/x86_64-pc-linux-gnu-gfortran -Wall -ffixed-form -fno-second-underscore
Fortran f90 compiler: /usr/bin/x86_64-pc-linux-gnu-gfortran -Wall -fno-second-underscore
Fortran fix compiler: /usr/bin/x86_64-pc-linux-gnu-gfortran -Wall -ffixed-form -fno-second-underscore -Wall -fno-second-underscore^[[0m


From my own log:
^[[39mbuilding 'dfftpack' library^[[0m
^[[39mcompiling Fortran sources^[[0m
^[[39mFortran f77 compiler: /usr/bin/x86_64-pc-linux-gnu-gfortran -Wall -ffixed-form -fno-second-underscore -O1 -march=native -pipe -ggdb -fPIC
Fortran f90 compiler: /usr/bin/x86_64-pc-linux-gnu-gfortran -Wall -fno-second-underscore -O1 -march=native -pipe -ggdb -fPIC
Fortran fix compiler: /usr/bin/x86_64-pc-linux-gnu-gfortran -Wall -ffixed-form -fno-second-underscore -Wall -fno-second-underscore -O1 -march=native -pipe -ggdb -fPIC

Your FCLAGS are completely ignored. Could you add FFLAGS to your make.conf that's just a hunch.
Comment 6 Rafał Mużyło 2012-11-19 01:35:24 UTC
'-w' may have nasty side effects every now and then - some of configure checks check for warnings, simply cause some of compilers don't generate errors on those checks.
Comment 7 Yu Yuwei 2012-11-19 02:08:48 UTC
same error here, and this is my emerge --info:

Portage 2.2.0_alpha142 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.4, glibc-2.16.0, 3.4.0-gentoo x86_64)
=================================================================
System uname: Linux-3.4.0-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1230_V2_@_3.30GHz-with-gentoo-2.2
Timestamp of tree: Sun, 18 Nov 2012 23:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p39
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.10.1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.2
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.10.3, 1.11.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo acevery gentoo-zh desktop-effects gentoo-china sunrise
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mtune=generic -O1 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /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/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=core2 -mtune=generic -O1 -pipe"
DISTDIR="/usr/portage/distfiles"
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 xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.xmu.edu.cn/gentoo/"
LANG="zh_CN.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="zh_CN en_US"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
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="/usr/portage/local/layman/acevery /usr/portage/local/layman/gentoo-zh /usr/portage/local/layman/desktop-effects /usr/portage/local/layman/gentoo-china /usr/portage/local/layman/sunrise"
SYNC="rsync://mirrors.xmu.edu.cn/gentoo-portage"
USE="16Bit X Xaw3d a52 aac acl acpi aiglx alsa amd64 asf avahi bash-completion beagle berkdb bluray branding browserplugin bzip2 bzr cairo caps cdda cddb cdr chm cjk cleartype cli clutter colord consolekit cracklib crypt cups custom-optimization cxx dbus dconf djvu dmx dri dts dv dvd dvdnav dvdr dvdread emboss evo exif expat faac faad fam fbcon fbcondecor fbsplash ffmpeg fifo flac fontconfig fontforge fortran fts3 fuse g3dvl gconf gdbm gif gimp git glib gmp gnome gnome-keyring gnome-online-accounts gnutls gphoto2 gpm gs gstreamer gtk gtk2 gtk3 gucharmap guile gzip-el hesiod i8x0 iconv icu id3 idle ieee1394 imap introspection iptc ipv6 jadetex java jpeg jpeg2k kerberos kpathsea lame latex lcms ldap libffi libmms libnotify libsamplerate lunar lzo mad midi mmap mmx mng modules mp3 mp4 mpeg msn mudflap multilib mysql natspec nautilus ncurses networkmanager nls nntp nptl nptlonly nsplugin ofx ogg opencl opengl openmp openssl pam pango pcmcia pcre pdf perl pic png policykit poppler ppds pppd pulseaudio python qq qt3support quicktime raw readline samba sdl session snmp socialweb sound spell sqlite sqlite3 srv sse sse2 ssl ssse3 startup-notification subversion svg system-sqlite taglib tcl tcltk tcpd tetex theora threads thumbnail tiff tk toolkit-scroll-bars trayicon truetype udev udisks unicode upower usb v4l v4l2 vaapi vala vdpau vim vim-syntax vim-with-x vmware_guest_windows vorbis vte wav webkit wifi winbind wma wmf wmp wxwidgets x264 xattr xcb xcomposite xft xine xinerama xml xprint xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" 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="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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" FOO2ZJS_DEVICES="hpp1008" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="zh_CN en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="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"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 8 François Bissey 2012-11-19 02:18:20 UTC
Yes -w suppress all warnings which is just annoying. But what should apply in this case is FCLAGS and FFLAGS (which is actually set but I didn't spot it earlier). And for some reason the log shows that they are completely ignored and of course that include the -fPIC flag that have been added.
Shot in the dark what are your useflags for numpy? I re-emerged on my system successfully just now.
Comment 9 François Bissey 2012-11-19 08:19:25 UTC
Actually I notice that both of you have the same {F,FC}FLAGS and that they are quite different from your CFLAGS. Is it a default from portage or do you them defined in you make.conf? I am wondering if the variables are properly injected - if they are not set in the first place.
What is the output of
grep FFLAGS /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
and 
grep FCFLAGS /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
for both of you please.
Comment 10 Maciej Piechotka 2012-11-19 08:48:43 UTC
(In reply to comment #9)
> Actually I notice that both of you have the same {F,FC}FLAGS and that they
> are quite different from your CFLAGS. Is it a default from portage or do you
> them defined in you make.conf? I am wondering if the variables are properly
> injected - if they are not set in the first place.
> What is the output of
> grep FFLAGS /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
> and 
> grep FCFLAGS /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
> for both of you please.

I didn't have F{,C}FLAGS set up at all in make.conf so it is default

Regardless of it's presence:
# grep -P 'FC?FLAGS' /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
declare -x FCFLAGS=""
declare -x FFLAGS=""
    export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@");
    export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@");
    export FFLAGS=$(test-flags-F77 ${FFLAGS});
    export FCFLAGS=$(test-flags-FC ${FCFLAGS})

(In reply to comment #8)
> Yes -w suppress all warnings which is just annoying. But what should apply
> in this case is FCLAGS and FFLAGS (which is actually set but I didn't spot
> it earlier). And for some reason the log shows that they are completely
> ignored and of course that include the -fPIC flag that have been added.
> Shot in the dark what are your useflags for numpy? I re-emerged on my system
> successfully just now.

[ebuild   R    ] dev-python/numpy-1.6.2  USE="-doc -lapack {-test}" 2,525 kB
[ebuild  N     ] sci-libs/scipy-0.11.0  USE="-doc {-test} -umfpack" 0 kB
Comment 11 François Bissey 2012-11-19 09:09:22 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Actually I notice that both of you have the same {F,FC}FLAGS and that they
> > are quite different from your CFLAGS. Is it a default from portage or do you
> > them defined in you make.conf? I am wondering if the variables are properly
> > injected - if they are not set in the first place.
> > What is the output of
> > grep FFLAGS /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
> > and 
> > grep FCFLAGS /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
> > for both of you please.
> 
> I didn't have F{,C}FLAGS set up at all in make.conf so it is default
> 
> Regardless of it's presence:
> # grep -P 'FC?FLAGS' /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
> declare -x FCFLAGS=""
> declare -x FFLAGS=""
>     export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@");
>     export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@");
>     export FFLAGS=$(test-flags-F77 ${FFLAGS});
>     export FCFLAGS=$(test-flags-FC ${FCFLAGS})
> 
OK I think my latter suspicion is correct because F{,C}FLAGS is not defined it is not injected properly. On my system I get
grep -P 'FC?FLAGS' /scratch/portage/sci-libs/scipy-0.11.0/temp/environment 
declare -x FCFLAGS="-O1 -march=native -pipe -ggdb -fPIC"
declare -x FFLAGS="-O1 -march=native -pipe -ggdb -fPIC"
    export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@");
    export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@");
    export FFLAGS=$(test-flags-F77 ${FFLAGS});
    export FCFLAGS=$(test-flags-FC ${FCFLAGS})

I recomend you set F{,C}FLAGS to something minimal and sane and try again. I think we now have an error on the injection behavior if the Fortran flags are empty. We may have to set some minimal flags in the ebuild proper.
Comment 12 Maciej Piechotka 2012-11-19 09:13:27 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > Actually I notice that both of you have the same {F,FC}FLAGS and that they
> > > are quite different from your CFLAGS. Is it a default from portage or do you
> > > them defined in you make.conf? I am wondering if the variables are properly
> > > injected - if they are not set in the first place.
> > > What is the output of
> > > grep FFLAGS /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
> > > and 
> > > grep FCFLAGS /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
> > > for both of you please.
> > 
> > I didn't have F{,C}FLAGS set up at all in make.conf so it is default
> > 
> > Regardless of it's presence:
> > # grep -P 'FC?FLAGS' /var/tmp/portage/sci-libs/scipy-0.11.0/temp/environment
> > declare -x FCFLAGS=""
> > declare -x FFLAGS=""
> >     export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@");
> >     export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@");
> >     export FFLAGS=$(test-flags-F77 ${FFLAGS});
> >     export FCFLAGS=$(test-flags-FC ${FCFLAGS})
> > 
> OK I think my latter suspicion is correct because F{,C}FLAGS is not defined
> it is not injected properly. On my system I get
> grep -P 'FC?FLAGS' /scratch/portage/sci-libs/scipy-0.11.0/temp/environment 
> declare -x FCFLAGS="-O1 -march=native -pipe -ggdb -fPIC"
> declare -x FFLAGS="-O1 -march=native -pipe -ggdb -fPIC"
>     export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@");
>     export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@");
>     export FFLAGS=$(test-flags-F77 ${FFLAGS});
>     export FCFLAGS=$(test-flags-FC ${FCFLAGS})
> 
> I recomend you set F{,C}FLAGS to something minimal and sane and try again. I
> think we now have an error on the injection behavior if the Fortran flags
> are empty. We may have to set some minimal flags in the ebuild proper.

You misunderstood me - I have set the F{,C}FLAGS to "-O2 -march=native -pipe -ggdb -w -Wa,--compress-debug-sections" and it still failed/have this output.
Comment 13 François Bissey 2012-11-19 09:20:29 UTC
Sorry about the misunderstanding. So clearly the fortran flags are not passed to the environment. So let's just try my earlier hunch about numpy, I see you have numpy[-lapack] I am wondering if that affect compiler settings stored by numpy's distutils. Can you do me a favor and rebuild numpy with lapack enabled and see if that still occurs.
My guess is that it won't have any impact but we never know.
Comment 14 Maciej Piechotka 2012-11-19 09:40:26 UTC
(In reply to comment #13)
> Sorry about the misunderstanding. So clearly the fortran flags are not
> passed to the environment. So let's just try my earlier hunch about numpy, I
> see you have numpy[-lapack] I am wondering if that affect compiler settings
> stored by numpy's distutils. Can you do me a favor and rebuild numpy with
> lapack enabled and see if that still occurs.
> My guess is that it won't have any impact but we never know.

No, it hasn't helped.
Comment 15 François Bissey 2012-11-19 09:55:12 UTC
I am afraid that I have run out of ideas at this stage. The symptome is clearly identified but not the disease yet.
Of course there is the issue of why we are letting scipy use its own fftpack rather than using (an optimized) fftw3...
Comment 16 Steven Trogdon 2012-11-29 18:01:17 UTC
Is it possible that this issue is a flag-o-matic.eclass bug? Here if I revert flag-o-matic back to v 1.181 then scipy builds. v 1.181 is the most recent version that works here.
Comment 17 Justin Lecher (RETIRED) gentoo-dev 2012-11-29 18:23:20 UTC
okay guys, I also saw problems with the flag-o-matic.eclass. let me take a look.
Comment 18 François Bissey 2012-11-29 20:47:32 UTC
(In reply to comment #16)
> Is it possible that this issue is a flag-o-matic.eclass bug? Here if I
> revert flag-o-matic back to v 1.181 then scipy builds. v 1.181 is the most
> recent version that works here.

Indeed while I reported earlier that I could rebuild without problem I now cannot with v1.183 of the eclass.
Comment 19 Steven Trogdon 2012-11-29 22:07:47 UTC
(In reply to comment #17)
> okay guys, I also saw problems with the flag-o-matic.eclass. let me take a
> look.

I don't see that gfortran (4.5.4) supports the "-x language" option, although it doesn't complain with -xc and -xc++. But it certainly doesn't like -xf77 and -xf95. In both cases one gets

# gfortran -fPIC -c -o /dev/null -xf77 /dev/null
Error: Can't open file '/dev/null'
<built-in>:0:0: fatal error: can't open input file: /dev/null
compilation terminated.
# echo $?
1
Comment 20 Justin Lecher (RETIRED) gentoo-dev 2012-11-29 22:12:51 UTC
$ x86_64-pc-linux-gnu-gcc-4.6.3 -fPIC -c -o /dev/null -xf77 /dev/null && echo foo
Error: Can't open file '/dev/null'
<built-in>:0:0: fatal error: can't open input file: /dev/null
compilation terminated.

$ x86_64-pc-linux-gnu-gcc-4.7.2 -fPIC -c -o /dev/null -xf77 /dev/null && echo foo
foo
Comment 22 Justin Lecher (RETIRED) gentoo-dev 2012-11-30 09:41:56 UTC
Now the check is broken.

$ x86_64-pc-linux-gnu-gcc-4.4.7 -asd -c -o /dev/null -xf95 - </dev/null && echo foo
x86_64-pc-linux-gnu-gcc-4.4.7: unrecognized option '-asd'
Warning: Reading file '<stdin>' as free form
foo


it returns success for -asd
Comment 23 Daniel Maslowski 2012-12-01 01:59:50 UTC
Thank you everyone for participating. We have also discussed the issue in the forums and I posted a short guide on a temporary workaround. If you wish to see:
http://forums.gentoo.org/viewtopic.php?p=7194566

Cheers!
Comment 24 Justin Lecher (RETIRED) gentoo-dev 2014-05-19 13:23:00 UTC
Seems to work now. PLease reopen if still exists.