Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libgfortran.so.5: version `GFORTRAN_10' not found #24

Closed
1 task done
inducer opened this issue May 21, 2021 · 3 comments
Closed
1 task done

libgfortran.so.5: version `GFORTRAN_10' not found #24

inducer opened this issue May 21, 2021 · 3 comments

Comments

@inducer
Copy link
Contributor

inducer commented May 21, 2021

After installing pyfmmlib as packaged here, I get:

$ python -c 'import pyfmmlib'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3/envs/testing/lib/python3.9/site-packages/pyfmmlib/__init__.py", line 2, in <module>
    import pyfmmlib._internal as _int
ImportError: /var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3/envs/testing/bin/../lib/libgfortran.so.5: version `GFORTRAN_10' not found (required by /var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3/envs/testing/lib/python3.9/site-packages/pyfmmlib/_internal.cpython-39-x86_64-linux-gnu.so)

Confusingly, the .so seems to link against my system libgfortran.so.5

$ ldd .miniforge3/envs/testing/lib/python3.9/site-packages/pyfmmlib/_internal.cpython-39-x86_64-linux-gnu.so 
        linux-vdso.so.1 (0x00007ffee65d2000)
        libgfortran.so.5 => /lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007f3e3dc2b000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3e3dae7000)
        libmvec.so.1 => /lib/x86_64-linux-gnu/libmvec.so.1 (0x00007f3e3dabb000)
        libgomp.so.1 => /lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f3e3da7b000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3e3da61000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3e3d89c000)
        libquadmath.so.0 => /lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f3e3d851000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3e3e190000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3e3d84b000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3e3d829000)

This doesn't seem consistent with the docs in that adding compiler (used here) didn't seem to add the necessary runtime packages.

This issue comes from a failing pytential CI job.

Even more confusingly, that libgfortran.so.5 seems to contain relevant symbols:

$ nm --dynamic /lib/x86_64-linux-gnu/libgfortran.so.5 | grep GFORTRAN_10
0000000000000000 A GFORTRAN_10
0000000000000000 A GFORTRAN_10.2
000000000026d3d0 T _gfortran_cosd_r10@@GFORTRAN_10
000000000026de50 T _gfortran_cosd_r16@@GFORTRAN_10
[snip]

Environment (conda list):
$ conda list

# packages in environment at /var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3/envs/testing:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
apipkg                    1.5                      pypi_0    pypi
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
arraycontext              2021.1                   pypi_0    pypi
attrs                     21.2.0                   pypi_0    pypi
boxtree                   2021.1                   pypi_0    pypi
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.17.1               h7f98852_1    conda-forge
ca-certificates           2020.12.5            ha878542_0    conda-forge
certifi                   2020.12.5        py39hf3d152e_1    conda-forge
cgen                      2020.1                   pypi_0    pypi
codepy                    2019.1                   pypi_0    pypi
colorama                  0.4.4                    pypi_0    pypi
curl                      7.76.1               hea6ffbf_2    conda-forge
cython                    0.29.23          py39he80948d_0    conda-forge
double-conversion         3.1.5                h9c3ff4c_2    conda-forge
eigen                     3.3.9                h4bd325d_1    conda-forge
execnet                   1.8.0                    pypi_0    pypi
expat                     2.3.0                h9c3ff4c_0    conda-forge
ffmpeg                    4.3.1                hca11adc_2    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.13.1            hba837de_1005    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freeimage                 3.18.0               h88c329d_7    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
genpy                     2021.1                   pypi_0    pypi
gettext                   0.19.8.1          h0b5b191_1005    conda-forge
git                       2.30.2          pl5320h24fefe6_1    conda-forge
gl2ps                     1.4.2                h0708190_0    conda-forge
glew                      2.1.0                h9c3ff4c_2    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
gmpy2                     2.1.0b1          py39hf9ed83c_1    conda-forge
gmsh                      4.8.4                h2ad51fa_0    conda-forge
gmsh-interop              2021.1                   pypi_0    pypi
gnutls                    3.6.13               h85f3911_1    conda-forge
hdf4                      4.2.15               h10796ff_3    conda-forge
hdf5                      1.10.6          nompi_h6a2412b_1114    conda-forge
icu                       68.1                 h58526e2_0    conda-forge
ilmbase                   2.5.5                h780b84a_0    conda-forge
iniconfig                 1.1.1                    pypi_0    pypi
isl                       0.22.1               he1b5a44_2    conda-forge
islpy                     2021.1           py39h47cf391_0    conda-forge
jbig                      2.1               h7f98852_2003    conda-forge
jemalloc                  5.2.1                h9c3ff4c_5    conda-forge
jpeg                      9d                   h36c2ea0_0    conda-forge
jsoncpp                   1.9.4                h4bd325d_2    conda-forge
jxrlib                    1.1                  h7f98852_2    conda-forge
krb5                      1.19.1               hcc1bbae_0    conda-forge
lame                      3.100             h7f98852_1001    conda-forge
lcms2                     2.12                 hddcbb42_0    conda-forge
ld_impl_linux-64          2.35.1               hea4e1c9_2    conda-forge
lerc                      2.2.1                h9c3ff4c_0    conda-forge
libblas                   3.9.0                9_openblas    conda-forge
libcblas                  3.9.0                9_openblas    conda-forge
libclang-cpp11.1          11.1.0          default_ha53f305_1    conda-forge
libcurl                   7.76.1               h2574ce0_2    conda-forge
libdeflate                1.7                  h7f98852_5    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.3                  h58526e2_2    conda-forge
libflint                  2.7.1           h6307760_nontl_1    conda-forge
libgcc-ng                 9.3.0               h2828fa1_19    conda-forge
libgfortran-ng            9.3.0               hff62375_19    conda-forge
libgfortran5              9.3.0               hff62375_19    conda-forge
libglu                    9.0.0             he1b5a44_1001    conda-forge
libgomp                   9.3.0               h2828fa1_19    conda-forge
libhwloc                  2.4.1                h6746aa3_0    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0                9_openblas    conda-forge
libllvm11                 11.1.0               hf817b99_2    conda-forge
libnetcdf                 4.8.0           nompi_hcd642e3_103    conda-forge
libnghttp2                1.43.0               h812cca2_0    conda-forge
libogg                    1.3.4                h7f98852_1    conda-forge
libopenblas               0.3.15          pthreads_h8fe5266_1    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libraw                    0.20.2               h10796ff_1    conda-forge
libssh2                   1.9.0                ha56f1ee_6    conda-forge
libstdcxx-ng              9.3.0               h6de172a_19    conda-forge
libtheora                 1.1.1             h7f98852_1005    conda-forge
libtiff                   4.3.0                hf544144_1    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
libwebp-base              1.2.0                h7f98852_2    conda-forge
libxcb                    1.13              h7f98852_1003    conda-forge
libxml2                   2.9.12               h72842e0_0    conda-forge
libzip                    1.7.3                h4de3113_0    conda-forge
loguru                    0.5.3            py39hf3d152e_2    conda-forge
loopy                     2021.1                   pypi_0    pypi
lz4-c                     1.9.3                h9c3ff4c_0    conda-forge
mako                      1.1.4              pyh44b312d_0    conda-forge
markupsafe                2.0.1            py39h3811e60_0    conda-forge
meshmode                  2021.2                   pypi_0    pypi
modepy                    2021.2.1                 pypi_0    pypi
mpc                       1.1.0             h04dde30_1009    conda-forge
mpfr                      4.0.2                he80fd80_1    conda-forge
mpmath                    1.2.1              pyhd8ed1ab_0    conda-forge
ncurses                   6.2                  h58526e2_4    conda-forge
nettle                    3.6                  he412f7d_0    conda-forge
numpy                     1.20.3           py39hdbf815f_0    conda-forge
occt                      7.5.2                h7391655_0    conda-forge
ocl-icd                   2.3.0                h7f98852_0    conda-forge
openexr                   2.5.5                hf817b99_0    conda-forge
openh264                  2.1.1                h780b84a_0    conda-forge
openjpeg                  2.4.0                hb52868f_1    conda-forge
openssl                   1.1.1k               h7f98852_0    conda-forge
packaging                 20.9                     pypi_0    pypi
pcre                      8.44                 he1b5a44_0    conda-forge
perl                      5.32.0               h36c2ea0_0    conda-forge
pip                       21.1.1             pyhd8ed1ab_0    conda-forge
pluggy                    0.13.1                   pypi_0    pypi
pocl                      1.6                  h11147fc_4    conda-forge
proj                      7.2.0                h277dcde_2    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pugixml                   1.11.4               h9c3ff4c_0    conda-forge
py                        1.10.0                   pypi_0    pypi
pyfmmlib                  2020.1                   pypi_0    pypi
pymbolic                  2021.1                   pypi_0    pypi
pyopencl                  2021.2.1         py39h5472131_0    conda-forge
pyparsing                 2.4.7                    pypi_0    pypi
pyrsistent                0.17.3                   pypi_0    pypi
pytential                 2020.2                    dev_0    <develop>
pytest                    6.2.4                    pypi_0    pypi
pytest-forked             1.3.0                    pypi_0    pypi
pytest-xdist              2.2.1                    pypi_0    pypi
python                    3.9.4           hffdb5ce_0_cpython    conda-forge
python-symengine          0.7.2            py39h68068d8_0    conda-forge
python_abi                3.9                      1_cp39    conda-forge
pytools                   2021.2.6           pyhd8ed1ab_0    conda-forge
rapidjson                 1.1.0             he1b5a44_1002    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
recursivenodes            0.2.0                    pypi_0    pypi
scipy                     1.6.3            py39hee8e79c_0    conda-forge
setuptools                49.6.0           py39hf3d152e_3    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.35.5               h74cdb3f_0    conda-forge
sumpy                     2020.2b1                 pypi_0    pypi
symengine                 0.7.0                hf1fd44d_1    conda-forge
sympy                     1.8              py39hf3d152e_0    conda-forge
tbb                       2020.2               h4bd325d_4    conda-forge
tbb-devel                 2020.2               h4bd325d_4    conda-forge
tk                        8.6.10               h21135ba_1    conda-forge
toml                      0.10.2                   pypi_0    pypi
tzdata                    2021a                he74cb21_0    conda-forge
utfcpp                    3.2                  ha770c72_0    conda-forge
vtk                       9.0.1           no_osmesa_py39h3e52c05_107    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
x264                      1!161.3030           h7f98852_0    conda-forge
xorg-fixesproto           5.0               h7f98852_1002    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.0.10               h7f98852_0    conda-forge
xorg-libsm                1.2.3             hd9c2040_1000    conda-forge
xorg-libx11               1.7.1                h7f98852_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxfixes            5.0.3             h7f98852_1004    conda-forge
xorg-libxmu               1.1.3                h7f98852_0    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-libxt                1.2.1                h7f98852_2    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zlib                      1.2.11            h516909a_1010    conda-forge
zstd                      1.5.0                ha95c52a_0    conda-forge

Details about conda and system ( conda info ):
$ conda info
     active environment : testing
    active env location : /var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3/envs/testing
            shell level : 1
       user config file : /var/lib/gitlab-runner/.condarc
 populated config files : /var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3/.condarc
          conda version : 4.10.1
    conda-build version : not installed
         python version : 3.9.4.final.0
       virtual packages : __cuda=11.2=0
                          __linux=5.10.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3  (writable)
      conda av data dir : /var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3/etc/conda
  conda av metadata url : https://repo.anaconda.com/pkgs/main
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3/pkgs
                          /var/lib/gitlab-runner/.conda/pkgs
       envs directories : /var/lib/gitlab-runner/builds/zCL2egrE/0/inducer/pytential/.miniforge3/envs
                          /var/lib/gitlab-runner/.conda/envs
               platform : linux-64
             user-agent : conda/4.10.1 requests/2.25.1 CPython/3.9.4 Linux/5.10.0-6-amd64 debian/11 glibc/2.31
                UID:GID : 112:119
             netrc file : None
           offline mode : False
@isuruf
Copy link
Member

isuruf commented May 22, 2021

The issue is that pyfmmlib is created by the system compiler which is gfortran-10 and openblas is by conda compiler which is gfortran-9. Since pyfmmlib doesn't have rpath set, when pyfmmlib gets loaded libgfortran.so.5 is looked up by the rpaths of the python executable which leads to libgfortran.so.5 being loaded from conda prefix.
Would it be possible to use pyfmmlib from conda or install compilers from conda and compile pyfmmlib from that?
Other option is to build gfortran-10 which is on my list of things to do for NumFOCUS SDG.

@inducer
Copy link
Contributor Author

inducer commented May 22, 2021

Huh, good catch. It is building pyfmmlib from source, due to this version bump. I should have checked, I didn't. I just assumed it was the conda package. At any rate, the fix is pretty clear then: just release a new version, get it built for conda, and things should start being OK.

Thanks for your help!

@inducer inducer closed this as completed May 22, 2021
@inducer
Copy link
Contributor Author

inducer commented May 22, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants