Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 310709 - sci-libs/gdal-1.6.3-r1 fails to emerge with openmpi
Summary: sci-libs/gdal-1.6.3-r1 fails to emerge with openmpi
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-22 14:29 UTC by Juergen Rose
Modified: 2012-05-26 09:29 UTC (History)
2 users (show)

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


Attachments
/var/tmp/portage/sci-libs/gdal-1.6.3-r1/temp/build.log (build.log,430.47 KB, text/plain)
2010-03-22 14:32 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2010-03-22 14:29:16 UTC
'emerge -vD1 gdal' fails with:
...
x86_64-pc-linux-gnu-g++ -Wl,-O1 gdalinfo.o  -L/var/tmp/portage/sci-libs/gdal-1.6.3-r1/work/gdal-1.6.3 -lgdal  -L/usr/lib64 -lgeos_c -L=/usr/lib -lsqlite3 -lodbc -lodbcinst -L/usr/lib -lexpat -L/usr/lib -lxerces-c -lpthread -ljasper -lhdf5 -L/usr/lib64 -L/usr/lib64/lib -logdi31 -ljpeg -lgeotiff -ltiff -lpng -lnetcdf -lcfitsio -lpq -L/usr/lib64/postgresql-8.4/lib64 -lpq -lz -lpthread -lm -lrt -ldl    -lcurl   -Wl,-O1 -rdynamic -L/usr/lib64/mysql -lmysqlclient -L/usr//lib -lz -lcrypt -lnsl -lm -o gdalinfo
/var/tmp/portage/sci-libs/gdal-1.6.3-r1/work/gdal-1.6.3/libgdal.so: undefined reference to `ompi_mpi_cxx_op_intercept'
/var/tmp/portage/sci-libs/gdal-1.6.3-r1/work/gdal-1.6.3/libgdal.so: undefined reference to `MPI::Datatype::Free()'
/var/tmp/portage/sci-libs/gdal-1.6.3-r1/work/gdal-1.6.3/libgdal.so: undefined reference to `MPI::Comm::Comm()'
/var/tmp/portage/sci-libs/gdal-1.6.3-r1/work/gdal-1.6.3/libgdal.so: undefined reference to `MPI::Win::Free()'
collect2: ld returned 1 exit status


Reproducible: Always




root@lynx:/root(9)# emerge --info =sci-libs/gdal-1.6.3-r1
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11-r1, 2.6.34-rc2 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.34-rc2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8300_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 22 Mar 2010 13:30:01 +0000
app-shells/bash:     4.1_p2
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.7.9-r2, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/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=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
FFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1"
LINGUAS="de fr"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/dotnet /var/lib/layman/lordvan /var/lib/layman/n4g /var/lib/layman/science /var/lib/layman/suka /var/lib/layman/x11 /var/lib/layman/zugaina /var/lib/layman/java-overlay /var/lib/layman/sunrise /var/lib/layman/arcon /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit X Xaw3d a52 aac abiword acl acpi administrator afs alsa amd64 ao aotuv apache2 applet archive arpack asf aspell assistant atlas audacious audiofile automap automount bash-completion beagle berkdb blas blast bluetooth boo boost branding bzip2 c++ cairo cardbus cdda cddb cdf cdio cdparanoia cdr cg cgi chm cli consolekit corba cracklib crypt css cuda cups curl cxx daap db dbase dbi dbm dbus designer devhelp device-mapper dga dia djvu doc dri ds2490 dts dv dvb dvd dvdr dvi eds elf emacs emboss empathy encode epiphany evo examples exif expat extensions extra extras fam fame ffmpeg fftw firefox fits flac fltk foomaticdb fortran fpx fts3 fuse galago garmin gd gdal gdbm geolocation geos gif gimp ginac git glade glib glitz gml gmp gmtsuppl gnokii gnome gnome-keyring gnome-print gnuplot gnutls gphoto2 gpm grammar graphics graphtft graphviz grass gs gsl gsm gstreamer gtk guile hal harness hddtemp hdf hdf5 hdri hlapi http httpd hvm iconv icq icu id3 ide imagemagick imap innodb inotify ipod ipv6 irda ithreads jabber jadetex java java5 java6 jbig john jpeg jpeg2k kde kdrive kerberos kexi kpathsea kqemu kvm ladspa lame lapack laptop latex latex3 lcms ldap lensfun libffi libgda libnotify libsamplerate lirc lua lzo mad mail maildir mailwrapper mapnik math matroska mikmod mkl mmx mmxext mng modules mono moonlight motif mozdevelop mozilla mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numarray numeric nvidia obex objc ocaml octave odbc ogdi ogg ole openexr opengl openmp overview pae pam pcre pda pdf perl plotutils plugins png podcast policykit posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio pymol python python-bindings qemu qhull qt3support qt4 quicktime readline reflection reiserfs rle romio rpc rrdcgi rrdtool samba sasl science sdl secure-delete semantic-desktop server session sip slang slp smbclient smp sms sndfile snmp soup sox speex spell spl sql sqlite sse sse2 ssl startup-notification stlport subtitles subversion suexec svg swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs theora thinkpad threads thunar thunderbird tidy tiff tk tntc tools truetype udev unicode usb userlocales utempter v4l2 virtualbox vorbis wav webdav webdav-serf webkit wifi wmf wxwidgets x264 xattr xcb xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc zlib zvbi" ALSA_CARDS="intel8x0" 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="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" DVB_CARDS="usb-wt220u" ELIBC="glibc" INPUT_DEVICES="keyboard mouse                evdev                synaptics               " KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler ruby websvccommon xml" QEMU_SOFTMMU_TARGETS="i386 ppc ppc64 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18 jruby" USERLAND="GNU" VIDEO_CARDS="nv nvidia nouveau vesa" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

root@lynx:/root(10)# emerge -pqv =sci-libs/gdal-1.6.3-r1
[ebuild     U ] sci-libs/gdal-1.6.3-r1 [1.6.2] USE="curl doc fits geos gif gml hdf5 jpeg jpeg2k mysql netcdf odbc ogdi perl png postgres python sqlite threads -debug -ecwj2k -hdf -ruby"
Comment 1 Juergen Rose 2010-03-22 14:32:43 UTC
Created attachment 224677 [details]
/var/tmp/portage/sci-libs/gdal-1.6.3-r1/temp/build.log
Comment 2 Juergen Rose 2010-03-22 14:50:33 UTC
Adding 
use hdf5 && has_version sci-libs/hdf5[mpi] && export CC=mpicc CXX=mpicxx
as first line of pkg_setup() solves the problem for me. The same problem occurs earlier with gdal-1.6.?. It would be good if the patch could go into the tree.
Comment 3 Steve Arnold archtester gentoo-dev 2010-04-03 16:00:18 UTC
gdal is not broken; as shown in Bug# 302621 comment #10, the openmpi Fortran 90 library is broken, which implies several possible work-arounds, depending on your requirements:

1) unmerge openmpi and install mpich2

2) get the openmpi maintainers to fix their broken libmpi_f90

3) disable f90 support and rebuild openmpi

The first two provide complete functionality, while the 3rd one is a little less optimal since you would lose f90 mpi support.  What I don't see as an acceptable work-around is to patch several packages with questionable kluges just to avoid fixing a broken library.  I just don't see why the "kluge several non-broken packages" approach is preferable to making a single fix.
Comment 4 Juergen Rose 2010-04-12 10:18:46 UTC
Hi Steve,

I had installed mpich2 in the past, but then the installation of openmpi was required by boost-1.42, octave(?) or octave-forge(?). And mpich2 and openmpi blocks each other. I got the recommendation to remove the old mpich2  and install the new openmpi, see also Bug 305005. So I did not know, if solution 1 of Comment #3 is very good for me. Nevertheless I tried. I removed openmpi. Emerged again mpich2. Did 'lafilefixer --justfixit', reemerged all mpi dependent packages:
for p in `equery -qC hasuse mpi`; do emerge -v1 =$p; if [ $? != 0 ]; then exit 1; fi; done

Then I tried to repair broken library dependencies with revdep-rebuild, which fails, because boost-1.39.0 depends on openmpi. I erase boost-1.39.0 and boost-build-1.39.0, and tried again revdep-rebuild:

 * All prepared. Starting rebuild
emerge --oneshot   dev-java/hdf-java:0
dev-lang/gdl:0
media-gfx/hugin:0
sci-geosciences/mapnik:0
sci-libs/netcdf:0
sci-visualization/paraview:0
..........
Calculating dependencies... done!
[ebuild  NS   ] dev-util/boost-build-1.39.0 [1.42.0] USE="examples python" 
[ebuild   R   ] sci-libs/netcdf-4.0.1-r1 
[ebuild   R   ] media-gfx/hugin-2010.0.0 
[ebuild   R   ] dev-java/hdf-java-2.6.1 
[ebuild   R   ] dev-lang/gdl-0.9_rc4 
[ebuild  N    ] sys-cluster/openmpi-1.4.1  USE="cxx fortran ipv6 romio threads -debug -heterogeneous -infiniband -mpi-threads -pbs -vt" 
[ebuild  NS   ] dev-libs/boost-1.39.0 [1.42.0] USE="doc eselect expat icu mpi python tools -debug -test" 
[ebuild   R   ] sci-visualization/paraview-3.6.2 
[ebuild     U ] sci-geosciences/mapnik-0.6.1-r3 [0.6.1-r2]
[blocks B     ] sys-cluster/openmpi ("sys-cluster/openmpi" is blocking sys-cluster/mpich2-1.2.1_p1)
[blocks B     ] sys-cluster/mpich2 ("sys-cluster/mpich2" is blocking sys-cluster/openmpi-1.4.1)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  ('installed', '/', 'sys-cluster/mpich2-1.2.1_p1', 'nomerge') pulled in by
    sys-cluster/mpich2 required by world

  ('ebuild', '/', 'sys-cluster/openmpi-1.4.1', 'merge') pulled in by
    sys-cluster/openmpi required by ('ebuild', '/', 'sci-visualization/paraview-3.6.2', 'merge')
    >=sys-cluster/openmpi-1.2.9[cxx] required by ('ebuild', '/', 'dev-libs/boost-1.39.0', 'merge')


It looks for me, if mapnik requires boost-1.39.0, which requires openmpi, which is blocked by mpich2. So solution 1 of comment #3 seems not to work for me.

I suppose that solution 2 of comment #3 also not works for me, because my influence of openmpi developer is not large enough.

With solution 3 of comment #3 I have the problem, that there is no f90 flag of openmpi, so I don't know how to disable f90 support in openmpi:

root@orca:/root(47)# emerge -pvD openmpi

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] sys-cluster/openmpi-1.4.1  USE="cxx fortran ipv6 romio threads -debug -heterogeneous -infiniband -mpi-threads -pbs -vt" 0 kB [1]

So for me remains only the solution to patch privately every version of gdal with:

use hdf5 && has_version sci-libs/hdf5[mpi] && export CC=mpicc CXX=mpicxx
as first line of pkg_setup()

Regards Juergen
Comment 5 Juergen Rose 2011-07-27 08:38:01 UTC
More than year later I get the same issue with sci-libs/gdal-1.8.1 and sys-cluster/openmpi-1.5.3-r2 I still get the same error. 'emerge gdal' fails with:

x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -fPIC  -Wall -Wdeclaration-after-statement  -I/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/port -I/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/gcore -I/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/alg -I/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/ogr -I/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/ogr/ogrsf_frmts -I/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/frmts -DOGR_ENABLED -I/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/port -Iexternal/include -I/usr/ -I/usr//include  -c -o gdalinfo.o gdalinfo.c
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed gdalinfo.o  -L/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1 -lgdal  -lpoppler -L/usr/lib64 -lgeos_c -L/usr/lib -lsqlite3 -lodbc -lodbcinst -lexpat -ljasper -lhdf5 -L/usr -L/usr/lib -logdi -lgif -ljpeg -Lexternal/lib -lgeotiff -Lexternal/lib -ltiff -lpng -lnetcdf -lcfitsio -L/usr/lib64/postgresql-9.0/lib64 -lpq -lz -L/usr/ -L/usr//lib -lpthread -lm -lrt -ldl    -lcurl -lgcrypt -lldap -lrt -L/usr/lib64 -march=native -O2 -pipe -g0 -Wno-system-headers -Wl,-O1 -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl -lz -lgnutls        -Wl,-O1 -Wl,--as-needed -L/usr/lib64 -lmysqlclient -L/usr//lib64 -lz -lcrypt -lnsl -lm -L/usr/lib64/ -lssl -lcrypto -o gdalinfo
/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/libgdal.so: undefined reference to `ompi_mpi_cxx_op_intercept'
/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/libgdal.so: undefined reference to `MPI::Datatype::Free()'
/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/libgdal.so: undefined reference to `MPI::Comm::Comm()'
/var/tmp/portage/sci-libs/gdal-1.8.1/work/gdal-1.8.1/libgdal.so: undefined reference to `MPI::Win::Free()'


I solve this issue since one year by patching every version of new gdal ebuild by inserting:

  use hdf5 && has_version sci-libs/hdf5[mpi] && export CC=mpicc CXX=mpicxx

into pkg_setup()

If the reason is, as Steve emphasized in Comment 3, the broken libmpi_f90, how can we convince the openmpi maintainers to fix their libraries?
Comment 6 Juergen Rose 2012-05-26 09:29:20 UTC
And again almost one year later now with gdal-1.9.1 and openmpi-1.5.5 I get the same error:

x86_64-pc-linux-gnu-gcc -march=amdfam10 -O2 -pipe -fPIC  -Wall -Wdeclaration-after-statement  -I/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/port -I/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/gcore -I/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/alg -I/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/ogr -I/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/ogr/ogrsf_frmts -I/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/frmts -DOGR_ENABLED -I/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/port -I/usr/include -Iexternal/include -I/usr/ -I/usr//include  -c -o gdalinfo.o gdalinfo.c
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed gdalinfo.o  -L/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1 -lgdal  -lpoppler -L/usr/lib64 -lgeos_c -L/usr/lib -lsqlite3 -lodbc -lodbcinst -lexpat -lxerces-c -lpthread -ljasper -L/usr/lib -lnetcdf -lhdf5 -L/usr -L/usr/lib -logdi -lgif -ljpeg -Lexternal/lib -lgeotiff -Lexternal/lib -ltiff -lpng -lcfitsio -L/usr/lib64/postgresql-9.1/lib64 -lpq -lz -L/usr/ -L/usr//lib -lpthread -lm -lrt -ldl    -lcurl -lldap -lrt -L/usr/lib64 -Wl,-O1 -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lz -lssl3 -lsmime3 -lnssutil3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl           -Wl,-O1 -Wl,--as-needed -L/usr/lib64/mysql -lmysqlclient -L/usr//lib64 -lz -lcrypt -lnsl -lm -L/usr/lib64/ -lssl -lcrypto -o gdalinfo
/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/libgdal.so: undefined reference to `ompi_mpi_cxx_op_intercept'
/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/libgdal.so: undefined reference to `MPI::Win::Free()'
/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/libgdal.so: undefined reference to `MPI::Datatype::Free()'
/var/tmp/portage/sci-libs/gdal-1.9.1/work/gdal-1.9.1/libgdal.so: undefined reference to `MPI::Comm::Comm()'

And again as before inserting a line:

  use hdf5 && has_version sci-libs/hdf5[mpi] && export CC=mpicc CXX=mpicxx

at the begin pkg_setup() solved the issue.