reassign 686926 src:hdf5 1.8.8-9
retitle 686926 hdf5: Skip the inclusion of the C++ API
tags 686926 upstream patch
thanks

* Mike Miller <mtmil...@ieee.org> [2012-09-07 09:11]:

> On Fri, Sep 7, 2012 at 8:51 AM, Sébastien Villemot wrote:
> > Mike Miller <mtmil...@ieee.org> writes:
> >
> >> On Fri, Sep 7, 2012 at 4:50 AM, Sébastien Villemot wrote:
> >>> Note that this problem is only present with libhdf5-openmpi-dev: it is not
> >>> present with libhdf5-dev (serial version, the default) or 
> >>> libhdf5-mpich2-dev.
> >>
> >> Hm, are you sure? I see the same error with either libhdf5-mpich2-dev
> >> or libhdf5-openmpi-dev installed.
> >
> > When testing against libhdf5-mpich2-dev, you should make sure that all
> > OpenMPI libraries are removed (in particular libopenmpi-dev). Otherwise
> > they take precedence over MPICH2 because of the alternatives priority.
> 
> Yep, just found that out myself. Thanks.
> 
> So here's a workaround that works for me with either set of libraries
> installed. Each has their own symbol to avoid including the C++ API,
> which is where the trouble lies.
> 
> mkoctfile -DMPICH_SKIP_MPICXX=1 -DOMPI_SKIP_MPICXX=1 helloworld.cc
> 
> I don't know enough about HDF5, but if it doesn't make use of the MPI
> C++ bindings at all, I'd argue this should be reassigned to hdf5
> upstream so H5public.h would now contain:
> 
> #ifdef H5_HAVE_PARALLEL
> #   define MPICH_SKIP_MPICXX 1
> #   define OMPI_SKIP_MPICXX 1
> #   include <mpi.h>
> #endif

Thanks for the solution above.  It works for me.  We could also patch
mkoctfile according to the patch attached below.  However, I think it is
preferable that the maintainers of the hdf5 package adopt your solution.
Therefore, I am hereby reassigning this bug report.

Rafael
--- /usr/bin/mkoctfile-orig	2012-09-08 07:23:37.000000000 +0000
+++ /usr/bin/mkoctfile	2012-09-08 08:57:36.000000000 +0000
@@ -77,7 +77,7 @@
 : ${CXXFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fopenmp"}
 : ${CXXPICFLAG="-fPIC"}
 : ${XTRA_CFLAGS="-mieee-fp"}
-: ${XTRA_CXXFLAGS=-I/usr/include/mpi "-mieee-fp  -I/usr/include/freetype2  "}
+: ${XTRA_CXXFLAGS=-I/usr/include/mpi "-mieee-fp  -I/usr/include/freetype2 -DMPICH_SKIP_MPICXX=1 -DOMPI_SKIP_MPICXX=1 "}
 
 : ${DEPEND_FLAGS="-M"}
 : ${DEPEND_EXTRA_SED_PATTERN=""}

Reply via email to