enzo-project / enzo-e

A version of Enzo designed for exascale and built on charm++.
Other
29 stars 35 forks source link

Setting zlib path #211

Open setsuna0402 opened 2 years ago

setsuna0402 commented 2 years ago

I met an error about that cmake confuses which zlib should be used, if there are multiple zlibs in the system. (hdf5 library depends on zlib.)
One solution is to allow users clarify the path of zlib in config/*.cmake files.

mabruzzo commented 2 years ago

As we discussed offline, the problems arise when you try to use a custom HDF5 installation that depends on a custom zlib installation.

I dug into this last week. It sounds like your HDF5_C_LIRARIES and/or HDF5_C_INCLUDE_DIRS variables are broken in your build. These variables are determined based on the output of /path/to/h5cc -show -shlib. This suggests that either:

In any case, it would probably be nice to provide an escape hatch for people to specify extra linking directories or extra libraries (a similar solution seems to be necessary to address an issue @wolfram-schmidt encountered with missing libraries while trying to use intel compilers on an HLRN cluster)

setsuna0402 commented 2 years ago

Hi, I just checked the path of zlib used by my hdf5 library. It is correct. So the reason may be the later one.

mabruzzo commented 2 years ago

I saw something earlier today that made me realize that the pngwriter library may also link to zlib (with may have some relationship with libpng), which further complicates the issue