conda-forge / ants-feedstock

A conda-smithy repository for ants.
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

missing shared libraries when installed from conda / mamba #9

Closed jsbyysheng closed 2 months ago

jsbyysheng commented 6 months ago

Solution to issue cannot be found in the documentation.

Issue

Describe the problem

I got error about missing shared libraries when installed from conda / mamba.

antsRegistration: error while loading shared libraries: libITKIOBruker-5.3.so.1: cannot open shared object file: No such file or directory

There is no problem if I run binary downloaded from github. To Reproduce

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
mamba create -n ants_reg python=3.9
mamba activate ants_reg
mamba install -c conda-forge itk ants
antsRegistration --help

Then I got:

antsRegistration: error while loading shared libraries: libITKIOBruker-5.3.so.1: cannot open shared object file: No such file or directory

System information (please complete the following information)

ANTs version information

ants                      2.5.1                h00ab1b0_0    conda-forge

Installed packages

# packages in environment at /home/jsbyysheng/miniforge3/envs/ants_registration:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
ants                      2.5.1                h00ab1b0_0    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.27.0               hd590300_0    conda-forge
ca-certificates           2024.2.2             hbcca054_0    conda-forge
eigen                     3.4.0                h00ab1b0_0    conda-forge
expat                     2.6.1                h59595ed_0    conda-forge
fftw                      3.3.10          nompi_hc118613_108    conda-forge
hdf5                      1.14.2          nompi_h4f84152_100    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
itk                       5.3.0            py39h22c7aae_0    conda-forge
itk-core                  5.3.0                    pypi_0    pypi
itk-filtering             5.3.0                    pypi_0    pypi
itk-numerics              5.3.0                    pypi_0    pypi
itk-registration          5.3.0                    pypi_0    pypi
itk-segmentation          5.3.0                    pypi_0    pypi
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libaec                    1.1.2                h59595ed_1    conda-forge
libblas                   3.9.0           21_linux64_openblas    conda-forge
libcblas                  3.9.0           21_linux64_openblas    conda-forge
libcurl                   8.5.0                hca28451_0    conda-forge
libdeflate                1.19                 hd590300_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libexpat                  2.6.1                h59595ed_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h807b86a_5    conda-forge
libgfortran-ng            13.2.0               h69a702a_5    conda-forge
libgfortran5              13.2.0               ha4646dd_5    conda-forge
libgomp                   13.2.0               h807b86a_5    conda-forge
libhwloc                  2.9.3           default_h554bfaf_1009    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libitk                    5.4rc02              h26001f5_8    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           21_linux64_openblas    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libopenblas               0.3.26          pthreads_h413a1c8_0    conda-forge
libpng                    1.6.43               h2797004_0    conda-forge
libsqlite                 3.45.1               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_5    conda-forge
libtiff                   4.6.0                ha9c0a0a_2    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libwebp-base              1.3.2                hd590300_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxml2                   2.12.5               h232c23b_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
ncurses                   6.4                  h59595ed_2    conda-forge
numpy                     1.26.4           py39h474f0d3_0    conda-forge
openssl                   3.2.1                hd590300_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
python                    3.9.18          h0755675_1_cpython    conda-forge
python_abi                3.9                      4_cp39    conda-forge
readline                  8.2                  h8228510_1    conda-forge
setuptools                69.1.1             pyhd8ed1ab_0    conda-forge
sqlite                    3.45.1               h2c6b66d_0    conda-forge
tbb                       2021.11.0            h00ab1b0_1    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge

Environment info

     active environment : ants_registration
    active env location : /home/jsbyysheng/miniforge3/envs/ants_registration
            shell level : 2
       user config file : /home/jsbyysheng/.condarc
 populated config files : /home/jsbyysheng/miniforge3/.condarc
          conda version : 23.11.0
    conda-build version : not installed
         python version : 3.10.13.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=23.11.0=0
                          __cuda=12.3=0
                          __glibc=2.31=0
                          __linux=5.15.0=0
                          __unix=0=0
       base environment : /home/jsbyysheng/miniforge3  (writable)
      conda av data dir : /home/jsbyysheng/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /home/jsbyysheng/miniforge3/pkgs
                          /home/jsbyysheng/.conda/pkgs
       envs directories : /home/jsbyysheng/miniforge3/envs
                          /home/jsbyysheng/.conda/envs
               platform : linux-64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.10.13 Linux/5.15.0-97-generic ubuntu/20.04.6 glibc/2.31 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.5
                UID:GID : 1003:1003
             netrc file : None
           offline mode : False
jsbyysheng commented 6 months ago

Related to https://github.com/ANTsX/ANTs/issues/1696

ghisvail commented 6 months ago

conda-forge quietly updated the libitk package to version 5.4rc02 without triggering a rebuild for ants. Hence the error when loading the shared library, which is still expecting a linkage with version 5.3.

@conda-forge-admin how can this be avoided in the future? I can't manually keep track of updates to direct dependencies which are updated.

jsbyysheng commented 6 months ago

conda-forge quietly updated the libitk package to version 5.4rc02 without triggering a rebuild for ants. Hence the error when loading the shared library, which is still expecting a linkage with version 5.3.

@conda-forge-admin how can this be avoided in the future? I can't manually keep track of updates to direct dependencies which are updated.

Indeed. mamba install libitk==5.3 makes everything work.