-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Install hdf5 as external library with fortran and mpi #8386
Description
Due to build issues on macs, I want to install hdf5 as an external library on my mac. I needed to hack the hdf5 source to get this to build, that went successfully and I was able to build and install the library. However when I try to register this in spack it gets the variants wrong. The entry I am using from packages.yaml is
hdf5:
paths:
[email protected] %[email protected] arch=darwin-highsierra-x86_64+fortran+mpi: /usr/local/gnu/hdf5
[email protected] %[email protected] arch=darwin-highsierra-x86_64+fortran+mpi: /usr/local/intel/hdf5
[email protected] %[email protected] arch=darwin-highsierra-x86_64+fortran+mpi: /usr/local/gnu/hdf5
[email protected] %[email protected] arch=darwin-highsierra-x86_64+fortran+mpi: /usr/local/intel/hdf5
buildable: False
note that [email protected] has a bug that prevents it from building in macs. This bug is fixed in [email protected]. The hack I made was needed to produce dynamic libraries using the Intel compiler. Anyway I install the package using
spack install [email protected]+fortran+mpi %[email protected]
(and similarly for the other cases). The install gives normal messages and "spack find hdf5" reports
==> 1 installed packages.
-- darwin-highsierra-x86_64 / [email protected] -------------------------
[email protected]
as it should. However when I run spack -v hdf5 I get
[email protected]cxxdebugfortranhl+mpi+pic+sharedszipthreadsafe
the installation has disabled fortran (DRAT!!). This messes up the build system I am using which wants hdf5 to have fortran (I built hdf5 by hand to have fortran).
Expected Result
spack find -v to report
[email protected]cxxdebug+fortranhl+mpi+pic+sharedszip~threadsafe
Actual Result
The external library thinks it doesn't have fortran.
Steps to reproduce the issue
compile hdf5 by hand and install it as an external library.
Information on your system
This includes:
macOS 10.13.4
Mac Pro late 2013
We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively!
If you want to ask a question about the tool (how to use it, what it can currently do, etc.), try the #general channel on our Slack first. We have a welcoming community and chances are you'll get your reply faster and without opening an issue.
Other than that, thanks for taking the time to contribute to Spack!