isce-framework / isce3

InSAR Scientific Computing Environment ***NOTICE - This repository is currently a mirror of an internally hosted project and is in the process of migrating the development to this public repository. In near future we will accept external pull requests.***
Other
124 stars 32 forks source link

Issue on installing ISCE3 conda package #7

Open seongsujeong opened 2 years ago

seongsujeong commented 2 years ago

Hi @vbrancat @rtburns-jpl @gmgunter,

Thanks for the opportunity to try out ISCE3 by releasing it on public github. Here I would like to report the issues that I have experienced from ISCE3 conda package (ver. 0.4.0). It looks like ISCE3 conda package is sensitive to certain dependent packages. I think it might cause some confusion for users who are installing ISCE3 on clean system (e.g. docker or AWS). Below is what I tried and how I have come up the conclusion like that.

The installation went through the end with no error messages, but importing isce3 in python did not work with the error message below (on docker container running ubuntu 20.04).

Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import isce3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/python/miniconda3/lib/python3.9/site-packages/isce3/__init__.py", line 2, in <module>
    import pybind_isce3 as _pybind_isce3
ImportError: libhdf5_cpp.so.103: cannot open shared object file: No such file or directory
>>> 

Hope it helps the other users who wants to install ISCE3 conda package.

gmgunter commented 2 years ago

Hi @seongsujeong, thanks for the detailed report.

I'm guessing that this might be the underlying cause of the issue: HDF5 made a breaking change to their API in v1.12 that is incompatible with all of isce3's current releases. We have this patched in our internal develop branch, and it'll be fixed in our next release, but for now you'll need to pin against an older version of hdf5. I was able to get a working installation of isce3 v0.4.0 on a clean environment by doing this:

$ conda install --channel conda-forge isce3 hdf5=1.10 pyre=1.9

@rtburns-jpl maybe we could update the conda recipe to enforce this upper bound on the supported version of hdf5 for the time being?

Still, it's weird that it's trying to link against a shared library that doesn't exist. I would've expected to see something like an "unresolved symbol" error instead.

$ conda activate isce3-v0.2

$ conda list | grep hdf5
hdf5                      1.10.6          nompi_h6a2412b_1114    conda-forge

$ ls $CONDA_PREFIX/lib/*hdf5_cpp*
/home/ggunter/Tools/miniconda3/envs/isce3-v0.2/lib/libhdf5_cpp.so
/home/ggunter/Tools/miniconda3/envs/isce3-v0.2/lib/libhdf5_cpp.so.103
/home/ggunter/Tools/miniconda3/envs/isce3-v0.2/lib/libhdf5_cpp.so.103.2.0

$ ldd $CONDA_PREFIX/lib/libisce3.so | grep hdf5
    libhdf5_cpp.so.103 => /home/ggunter/Tools/miniconda3/envs/isce3-v0.2/lib/./libhdf5_cpp.so.103 (0x00007f36b5a53000)
    libhdf5.so.103 => /home/ggunter/Tools/miniconda3/envs/isce3-v0.2/lib/./libhdf5.so.103 (0x00007f36b56ca000)
    libhdf5_hl.so.100 => /home/ggunter/Tools/miniconda3/envs/isce3-v0.2/lib/./././libhdf5_hl.so.100 (0x00007f36af754000)
$ conda activate isce3-v0.4

$ conda list | grep hdf5
hdf5                      1.12.1          nompi_h2750804_101    conda-forge

$ ls $CONDA_PREFIX/lib/*hdf5_cpp*
/home/ggunter/Tools/miniconda3/envs/isce3-v0.4/lib/libhdf5_cpp.so
/home/ggunter/Tools/miniconda3/envs/isce3-v0.4/lib/libhdf5_cpp.so.200
/home/ggunter/Tools/miniconda3/envs/isce3-v0.4/lib/libhdf5_cpp.so.200.1.0

$ ldd $CONDA_PREFIX/lib/libisce3.so | grep hdf5
    libhdf5_cpp.so.103 => not found
    libhdf5.so.103 => not found
    libhdf5_cpp.so.200 => /home/ggunter/Tools/miniconda3/envs/isce3-v0.4/lib/././libhdf5_cpp.so.200 (0x00007fb6a7df3000)
    libhdf5.so.200 => /home/ggunter/Tools/miniconda3/envs/isce3-v0.4/lib/././libhdf5.so.200 (0x00007fb6a79ee000)
    libhdf5_hl.so.200 => /home/ggunter/Tools/miniconda3/envs/isce3-v0.4/lib/./././libhdf5_hl.so.200 (0x00007fb6a73b8000)

Notice that the v0.4 libisce3 is trying to link against both libhdf5_cpp.so.103 and libhdf5_cpp.so.200. Seems like something weird is going on on the conda-forge build host.

rtburns-jpl commented 2 years ago

We have this patched in our internal develop branch, and it'll be fixed in our next release, but for now you'll need to pin against an older version of hdf5. I was able to get a working installation of isce3 v0.4.0 on a clean environment by doing this:

$ conda install --channel conda-forge isce3 hdf5=1.10 pyre=1.9

@rtburns-jpl maybe we could update the conda recipe to enforce this upper bound on the supported version of hdf5 for the time being?

I'm thinking in the other direction - the patch for this is very small, so I think I'll just backport it to our current conda package so that it will support HDF5 v1.12.

Notice that the v0.4 libisce3 is trying to link against both libhdf5_cpp.so.103 and libhdf5_cpp.so.200. Seems like something weird is going on on the conda-forge build host.

This may be an issue with our recipe - there is a pin_compatible mechanism which I may need to be using here. I'll try to take a look at this.

mdenbina commented 2 years ago
$ conda install --channel conda-forge isce3 hdf5=1.10 pyre=1.9

Just wanted to chime in to say that I ran into a similar issue yesterday as @seongsujeong, and this fixed it for me. Thanks @gmgunter!