Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 514288 - dev-python/mpi4py-1.3.1 fails to build
Summary: dev-python/mpi4py-1.3.1 fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-21 23:18 UTC by Patrick Lauer
Modified: 2014-08-11 16:14 UTC (History)
5 users (show)

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


Attachments
A patch to enable building mpi4py (mpi4py-1.3.1-ldshared-bug.patch,617 bytes, patch)
2014-07-30 01:54 UTC, Casey Webster
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2014-06-21 23:18:23 UTC
checking for function 'MPI_Type_create_f90_complex' ...
/usr/bin/mpicc -fPIC -Wno-unused-result -DNDEBUG -O2 -pipe -I/usr/include/python3.3 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -O2 -pipe -O2 -pipe -Wl,-O1 -Wl,--as-needed _configtest.o -L/var/tmp/portage/dev-python/mpi4py-1.3.1/work/mpi4py-1.3.1-python3_3/build/temp.linux-x86_64-3.3 -o _configtest
/usr/bin/mpicc -O2 -pipe -O2 -pipe -Wl,-O1 -Wl,--as-needed _configtest.o -L/var/tmp/portage/dev-python/mpi4py-1.3.1/work/mpi4py-1.3.1-python3_2/build/temp.linux-x86_64-3.2 -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
building 'mpi4py.MPI' extension
/usr/bin/mpicc -fPIC -DNDEBUG -O2 -pipe -I/usr/include/python3.2 -c src/MPI.c -o /var/tmp/portage/dev-python/mpi4py-1.3.1/work/mpi4py-1.3.1-python3_2/build/temp.linux-x86_64-3.2/src/MPI.o
success!
removing: _configtest.c _configtest.o _configtest
building 'mpi4py.MPI' extension
/usr/bin/mpicc -fPIC -Wno-unused-result -DNDEBUG -O2 -pipe -I/usr/include/python3.3 -c src/MPI.c -o /var/tmp/portage/dev-python/mpi4py-1.3.1/work/mpi4py-1.3.1-python3_3/build/temp.linux-x86_64-3.3/src/MPI.o
In file included from src/MPI.c:3:0:
src/mpi4py.MPI.c: In function 'initMPI':
src/mpi4py.MPI.c:107349:3: warning: 'ompi_mpi_ub' is deprecated (declared at /usr/include/mpi.h:910): MPI_UB is deprecated in MPI-2.0 [-Wdeprecated-declarations]
   __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UB)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ^
src/mpi4py.MPI.c:107364:3: warning: 'ompi_mpi_lb' is deprecated (declared at /usr/include/mpi.h:909): MPI_LB is deprecated in MPI-2.0 [-Wdeprecated-declarations]
   __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LB)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ^
In file included from src/MPI.c:3:0:
src/mpi4py.MPI.c: In function 'PyInit_MPI':
src/mpi4py.MPI.c:107349:3: warning: 'ompi_mpi_ub' is deprecated (declared at /usr/include/mpi.h:910): MPI_UB is deprecated in MPI-2.0 [-Wdeprecated-declarations]
   __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UB)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ^
src/mpi4py.MPI.c:107364:3: warning: 'ompi_mpi_lb' is deprecated (declared at /usr/include/mpi.h:909): MPI_LB is deprecated in MPI-2.0 [-Wdeprecated-declarations]
   __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LB)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ^
In file included from src/MPI.c:3:0:
src/mpi4py.MPI.c: In function 'PyInit_MPI':
src/mpi4py.MPI.c:107349:3: warning: 'ompi_mpi_ub' is deprecated (declared at /usr/include/mpi.h:910): MPI_UB is deprecated in MPI-2.0 [-Wdeprecated-declarations]
   __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UB)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ^
src/mpi4py.MPI.c:107364:3: warning: 'ompi_mpi_lb' is deprecated (declared at /usr/include/mpi.h:909): MPI_LB is deprecated in MPI-2.0 [-Wdeprecated-declarations]
   __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LB)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ^
/usr/bin/mpicc x86_64-pc-linux-gnu-gcc -shared -O2 -pipe -O2 -pipe -Wl,-O1 -Wl,--as-needed /var/tmp/portage/dev-python/mpi4py-1.3.1/work/mpi4py-1.3.1-python3_2/build/temp.linux-x86_64-3.2/src/MPI.o -L/var/tmp/portage/dev-python/mpi4py-1.3.1/work/mpi4py-1.3.1-python3_2/bu
ild/temp.linux-x86_64-3.2 -lpython3.2 -o /var/tmp/portage/dev-python/mpi4py-1.3.1/work/mpi4py-1.3.1-python3_2/build/lib/mpi4py/MPI.cpython-32.so
x86_64-pc-linux-gnu-gcc: error: x86_64-pc-linux-gnu-gcc: No such file or directory
error: command '/usr/bin/mpicc' failed with exit status 1
 * ERROR: dev-python/mpi4py-1.3.1::gentoo failed (compile phase):
 *   (no error message)

Portage 2.2.10 (default/linux/amd64/13.0, gcc-4.9.0, glibc-2.19-r1, 3.7.10-gentoo x86_64)
=================================================================
System uname: Linux-3.7.10-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E31275_@_3.40GHz-with-gentoo-2.2
KiB Mem:    32800928 total,   3660856 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Sat, 21 Jun 2014 20:00:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p47
dev-lang/python:          2.7.6-r1, 3.2.5-r4, 3.3.5, 3.4.0
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.9.0
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.15 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo
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/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"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 4"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync parallel-fetch preserve-libs protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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=""
USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx modules multilib ncurses nls nptl openmp pam pcre readline session sse sse2 ssl tcpd unicode 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_2 python3_3 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2014-07-04 11:17:32 UTC
I replicate this error but don't have a solution
Comment 2 Ben Kohler gentoo-dev 2014-07-11 14:02:22 UTC
Seems to be broken by this change: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?r1=1.96&r2=1.97

conf/mpidistutils.py sets "ld_so  = ld  + ' ' + ldshared", is it a bug that mpi4py appends ld & ldshared, or is it a bug that ldshared contains an extra $CC?
Comment 3 Casey Webster 2014-07-29 21:02:33 UTC
This also fails to build for me, same issue as the other reports.  The offending compile lines that fail are all invocations of "mpicc" of the form:

mpicc x86_64-pc-linux-gnu-gcc ... 

Building mpi4py manually using the tarball in /usr/portage/distfiles works normally.  It is only the build through portage that is failing due to this issue.

Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde/systemd, gcc-4.8.3, glibc-2.17, 3.12.13-gentoo-convect-systemd x86_64)
=================================================================
System uname: Linux-3.12.13-gentoo-convect-systemd-x86_64-Intel-R-_Core-TM-_i7_CPU_X_990_@_3.47GHz-with-gentoo-2.2
KiB Mem:    24683904 total,   1772164 free
KiB Swap:    4194236 total,   4150460 free
Timestamp of tree: Tue, 29 Jul 2014 05: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.6, 3.2.5-r3, 3.3.3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
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.4, 4.8.3
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.13 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo my_local_overlay qt kde
Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA DOOM3 dlj-1.1 google-talkplugin Oracle-BCLA-JavaSE AdobeFlash-10.3"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -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 userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.cs.wmich.edu/gentoo http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -march=native -O2 -pipe"
MAKEOPTS="-j12"
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="/usr/local/portage /var/lib/layman/qt /var/lib/layman/kde"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 avahi berkdb branding bzip2 cairo cdda cdr cli cracklib crypt cups curl cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg fftw firefox flac fortran gd gdbm gif gimp gnuplot gpm graphviz gsl gtk hdf hdf5 iconv icu imagemagick imap ipv6 ithreads jabber jpeg jpeg2k kde kipi lapack latex lcms ldap libnotify lm_sensors mad mmx mng modules mp3 mp4 mpeg multilib ncurses netcdf nls nptl ogg opengl openmp pam pango pcre pdf perl phonon php plasma plotutils png policykit posix ppds pulseaudio python qt3support qt4 raw readline romio sdl semantic-desktop session smp sockets sound spell sse sse2 sse3 ssl startup-notification subversion svg systemd szip tcpd threads tiff truetype udev udisks unicode upower usb vnc vorbis wxwidgets x264 xcb xcomposite xft xinerama xml xscreensaver 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" DRACUT_MODULES="systemd lvm mdraid" 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" LINGUAS="en_US en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" RUBY_TARGETS="ruby19 ruby20" 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.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Casey Webster 2014-07-30 01:54:52 UTC
Created attachment 381860 [details, diff]
A patch to enable building mpi4py

This patch merely comments out the line 
ldshared   = environ.get('LDSHARED', ldshared)
in the file conf/mpidistutils.py.  Befoer this line, ldshared = "-shared" and after this line ldshared = "x86_64-pc-linux-gnu-gcc -shared".  It seems like a bug to load LDSHARED here, as this is done earlier in line 117 and processed to split "x86_64-pc-linux-gnu-gcc -shared" and just keep "-shared" in ldshared.  With this patch applied, mpi4py builds and installs.
Comment 5 Christoph Junghans (RETIRED) gentoo-dev 2014-08-11 16:14:34 UTC
This patch will break Darwin and AIX.

Use the idea to create similar patch.

+  11 Aug 2014; Christoph Junghans <ottxor@gentoo.org>
+  +files/mpi4py-1.3.1-ldshared.patch, mpi4py-1.3.1.ebuild:
+  fix usage of ldshared (bug #514288)
+