Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

undefined symbol error via libgdal.so.20 #58

Closed
pmspire opened this issue Jan 18, 2019 · 17 comments
Closed

undefined symbol error via libgdal.so.20 #58

pmspire opened this issue Jan 18, 2019 · 17 comments

Comments

@pmspire
Copy link

pmspire commented Jan 18, 2019

Issue:

~ % conda create -y -n pynio -c conda-forge --override-channels pynio >out 2>&1
~ % conda activate pynio
(pynio) ~ % python -c 'import Nio'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/pmadden/miniconda/envs/pynio/lib/python3.6/site-packages/PyNIO/Nio.py", line 83, in <module>
    from _nio import *
ImportError: /home/pmadden/miniconda/envs/pynio/lib/python3.6/site-packages/PyNIO/../../../libgdal.so.20: undefined symbol: _ZN6libdap3DDSC1EPNS_15BaseTypeFactoryERKSs
(pynio) ~ %

Environment (conda list):
(pynio) ~ % conda list
# packages in environment at /home/pmadden/miniconda/envs/pynio:
#
# Name                    Version                   Build  Channel
blas                      1.1                    openblas    conda-forge
boost-cpp                 1.68.0            h11c811c_1000    conda-forge
bzip2                     1.0.6             h14c3975_1002    conda-forge
ca-certificates           2018.11.29           ha4d7672_0    conda-forge
cairo                     1.14.12           h80bd089_1005    conda-forge
certifi                   2018.11.29            py36_1000    conda-forge
curl                      7.63.0            h646f8bb_1000    conda-forge
expat                     2.2.5             hf484d3e_1002    conda-forge
fontconfig                2.13.1            h2176d3f_1000    conda-forge
freetype                  2.9.1             h3cfcefd_1004    conda-forge
freexl                    1.0.5             h14c3975_1002    conda-forge
g2clib                    1.6.0                         3    conda-forge
geos                      3.6.2                hfc679d8_4    conda-forge
geotiff                   1.4.2             hfe6da40_1005    conda-forge
gettext                   0.19.8.1          h9745a5d_1001    conda-forge
giflib                    5.1.4             h14c3975_1001    conda-forge
glib                      2.56.2            had28632_1001    conda-forge
hdf4                      4.2.13            h9a582f1_1002    conda-forge
hdf5                      1.10.2               hc401514_3    conda-forge
hdfeos2                   2.20                 h7a90ae3_0    conda-forge
hdfeos5                   5.1.16               h647bee3_2    conda-forge
icu                       58.2              hf484d3e_1000    conda-forge
jasper                    1.900.1           h07fcdf6_1005    conda-forge
jpeg                      9c                h14c3975_1001    conda-forge
json-c                    0.12.1               h470a237_1    conda-forge
kealib                    1.4.9                h0bee7d0_2    conda-forge
krb5                      1.16.3            hc83ff2d_1000    conda-forge
libcurl                   7.63.0            h01ee5af_1000    conda-forge
libdap4                   3.19.1            hd48c02d_1000    conda-forge
libedit                   3.1.20170329      hf8c457e_1001    conda-forge
libffi                    3.2.1             hf484d3e_1005    conda-forge
libgcc-ng                 7.3.0                hdf63c60_0    conda-forge
libgdal                   2.2.4                hbd6f514_9    conda-forge
libgfortran               3.0.0                         1    conda-forge
libgfortran-ng            7.2.0                hdf63c60_3    conda-forge
libiconv                  1.15              h14c3975_1004    conda-forge
libkml                    1.3.0             h328b03d_1009    conda-forge
libnetcdf                 4.6.1              h628ed10_200    conda-forge
libpng                    1.6.36            h84994c4_1000    conda-forge
libpq                     10.6              h13b8bad_1000    conda-forge
libspatialite             4.3.0a            h9968ff2_1023    conda-forge
libssh2                   1.8.0             h1ad7b7a_1003    conda-forge
libstdcxx-ng              7.3.0                hdf63c60_0    conda-forge
libtiff                   4.0.10            h648cc4a_1001    conda-forge
libuuid                   2.32.1            h14c3975_1000    conda-forge
libxcb                    1.13              h14c3975_1002    conda-forge
libxml2                   2.9.8             h143f9aa_1005    conda-forge
ncurses                   6.1               hf484d3e_1002    conda-forge
numpy                     1.16.0          py36_blas_openblash1522bff_1000  [blas_openblas]  conda-forge
openblas                  0.3.3             h9ac9557_1001    conda-forge
openjpeg                  2.3.0             hf38bd82_1003    conda-forge
openssl                   1.0.2p            h14c3975_1002    conda-forge
pcre                      8.41              hf484d3e_1003    conda-forge
pip                       18.1                  py36_1000    conda-forge
pixman                    0.34.0            h14c3975_1003    conda-forge
poppler                   0.67.0            h2fc8fa2_1002    conda-forge
poppler-data              0.4.9                         1    conda-forge
postgresql                10.6              h66cca7a_1000    conda-forge
proj4                     4.9.3                h470a237_8    conda-forge
pthread-stubs             0.4               h14c3975_1001    conda-forge
pynio                     1.5.4            py36h36f4ed2_0    conda-forge
python                    3.6.7             hd21baee_1001    conda-forge
readline                  7.0               hf8c457e_1001    conda-forge
setuptools                40.6.3                   py36_0    conda-forge
sqlite                    3.26.0            h67949de_1000    conda-forge
tk                        8.6.9             h84994c4_1000    conda-forge
tzcode                    2018g             h14c3975_1001    conda-forge
wheel                     0.32.3                   py36_0    conda-forge
xerces-c                  3.2.0                h5d6a6da_2    conda-forge
xorg-kbproto              1.0.7             h14c3975_1002    conda-forge
xorg-libice               1.0.9             h14c3975_1004    conda-forge
xorg-libsm                1.2.3             h4937e3b_1000    conda-forge
xorg-libx11               1.6.6             h14c3975_1000    conda-forge
xorg-libxau               1.0.8             h14c3975_1006    conda-forge
xorg-libxdmcp             1.1.2             h14c3975_1007    conda-forge
xorg-libxext              1.3.3             h14c3975_1004    conda-forge
xorg-libxrender           0.9.10            h14c3975_1002    conda-forge
xorg-renderproto          0.11.1            h14c3975_1002    conda-forge
xorg-xextproto            7.3.0             h14c3975_1002    conda-forge
xorg-xproto               7.0.31            h14c3975_1007    conda-forge
xz                        5.2.4             h14c3975_1001    conda-forge
zlib                      1.2.11            h14c3975_1004    conda-forge

Details about conda and system ( conda info ):
(pynio) ~ % conda info

     active environment : pynio
    active env location : /home/pmadden/miniconda/envs/pynio
            shell level : 1
       user config file : /home/pmadden/.condarc
 populated config files : 
          conda version : 4.5.12
    conda-build version : 3.17.7
         python version : 3.7.2.final.0
       base environment : /home/pmadden/miniconda  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/linux-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /home/pmadden/miniconda/pkgs
                          /home/pmadden/.conda/pkgs
       envs directories : /home/pmadden/miniconda/envs
                          /home/pmadden/.conda/envs
               platform : linux-64
             user-agent : conda/4.5.12 requests/2.21.0 CPython/3.7.2 Linux/4.15.0-43-generic ubuntu/18.04 glibc/2.27
                UID:GID : 1000:1000
             netrc file : /home/pmadden/.netrc
           offline mode : False
@ocefpaf
Copy link
Member

ocefpaf commented Jan 18, 2019

Note that pynio was not migrated to the new compilers b/c it depends on hdfeos2 and hdfeos5 and both are still pending due to compilation errors. See conda-forge/hdfeos5-feedstock#22 and conda-forge/hdfeos2-feedstock#18

B/c of that you may need to install the old version compiled with the old compilers. Try:

conda create --name PYNIO --channel conda-forge/label/cf201901 pynio
conda activate PYNIO
python -c 'import Nio'

@pmspire
Copy link
Author

pmspire commented Jan 18, 2019

Thanks for the workaround, @ocefpaf -- I can confirm that it works for me. Your support is, as always, much appreciated.

@ocefpaf
Copy link
Member

ocefpaf commented Jan 18, 2019

Thanks for the workaround, @ocefpaf -- I can confirm that it works for me. Your support is, as always, much appreciated.

Note that as soon as we "fix" hdfeos you can drop that workaround and use the packages with the new compilers. (It may take a while though...)

Leaving this open so other can find it.

@jhamman
Copy link
Member

jhamman commented Feb 4, 2019

@ocefpaf - we're running into this problem with xarray's ci system too. It looks like the hdfeos issues have been fixed. Does that mean pynio can be rebuilt with the new compilers now?

@ocefpaf
Copy link
Member

ocefpaf commented Feb 4, 2019

@ocefpaf - we're running into this problem with xarray's ci system too. It looks like the hdfeos issues have been fixed. Does that mean pynio can be rebuilt with the new compilers now?

Let me check, maybe there are other package that are missing. (The PR should happen automatically so we are either missing a package or the bot is nor working properly.)

@ocefpaf
Copy link
Member

ocefpaf commented Feb 4, 2019

Found the missing package, it was g2clib, a PR to pynio should follow soon.

@ocefpaf ocefpaf mentioned this issue Feb 4, 2019
@xiang-yu
Copy link

I still got the same error even following the procedures below,

$ conda create --name PYNIO --channel conda-forge/label/cf201901 pynio
$ conda activate PYNIO
$ python -c 'import Nio'

$ ipython
In [1]: import Nio

ImportError Traceback (most recent call last)
in
----> 1 import Nio

~/anaconda3/lib/python3.6/site-packages/PyNIO/Nio.py in
81 '''
82 from future import print_function
---> 83 from _nio import *
84
85 #

ImportError: /home/xyli/anaconda3/lib/python3.6/site-packages/PyNIO/../../../libgdal.so.20: undefined symbol: _ZN6libdap3DDSC1EPNS_15BaseTypeFactoryERKSs

Any idea about how to fix this?

@ocefpaf
Copy link
Member

ocefpaf commented Mar 14, 2019

I believe that the compilation of pynio with the new compilers is done. First ensure that you have conda-forge on top of defaults in your .condarc and activate the strict channel option:

conda config --set channel_priority strict
conda config --add channels conda-forge

then do,

conda create --name PYNIO --channel conda-forge pynio
conda activate PYNIO
python -c 'import Nio'

@xiang-yu
Copy link

Thanks a lot.

I got the following error after
$ python -c 'import Nio'
ImportError: libnsl.so.1: cannot open shared object file: No such file or directory

@ocefpaf
Copy link
Member

ocefpaf commented Mar 14, 2019

Can you post the conda list of that env? The command did work for me.

@xiang-yu
Copy link

$ conda list PYNIO

packages in environment at /home/xyli/anaconda3:

Name Version Build Channel

pynio 1.5.4 py36h36f4ed2_0 conda-forge/label/cf201901

@ocefpaf
Copy link
Member

ocefpaf commented Mar 14, 2019

pynio 1.5.4 py36h36f4ed2_0 conda-forge/label/cf201901

That is still the package from the cf201901 label. Like I said above the compilation problems that forced us to use that label are gone.

Can you try the commands in #58 (comment) and install it from the main label instead.

@xiang-yu
Copy link

$ conda create --name PYNIO --channel conda-forge pynio
$ conda activate PYNIO
$ python -c 'import Nio'
Traceback (most recent call last):
File "", line 1, in
File "/home/xyli/anaconda3/envs/PYNIO/lib/python3.7/site-packages/PyNIO/Nio.py", line 83, in
from _nio import *
ImportError: libnsl.so.1: cannot open shared object file: No such file or directory

$ conda list PYNIO

packages in environment at /home/xyli/anaconda3/envs/PYNIO:

Name Version Build Channel

pynio 1.5.5 py37h8b983ae_0 conda-forge

@ocefpaf
Copy link
Member

ocefpaf commented Mar 15, 2019

Did you do the first two steps?

@xiang-yu
Copy link

Thanks.
Yes.
$ conda config --set channel_priority strict
$ conda config --add channels conda-forge

@ocefpaf
Copy link
Member

ocefpaf commented Mar 15, 2019

I cannot reproduce that error locally. It would be helpful if you list all the files in conda list instead of just pynio.

@ycherrq
Copy link

ycherrq commented Apr 1, 2019

Note that pynio was not migrated to the new compilers b/c it depends on hdfeos2 and hdfeos5 and both are still pending due to compilation errors. See conda-forge/hdfeos5-feedstock#22 and conda-forge/hdfeos2-feedstock#18

B/c of that you may need to install the old version compiled with the old compilers. Try:

conda create --name PYNIO --channel conda-forge/label/cf201901 pynio
conda activate PYNIO
python -c 'import Nio'

@conda-forge conda-forge locked and limited conversation to collaborators Apr 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants