Bug 182904 - sci-mathematics/octave-2.1.73 compile broken with MPICH2 because mpiCC does not exist
Bug#: 182904 Product:  Gentoo Linux Version: unspecified Platform: AMD64
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: sci-mathematics@gentoo.org Reported By: adshea@gmail.com
Component: Applications
URL: 
Summary: sci-mathematics/octave-2.1.73 compile broken with MPICH2 because mpiCC does not exist
Keywords:  
Status Whiteboard: 
Opened: 2007-06-22 16:28 0000
Description:   Opened: 2007-06-22 16:28 0000
When compiling octave, it attempts to use mpiCC as a C++ compiler.  The mpich2
ebuild doesn't create this file, instead it has mpicxx.

Reproducible: Always

Steps to Reproduce:
1. emerge mpich2
2. emerge octave with USE="mpi"
3. See the error

Actual Results:  
mpiCC -c  -fPIC -I. -I../.. -I../../liboctave -I../../src -I../../libcruft/misc
 -DHAVE_CONFIG_H   -O2 -pipe -march=athlon64 f77-extern.cc -o pic/f77-extern.o
make[3]: mpiCC: Command not found
make[3]: *** [pic/f77-extern.o] Error 127
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory
`/var/tmp/portage/sci-mathematics/octave-2.1.73/work/octave-2.1.73/libcruft/misc'
make[2]: *** [misc] Error 2
make[2]: Leaving directory
`/var/tmp/portage/sci-mathematics/octave-2.1.73/work/octave-2.1.73/libcruft'
make[1]: *** [libcruft] Error 2
make[1]: Leaving directory
`/var/tmp/portage/sci-mathematics/octave-2.1.73/work/octave-2.1.73'
make: *** [all] Error 2

!!! ERROR: sci-mathematics/octave-2.1.73 failed.
Call stack:
  ebuild.sh, line 1615:   Called dyn_compile
  ebuild.sh, line 972:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  octave-2.1.73.ebuild, line 77:   Called die


Expected Results:  
Octave should have used detected and used mpicxx instead of mpiCC.  Or mpich2
should have made a link to mpiCC in it's install.

Portage 2.1.2.7 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.5-r3,
2.6.20-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.20-gentoo-r8 x86_64 AMD Processor model unknown
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 21 Jun 2007 16:30:01 +0000
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo
/etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/
http://gentoo.chem.wisc.edu/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo
http://gentoo.cites.uiuc.edu/pub/gentoo/
http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise
/usr/portage/local/layman/science /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac aalib acl acpi alsa amd64 avahi bash-completion berkdb bitmap-fonts
bzip2 cdr cli cracklib crypt cscope cups curl dbus dri dts dvd dvdr dvi flac
fortran gdbm gif glitz gnutls gpm gtk hal iconv imap ipv6 isdnlog jpeg libg++
midi mmx mng mp3 mpeg mpi mudflap ncurses nptl nptlonly nsplugin numeric nvidia
offensive ogg opengl openmp pam pcmcia pcre pdf perl png ppds pppd python
readline reflection session spl sse sse2 ssl startup-notification svg tcl tcltk
tcpd tetex theora tiff tk truetype truetype-fonts type1-fonts unicode
vim-syntax vorbis wmf xinerama xorg xvid zeroconf 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 mulaw multi null plug rate route
share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses
text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

This can be fixed by making a simlink from /usr/bin/mpicxx to /usr/bin/mpiCC

However, both mpich2 and octave are stable versions

sys-cluster/mpich2-1.0.3 USE="crypt cxx -debug -doc mpe -threads"

sci-mathematics/octave-2.1.73 USE="blas hdf5 mpi readline zlib -debug -doc
-emacs -static"

------- Comment #1 From Markus Dittrich 2007-06-23 12:00:48 0000 -------
Hi Adam,

Thanks for the note and you are correct! It is probably even worse
than that because other mpi implementations in virtual/mpi might
use yet another name for their C/C++ wrapper. 
The upcoming octave-2.9.12 has dropped mpi support so the "mpi"
useflag will be phased out soon. I'll see if I can cover mpich/mpich2/lammpi
without too much effort.

Thanks,
Markus

------- Comment #2 From David Radice 2007-08-29 19:07:47 0000 -------
Created an attachment (id=129573) [details]
A possible correction of the ebuild

I just set CXX=mpicxx instead of mpiCC for the mpich2 case.

------- Comment #3 From David Radice 2007-09-28 15:49:03 0000 -------
Created an attachment (id=132096) [details]
This will make octave buildi with mpich2.

Almost the same patch as above, but in an unified format (I think that the
previous is almost unusable sorry).

------- Comment #4 From Steve Arnold 2007-12-24 19:41:51 0000 -------
Since hdf5 already checks for the mpich2 c++ interface because of compatibility
issues, it sounds like octave should do the same if USE=mpi is enabled.  That
should take care of this issue, and personally I'd rather see the mpi support
stay, even if its only C and Fortran.  Unless upstream is dropping it
completely...

------- Comment #5 From Steve Arnold 2007-12-25 01:52:20 0000 -------
As stated in bug #202304, the real issue is the header changes induced by the
MPI C++ include stuff, so even if you point to the correct mpi wrapper script,
it ultimately fails with the error in the above bug.  Since upstream doesn't
seem too interested in dealing with it, I went ahead and "fixed" the octave
1.73 ebuilds so they at least build correctly as long as mpich2 is *not* built
with the cxx USE flag.