# Hdf5 linking not working

**URL:** <https://code-saturne.org/forum/t/hdf5-linking-not-working/1368>\
**Category:** Installation issues\
**Created:** [April 12, 2017, 11:39am UTC](https://code-saturne.org/forum/t/hdf5-linking-not-working/1368 "2017-04-12T11:39:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTrinca](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@CTrinca](https://code-saturne.org/forum/u/CTrinca)\
**Post date:** [April 12, 2017, 11:39am UTC](https://code-saturne.org/forum/t/hdf5-linking-not-working/1368/1 "2017-04-12T11:39:24Z")

</div>

Hello everyone,

I am trying to install the triplet Salome + Saturne + Syrthes on a new workstation, but I encounter a problem I never had in my previous installation.  
I make use of Salome’s libraries, and nothing seems to go wrong during the compilation: in particular, at the end of the configure run, Hdf5 seems to be supported:

```plaintext
 HDF (Hierarchical Data Format) support: yes

```

Also, make and make install do not seem to protest (I attach their output to this post, in case it could help)  
However, when I try a test run, Saturne complains that it cannot find libhdf5:

```plaintext
/opt/Code_Saturne/4.0.7/prod/libexec/code_saturne/cs_solver: error while loading shared libraries: libhdf5.so.9: cannot open shared object file: No such file or directory
solver script exited with status 127.

```

Indeed, ldd confirms that there is a problem:

```plaintext
[...]
libhdf5.so.9 => not found

```

I tried to fix it by adding /opt/Salome/BINARIES-UB16.04/hdf5/lib/ to LD\_LIBRARY\_PATH but that did not solve the issue.  
Is there a known cause for this problem, or a workaround I can try?  
Thanks in advance and regards,

Cosimo  
[configure.log](https://code-saturne.org/forum/uploads/short-url/pu9Jlq2zNmGCvUWy1DS1Fls1TpY.log) (21.7 KB)  
[make\_install.log](https://code-saturne.org/forum/uploads/short-url/zbXWvRL6Dtt0tDRNsCJZKSndGv.log) (88.9 KB)  
[make.log](https://code-saturne.org/forum/uploads/short-url/dP77JChHpxAOMKxnfAMwTSoc6N.log) (15 KB)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [April 12, 2017, 11:05pm UTC](https://code-saturne.org/forum/t/hdf5-linking-not-working/1368/2 "2017-04-12T23:05:32Z")

</div>

Hello,

What system is running on your workstation ?

The configure.log seems to be different from the usual config.log (actually, it is the one from the installer; the lower-lever install adds a config.log in the build directory, which could be useful).

Which version of SALOME are you using ? How was it installed ?

More importantly, did you source the Syrthes environment when installing or running Code\_Saturne ? If yes, could you try not sourcing it ? IF Syrthes uses a different version of HDF5, it might generate a conflict on some systems (especially on systems such as OpenSUSE, which add --enable-new-dtags to GCC’s linker options).

Best regards,

Yvan

---

<div class="post-metadata">

**Author:** ![CTrinca](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@CTrinca](https://code-saturne.org/forum/u/CTrinca)\
**Post date:** [April 13, 2017, 9:44am UTC](https://code-saturne.org/forum/t/hdf5-linking-not-working/1368/3 "2017-04-13T09:44:05Z")

</div>

Hi Yvan,

Many thanks for your answer. I am running Ubuntu 16.04.1, 64 bit.  
The configure.log I posted is just what the configure command printed on the standard output, I did not use the installer. I am attaching config.log in the hope it is more helpful.  
I am using Salome 8.2.0, the pre-compiled version for Ubuntu. I just unpacked it in a folder in /opt. Saturne’s version is 4.0.7.  
I did not source syrthes.profile, because I have two different versions of Syrthes installed and I was worried it could raise confusion. I compiled them using Salome’s libraries, so I do not think they should conflict.  
Thanks again, and please let me know what other information I can give you to help identify the problem.  
Best regards,

Cosimo  
[config.log](https://code-saturne.org/forum/uploads/short-url/itae7AbydYlqOnTetx2ydI3FeU2.log) (247 KB)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [April 13, 2017, 12:15pm UTC](https://code-saturne.org/forum/t/hdf5-linking-not-working/1368/4 "2017-04-13T12:15:35Z")

</div>

Hello,

This may be due to a lack of robustness for some cases in the install system.

Could you try:  
export LD\_LIBRARY\_PATH=/opt/Salome/BINARIES-UB16.04/hdf5:$LD\_LIBRARY\_PATH

before running _Code\_Saturne_ ?

If this works, we’ll need a small addition in the install scripts.

Regards,

Yvan

---

<div class="post-metadata">

**Author:** ![CTrinca](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@CTrinca](https://code-saturne.org/forum/u/CTrinca)\
**Post date:** [April 13, 2017, 4:05pm UTC](https://code-saturne.org/forum/t/hdf5-linking-not-working/1368/5 "2017-04-13T16:05:48Z")

</div>

Hi,

It worked when I added /opt/Salome/BINARIES-UB16.04/hdf5/lib, which I had already tried but I did not think of restarting the GUI.  
Thanks for that. Can you suggest me the modification to the script?  
Regards,

Cosimo

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [April 14, 2017, 11:06pm UTC](https://code-saturne.org/forum/t/hdf5-linking-not-working/1368/6 "2017-04-14T23:06:36Z")

</div>

Hello,

Actually, the code already includes the patches I was thinking about (handling HDF5RUNPATH), so Im not sure why you have that behavior.

Could you also post your config.status and top-level generated Makefile ?

Best regards,

Yvan

---

<div class="post-metadata">

**Author:** ![CTrinca](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@CTrinca](https://code-saturne.org/forum/u/CTrinca)\
**Post date:** [April 19, 2017, 10:09am UTC](https://code-saturne.org/forum/t/hdf5-linking-not-working/1368/7 "2017-04-19T10:09:22Z")

</div>

Hello,

Sorry for the late reply, I attached config.status and the Makefile in my build directory (hope is the one you meant). I had a glance at them and the variables concerning hdf5 seem reasonable. Hopefully you can get more from them.  
Thank you again and regards,

Cosimo  
[makefile\_config.tar.gz](https://code-saturne.org/forum/uploads/short-url/vAiO1ByZqBypMgyBD7msj3wajPe.gz) (40.5 KB)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [May 1, 2017, 12:13pm UTC](https://code-saturne.org/forum/t/hdf5-linking-not-working/1368/8 "2017-05-01T12:13:42Z")

</div>

Hello,

I doubt it should make a difference, but could you try configurin with “–with-hdf5=/opt/Salome/BINARIES-UB16.04/hdf5” instead of “–with-hdf5=/opt/Salome/BINARIES-UB16.04/hdf5/” (removind the last “/” character) ?

Otherwise it that has not impact, I assume there may be other HDF5 installations, but am not sure which. Could you post the output of “echo $LD\_LIBRARY\_PATH” or env “env” ?

Regards,

Yvan
