From charlesreid1

No edit summary
No edit summary
Line 1: Line 1:
= Installing =
= Installing =
==Mac OS X Lion: Use Brew==
If you're on Mac OS X Lion (10.7), you may run into issues. If you're less inclined to get elbow-deep in computer problems, you can just use Homebrew (http://mxcl.github.io/homebrew/), a really nice package manager for Mac OS X. MacPorts and Fink can both be nightmares, but Homebrew manages to do everything hassle-free.
You can install HDF5 using Homebrew by running:
<pre>
$ brew install hdf5
</pre>


== Configuring ==
== Configuring ==

Revision as of 16:36, 27 April 2013

Installing

Mac OS X Lion: Use Brew

If you're on Mac OS X Lion (10.7), you may run into issues. If you're less inclined to get elbow-deep in computer problems, you can just use Homebrew (http://mxcl.github.io/homebrew/), a really nice package manager for Mac OS X. MacPorts and Fink can both be nightmares, but Homebrew manages to do everything hassle-free.

You can install HDF5 using Homebrew by running:

$ brew install hdf5

Configuring

I am using the HDF5 libraries for various software tools available through the CRSim Software repository http://software.crsim.utah.edu/ - specifically, C++ programs using the C++ interface to HDF5 - necessitating the --enable-cxx configure argument:

./configure \
 --prefix=/path/to/hdf5 \
 --enable-cxx

You can optionally use the configure arguments --enable-static-exe --enable-static, though in my experience these aren't necessary to build (and link to) HDF5.

Errors

You may run into problems during make check, something looking like this:

Testing hard normalized long double -> signed char conversions        Command terminated by signal 11
0.31user 0.04system 0:01.64elapsed 21%CPU (0avgtext+0avgdata 19936maxresident)k
824inputs+360outputs (6major+14996minor)pagefaults 0swaps
make[4]: *** [dt_arith.chkexe_] Error 1

The solution, as mentioned here http://kartadikaria.wordpress.com/2011/10/06/how-to-install-hdf5-macintosh-lion/, is to modify the configure flags for GNU compilers (the one used on Mac, if you're using gcc). Change the PROD_CFLAG for gcc compilers version 4 and up to use -O0 instead of the default -O3.