# Changes to include directory structure

**URL:** <https://forum.hdfgroup.org/t/changes-to-include-directory-structure/7668>\
**Category:** Future Development and Product Ideas\
**Created:** [October 26, 2020, 7:37pm UTC](https://forum.hdfgroup.org/t/changes-to-include-directory-structure/7668 "2020-10-26T19:37:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike.jackson](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/mike.jackson/32/1734_2.png) [@mike.jackson](https://forum.hdfgroup.org/u/mike.jackson)\
**Post date:** [October 26, 2020, 7:37pm UTC](https://forum.hdfgroup.org/t/changes-to-include-directory-structure/7668/1 "2020-10-26T19:37:32Z")

</div>

Was/Is there any discussion around the idea of installing the HDF5 headers into a “sandboxed” include directory such as “hdf5”? If we look at projects like LLVM when they install their headers they go into clang, clang-c, lld, llvm, etc. Maybe my need for hyper organization is driving this but I just worry about clashes with other include headers from other projects as a possibility. I’ve only had that happen a few times in 12 years.

The migration could certainly be a pain or maybe not. If it happens at a major version (1.14) then the FindHDF5.cmake could certainly be updated to reflect the new spot.

Also, developers could use #include \<hdf5/hdf5.h\> if they wanted.

Just a random thought that I have been sitting on for about 12 years now…

Mike Jackson

---

<div class="post-metadata">

**Author:** ![steven](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/steven/32/117_2.png) [@steven](https://forum.hdfgroup.org/u/steven)\
**Post date:** [October 27, 2020, 3:31am UTC](https://forum.hdfgroup.org/t/changes-to-include-directory-structure/7668/2 "2020-10-27T03:31:16Z")

</div>

Not quite certain what you mean by installing the header files into `sandbox`.

Nevertheless it is possible to install most versions, – I picked `1` git commit per week, starting from year 2003 – into a separate directory, then individually linking against to a recent `openMPI` and then linking [IOR](https://github.com/hpc/ior) and [MACSio](https://github.com/LLNL/MACSio) against it. This was a part of a massive regression test for pHDF5, to examine if there was any significant performance fluctuations over the past `17` years. Here is [the plot](http://isc19.h5cpp.org/#/3/2) – gaps indicate failed compile.

During the development phase I first used gnu `configure --prefix` option, then tried `cmake` as well. If I recall @byrn, @lrknox and @les.kurz helped me through the somewhat bumpy ride – and I am thankful for their help.

So if you meant a feature that allows you to compile HDF5 in an isolated environment, then yes, it is available.

best: steve

---

<div class="post-metadata">

**Author:** ![mike.jackson](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/mike.jackson/32/1734_2.png) [@mike.jackson](https://forum.hdfgroup.org/u/mike.jackson)\
**Post date:** [October 27, 2020, 3:56pm UTC](https://forum.hdfgroup.org/t/changes-to-include-directory-structure/7668/3 "2020-10-27T15:56:16Z")

</div>

Steve,

As usual when I’m too busy, I didn’t really give enough details so I’ll be more precise. Currently when you build and install HDF5, let’s say into /usr/local you will get the headers installed loosely into /usr/local/include. I would like to change that default to /usr/local/include/hdf5/\*.h

---

<div class="post-metadata">

**Author:** ![steven](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/steven/32/117_2.png) [@steven](https://forum.hdfgroup.org/u/steven)\
**Post date:** [October 27, 2020, 4:38pm UTC](https://forum.hdfgroup.org/t/changes-to-include-directory-structure/7668/4 "2020-10-27T16:38:20Z")

</div>

Try this: `./configure --prefix=/usr/local --includedir=/usr/local/hdf5/include [...]`  
`make -jN && make install` where `N` is the core count, max `32` – on a recent XEON skylake it turned out around `32` cores the compile speed increase is less dramatic.

Here is the desired layout:

```auto
steven@honshu:/tmp/usr/local$ tree -L 2
.
├── bin
│ ├── [...]
│ └── h5watch
├── hdf5
│ └── include
├── lib
│ ├── [...]
│ ├── libhdf5.so.103 -> libhdf5.so.103.2.0
│ └── libhdf5.so.103.2.0
└── share
    └── hdf5_examples

```

---

<div class="post-metadata">

**Author:** ![mike.jackson](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/mike.jackson/32/1734_2.png) [@mike.jackson](https://forum.hdfgroup.org/u/mike.jackson)\
**Post date:** [October 28, 2020, 2:59pm UTC](https://forum.hdfgroup.org/t/changes-to-include-directory-structure/7668/5 "2020-10-28T14:59:33Z")

</div>

Steve,

Cool! Thanks for the tip. Can I do that with the CMake based builds?

Also, /usr/local/include/hdf5
