conda-forge / pynio-feedstock

A conda-smithy repository for pynio.
BSD 3-Clause "New" or "Revised" License
3 stars 14 forks source link

pynio fails to import with fresh environment on Mac OS X Catalina (undefined symbol error) #85

Open Meteodan opened 4 years ago

Meteodan commented 4 years ago

Issue: On a fresh environment with pynio (i.e. conda env create -n pynio_test pynio, where conda-forge is listed first in the channel priority in .condarc), the following error occurs when attempting to import Nio:

>>> import Nio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ddawson/miniconda3/envs/pynio_test/lib/python3.8/site-packages/PyNIO/Nio.py", line 83, in <module>
    from _nio import *
ImportError: dlopen(/Users/ddawson/miniconda3/envs/pynio_test/lib/python3.8/site-packages/PyNIO/_nio.cpython-38-darwin.so, 2): Symbol not found: _crc32
  Referenced from: /Users/ddawson/miniconda3/envs/pynio_test/lib/libgdal.26.dylib
  Expected in: /Users/ddawson/miniconda3/envs/pynio_test/lib/libcfitsio.8.dylib
 in /Users/ddawson/miniconda3/envs/pynio_test/lib/libgdal.26.dylib


Environment (conda list):

``` $ conda list # packages in environment at /Users/ddawson/miniconda3/envs/pynio_test: # # Name Version Build Channel boost-cpp 1.72.0 hdf9ef73_0 conda-forge bzip2 1.0.8 h0b31af3_2 conda-forge ca-certificates 2020.4.5.1 hecc5488_0 conda-forge cairo 1.16.0 hec6a9b0_1003 conda-forge certifi 2020.4.5.1 py38h32f6830_0 conda-forge cfitsio 3.470 h35c4aa5_3 conda-forge curl 7.69.1 h2d98d24_0 conda-forge expat 2.2.9 h4a8c4bd_2 conda-forge fontconfig 2.13.1 h6b1039f_1001 conda-forge freetype 2.10.1 h8da9a1a_0 conda-forge freexl 1.0.5 h1de35cc_1002 conda-forge g2clib 1.6.0 h4e57d6e_9 conda-forge geos 3.8.1 h4a8c4bd_0 conda-forge geotiff 1.5.1 hd8796ba_10 conda-forge gettext 0.19.8.1 h46ab8bc_1002 conda-forge giflib 5.2.1 h0b31af3_2 conda-forge glib 2.64.2 h577aef8_0 conda-forge hdf4 4.2.13 h84186c3_1003 conda-forge hdf5 1.10.5 nompi_h3e39495_1104 conda-forge hdfeos2 2.20 h207910d_1000 conda-forge hdfeos5 5.1.16 h60f75e3_5 conda-forge icu 64.2 h6de7cb9_1 conda-forge jasper 1.900.1 h636a363_1006 conda-forge jpeg 9c h1de35cc_1001 conda-forge json-c 0.13.1 h1de35cc_1001 conda-forge kealib 1.4.13 h2324030_0 conda-forge krb5 1.17.1 h1752a42_0 conda-forge libblas 3.8.0 16_openblas conda-forge libcblas 3.8.0 16_openblas conda-forge libcurl 7.69.1 hc0b9707_0 conda-forge libcxx 10.0.0 h1af66ff_2 conda-forge libdap4 3.20.6 h8c15375_0 conda-forge libedit 3.1.20170329 hcfe32e1_1001 conda-forge libffi 3.2.1 h4a8c4bd_1007 conda-forge libgdal 3.0.4 ha92c1e4_6 conda-forge libgfortran 4.0.0 2 conda-forge libiconv 1.15 h0b31af3_1006 conda-forge libkml 1.3.0 h169b8f9_1011 conda-forge liblapack 3.8.0 16_openblas conda-forge libnetcdf 4.7.4 nompi_he461dc0_101 conda-forge libopenblas 0.3.9 h3d69b6c_0 conda-forge libpng 1.6.37 hbbe82c9_1 conda-forge libpq 12.2 h489d428_1 conda-forge libspatialite 4.3.0a h658e6c1_1038 conda-forge libssh2 1.8.2 hcdc9a53_2 conda-forge libtiff 4.1.0 h2ae36a8_6 conda-forge libuuid 2.32.1 h1de35cc_1000 conda-forge libwebp-base 1.1.0 h0b31af3_3 conda-forge libxml2 2.9.10 h53d96d6_0 conda-forge llvm-openmp 10.0.0 h28b9765_0 conda-forge lz4-c 1.9.2 h4a8c4bd_0 conda-forge ncurses 6.1 h0a44026_1002 conda-forge numpy 1.18.1 py38h1f821a2_1 conda-forge openjpeg 2.3.1 h254dc36_3 conda-forge openssl 1.1.1g h0b31af3_0 conda-forge pcre 8.44 h4a8c4bd_0 conda-forge pip 20.0.2 py_2 conda-forge pixman 0.38.0 h01d97ff_1003 conda-forge poppler 0.67.0 h16886b5_8 conda-forge poppler-data 0.4.9 1 conda-forge postgresql 12.2 h62ab893_1 conda-forge proj 7.0.0 hbce2d5c_3 conda-forge pynio 1.5.5 py38h97f92f9_12 conda-forge python 3.8.2 hd5f0129_7_cpython conda-forge python_abi 3.8 1_cp38 conda-forge readline 8.0 hcfe32e1_0 conda-forge setuptools 46.1.3 py38h32f6830_0 conda-forge sqlite 3.30.1 h93121df_0 conda-forge tbb 2018.0.5 h2d50403_0 conda-forge tiledb 1.7.7 h84aa2a7_1 conda-forge tk 8.6.10 hbbe82c9_0 conda-forge tzcode 2020a h0b31af3_0 conda-forge wheel 0.34.2 py_1 conda-forge xerces-c 3.2.2 h8f8adb3_1004 conda-forge xz 5.2.5 h0b31af3_0 conda-forge zlib 1.2.11 h0b31af3_1006 conda-forge zstd 1.4.4 h4b3e974_3 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : pynio_test active env location : /Users/ddawson/miniconda3/envs/pynio_test shell level : 3 user config file : /Users/ddawson/.condarc populated config files : /Users/ddawson/.condarc conda version : 4.8.3 conda-build version : not installed python version : 3.7.3.final.0 virtual packages : __osx=10.15.4 base environment : /Users/ddawson/miniconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://conda.anaconda.org/ncar/osx-64 https://conda.anaconda.org/ncar/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/ddawson/miniconda3/pkgs /Users/ddawson/.conda/pkgs envs directories : /Users/ddawson/miniconda3/envs /Users/ddawson/.conda/envs platform : osx-64 user-agent : conda/4.8.3 requests/2.23.0 CPython/3.7.3 Darwin/19.4.0 OSX/10.15.4 UID:GID : 501:20 netrc file : None offline mode : False ```
Meteodan commented 4 years ago

Digging into this a bit more, it looks like the cfitsio feedstock was just updated earlier today: https://github.com/conda-forge/cfitsio-feedstock/commit/a9401dd610235390ef045349eb543e51187d9187

This changed something about zlib (I'm a noob, so I don't know what "unvendoring" means); I wonder if this is the culprit. To test, I rebuilt my test environment and pinned the previous build of cfitsio:

conda create -n pynio_test cfitsio=3.470=hb33e7b4_2 pynio

This time, Nio imported with no errors. So this might be a workaround.

fulminemizzega commented 2 years ago

Hello @Meteodan, can you test and see if this issue is still relevant? (I do not have access to a macOS environment)