Opened 8 years ago

Closed 7 years ago

#51841 closed defect (fixed)

mathgl: cannot find HDF5

Reported by: mojca (Mojca Miklavec) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mamoll (Mark Moll)
Port: mathgl hdf5

Description

mathgl fails during the configuration step for me on 10.7:

-- Performing Test MGL_HAVE_GSL2 - Success
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
-- Could NOT find HDF5 (missing:  HDF5_HL_LIBRARIES) (found version "1.10.0")
CMake Warning at CMakeLists.txt:408 (find_package):
  Could not find a package configuration file provided by "HDF5" with any of
  the following names:
    hdf5Config.cmake
    hdf5-config.cmake
  Add the installation prefix of "HDF5" to CMAKE_PREFIX_PATH or set
  "HDF5_DIR" to a directory containing one of the above files.  If "HDF5"
  provides a separate development package or SDK, be sure it has been
  installed.
CMake Error at CMakeLists.txt:410 (message):
  Couldn't find HDF5 library.
-- Found ZLIB: /opt/local/lib/libz.dylib (found version "1.2.8") 

I have the following hdf/mathgl ports installed:

> port installed '*hdf*'
The following ports are currently installed:
  hdf4 @4.2.11_1 (active)
  hdf5 @1.10.0_1+cxx+hl (active)
  hdf5-18 @1.8.16_5+cxx+hl (active)
> port installed mathgl
The following ports are currently installed:
  mathgl @2.3.4_2 (active)

Attachments (2)

mathgl-main.log (13.1 KB) - added by mojca (Mojca Miklavec) 8 years ago.
Portfile (6.3 KB) - added by mamoll (Mark Moll) 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by mojca (Mojca Miklavec)

Attachment: mathgl-main.log added

comment:1 Changed 8 years ago by mamoll (Mark Moll)

The hdf5 port doesn't install the cmake config files (because it is using ./configure instead of cmake). What happens if you add this to the mathgl port?:

configure.args-append -DHDF5_HL_LIBRARIES=${prefix}/lib/libhdf5_hl.dylib

comment:2 Changed 8 years ago by mojca (Mojca Miklavec)

The configuration is all happy:

-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
-- Found HDF5: /opt/local/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib (found version "1.10.0")

but then it fails at the last linking stage (probably due to missing LDFLAGS):

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++  -pipe -Os -stdlib=libstdc++  -DNDEBUG -arch x86_64 -mmacosx-version-min=10.7 -dynamiclib -Wl,-headerpad_max_install_names  -L/opt/local/lib -Wl,-headerpad_max_install_names -compatibility_version 7.4.3 -o libmgl.7.4.3.dylib -install_name /opt/local/lib/libmgl.7.4.3.dylib CMakeFiles/mgl.dir/addon.cpp.o CMakeFiles/mgl.dir/axis.cpp.o CMakeFiles/mgl.dir/base_cf.cpp.o CMakeFiles/mgl.dir/base.cpp.o CMakeFiles/mgl.dir/canvas_cf.cpp.o CMakeFiles/mgl.dir/canvas.cpp.o CMakeFiles/mgl.dir/cont.cpp.o CMakeFiles/mgl.dir/crust.cpp.o CMakeFiles/mgl.dir/complex.cpp.o CMakeFiles/mgl.dir/complex_ex.cpp.o CMakeFiles/mgl.dir/complex_io.cpp.o CMakeFiles/mgl.dir/fft.cpp.o CMakeFiles/mgl.dir/data_gr.cpp.o CMakeFiles/mgl.dir/data.cpp.o CMakeFiles/mgl.dir/data_io.cpp.o CMakeFiles/mgl.dir/data_ex.cpp.o CMakeFiles/mgl.dir/data_png.cpp.o CMakeFiles/mgl.dir/export_2d.cpp.o CMakeFiles/mgl.dir/export_3d.cpp.o CMakeFiles/mgl.dir/eval.cpp.o CMakeFiles/mgl.dir/evalp.cpp.o CMakeFiles/mgl.dir/exec.cpp.o CMakeFiles/mgl.dir/export.cpp.o CMakeFiles/mgl.dir/fit.cpp.o CMakeFiles/mgl.dir/font.cpp.o CMakeFiles/mgl.dir/obj.cpp.o CMakeFiles/mgl.dir/other.cpp.o CMakeFiles/mgl.dir/parser.cpp.o CMakeFiles/mgl.dir/pde.cpp.o CMakeFiles/mgl.dir/pixel.cpp.o CMakeFiles/mgl.dir/plot.cpp.o CMakeFiles/mgl.dir/prim.cpp.o CMakeFiles/mgl.dir/surf.cpp.o CMakeFiles/mgl.dir/vect.cpp.o CMakeFiles/mgl.dir/volume.cpp.o CMakeFiles/mgl.dir/evalc.cpp.o CMakeFiles/mgl.dir/s_hull/s_hull_pro.cpp.o CMakeFiles/mgl.dir/window.cpp.o CMakeFiles/mgl.dir/fractal.cpp.o CMakeFiles/mgl.dir/prc/PRCbitStream.cc.o CMakeFiles/mgl.dir/prc/PRCdouble.cc.o CMakeFiles/mgl.dir/prc/oPRCFile.cc.o CMakeFiles/mgl.dir/prc/writePRC.cc.o CMakeFiles/mgl.dir/prc.cpp.o CMakeFiles/mgl.dir/opengl.cpp.o -framework OpenGL /opt/local/lib/libpng.dylib /opt/local/lib/libz.dylib /opt/local/lib/libz.dylib /opt/local/lib/libz.dylib /usr/lib/libdl.dylib /usr/lib/libm.dylib /opt/local/lib/libgsl.dylib /opt/local/lib/libgslcblas.dylib -Wl,-rpath,/opt/local/lib 
In file included from /path/to/mathgl/work/mathgl-2.3.5.1/utils/make_pas.cpp:3:
In file included from /path/to/mathgl/work/mathgl-2.3.5.1/include/mgl2/define.h:292:
In file included from /usr/include/c++/4.2.1/backward/complex.h:31:
/usr/include/c++/4.2.1/backward/backward_warning.h:32:2: warning: This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. [-W#warnings]
#warning This file includes at least one deprecated or antiquated header. \
 ^
Undefined symbols for architecture x86_64:
  "_H5Dclose", referenced from:
      _mgl_datac_save_hdf in complex_io.cpp.o
      _mgl_datac_read_hdf in complex_io.cpp.o
      _mgl_data_save_hdf in data_io.cpp.o
      _mgl_data_read_hdf in data_io.cpp.o
      _mgl_datas_hdf in data_io.cpp.o
  "_H5Dcreate1", referenced from:
      _mgl_datac_save_hdf in complex_io.cpp.o
      _mgl_data_save_hdf in data_io.cpp.o
  "_H5Dget_space", referenced from:
      _mgl_datac_read_hdf in complex_io.cpp.o
      _mgl_data_read_hdf in data_io.cpp.o
...
  "_H5open", referenced from:
      _mgl_datac_save_hdf in complex_io.cpp.o
      _mgl_datac_read_hdf in complex_io.cpp.o
      _mgl_data_save_hdf in data_io.cpp.o
      _mgl_data_read_hdf in data_io.cpp.o
      _mgl_datas_hdf in data_io.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Would it be feasible to install hdf5 via cmake? That might make other projects easier to install. You could probably also "hand-craft" the cmake file when installing via configure. Or you could ask the developers to install the cmake support files even when autotools are used.

Changed 8 years ago by mamoll (Mark Moll)

Attachment: Portfile added

comment:3 Changed 8 years ago by mamoll (Mark Moll)

I have attached a cmake-based version of the hdf5 port. It doesn't install certain tools (h5c++, h5cc, h5clear, h5fc, h5format_convert, h5perf_serial, h5redeploy, h5watch), so it's no safe replacement for the configure-based build. There are some other minor differences, but those don't seem critical. You can try the attached Portfile and let me know if it works. I have filed a bug report upstream re. the missing tools.

comment:4 Changed 8 years ago by mojca (Mojca Miklavec)

Port: hdf5 added

One "problem" with CMake-based build is that the new build system creates the libraries:

  /opt/local/lib/libhdf5.1.10.0.dylib
  /opt/local/lib/libhdf5.100.0.0.dylib
  /opt/local/lib/libhdf5.a
  /opt/local/lib/libhdf5.dylib

while the old build systems would create

/opt/local/lib/libhdf5.100.dylib

and thus one needs to revbump all dependencies.

Maybe a single revbump would suffice, but it would be great if both systems produced more or less the same set of files.

comment:5 Changed 8 years ago by mojca (Mojca Miklavec)

... but mathgl successfully installs after the change.

comment:6 Changed 7 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: newclosed

I didn't see this issue with mathgl2.4 or 2.4.1.

Note: See TracTickets for help on using tickets.