Bug#613056: Please compile gmsh with support for .med files

trophime christophe.trophime at lncmi.cnrs.fr
Wed Mar 30 14:43:08 UTC 2011


On Wed, 2011-03-30 at 09:43 +0200, trophime wrote:
> On Tue, 2011-03-29 at 21:59 +0200, Sylvestre Ledru wrote:
> > Le mardi 29 mars 2011 à 21:45 +0200, Andrea Palazzi a écrit :
> > > Package: gmsh
> > > Version: 2.5.0.dfsg-2
> > > Followup-For: Bug #613056
> > > 
> > > 
> > > Is there someone taking care of this? In the current binaries (and
> > > also in dfsg-3) .med support is not enabled, however if I compile it
> > > on my host support is enabled...
> > How can I test it ?
> > 
> > In the build log, I can see the define: -DENABLE_MED=ON
> > https://buildd.debian.org/fetch.cgi?&pkg=gmsh&ver=2.5.0.dfsg-3&arch=i386&stamp=1300706782&file=log
> > 
> > thanks
> > S
> > 
> 
> I think I found where the problem comes from:
> 
> Even if the flaf ENABLE_MED is ON it seems that med libraries are not
> correctly detected. If we take a look a CMakeLists.txt in gmsh main
> directory we see :
> 
> if(ENABLE_MED OR ENABLE_CGNS)
>   find_library(HDF5_LIB hdf5)
>   if(HDF5_LIB)
>     if(ENABLE_MED)
>       find_library(MED_LIB med)
>       if(MED_LIB)
>         set_config_option(HAVE_MED "Med")
>         list(APPEND EXTERNAL_LIBRARIES ${MED_LIB})
>       endif(MED_LIB)
>     endif(ENABLE_MED)    
>     if(ENABLE_CGNS)
>       find_library(CGNS_LIB cgns)
>       if(CGNS_LIB)
>         set_config_option(HAVE_LIBCGNS "Cgns")
>         list(APPEND EXTERNAL_LIBRARIES ${CGNS_LIB})
>       endif(CGNS_LIB)
>     endif(ENABLE_CGNS)    
>     if(MED_LIB OR CGNS_LIB)
>       list(APPEND EXTERNAL_LIBRARIES ${HDF5_LIB})
>       find_library(SZ_LIB szlib)
>       if(SZ_LIB)
>         list(APPEND EXTERNAL_LIBRARIES ${SZ_LIB})
>       endif(SZ_LIB)
>       if(NOT HAVE_LIBZ) # necessary for non-GUI builds
>         find_package(ZLIB)
>         if(ZLIB_FOUND)
>           set_config_option(HAVE_LIBZ "Zlib")
>           list(APPEND EXTERNAL_LIBRARIES ${ZLIB_LIBRARIES})
>         endif(ZLIB_FOUND)
>       endif(NOT HAVE_LIBZ)
>     endif(MED_LIB OR CGNS_LIB)
>   endif(HDF5_LIB)
> endif(ENABLE_MED OR ENABLE_CGNS)
> 
> So we can deduce that the med libraries would only be checked if hdf5
> lib is found!
> 
> In the control file there is no direct refence to a package containing
> any libhdf5.so. There should be a BuildDepends on libhdf5-dev |
> libhdf5-openmpi-dev...
> 
> So my guess is that adding libhdf5-dev | libhdf5-openmpi-dev... in
> debian/control would fix the problem.
> 
> Best
> C.
> 
> > 

I have verified that adding libhdf5-openmpi-dev to Build-Depend solve
the problem : 

"""
-- Found Med
-- Found OpenCascade
-- Looking for vsnprintf
-- Looking for vsnprintf - found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Found Dlopen

Gmsh has been configured for Linux with the following options: Ann Bamg
Blas Chaco DIntegration Dlopen FlTree Fltk Gmm Have64BitSizeT Jpeg
Kbipack Lapack MPI MathEx Med Mesh Metis Mpeg NativeFileChooser Netgen
OpenCascade OpenGL Parser Plugins Png Post Solver Zlib

C compiler: /usr/bin/cc
C++ compiler: /usr/bin/mpic++
Build type: RelWithDebInfo
Install prefix: /usr
"""

I have upload the change in debian science svn.







More information about the debian-science-maintainers mailing list