conda-forge / gdal-feedstock

A conda-smithy repository for gdal.
BSD 3-Clause "New" or "Revised" License
30 stars 63 forks source link

gdal fails to load with libcurl undefined symbol #169

Closed microe closed 7 years ago

microe commented 7 years ago

I have a conda environment for my project, it has the latest gdal package installed into it. When I try to import the gdal module, it fails on an undefined symbol in libcurl.

    import msp
  File "build/bdist.linux-x86_64/egg/msp/__init__.py", line 9, in <module>
    Modules
  File "build/bdist.linux-x86_64/egg/msp/image.py", line 14, in <module>
  File "/work/ehovland/anaconda/4.3.0-py36/envs/msp_py27/lib/python2.7/site-packages/osgeo/__init__.py", line 21, in <module>
    _gdal = swig_import_helper()
  File "/work/ehovland/anaconda/4.3.0-py36/envs/msp_py27/lib/python2.7/site-packages/osgeo/__init__.py", line 17, in swig_import_helper
    _mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: /work/ehovland/anaconda/4.3.0-py36/envs/msp_py27/lib/python2.7/site-packages/osgeo/../../.././libcurl.so.4: undefined symbol: SSL_CTX_set_alpn_protos

I can import the module in ipython just fine:

In [1]: import msp

In [2]: from osgeo import gdal

In [3]:

I can run tests on my custom module (msp) without problems.

I have openssl installed into my environment:

gdal                      2.2.1               np113py27_0    conda-forge
libgdal                   2.2.1                         2    conda-forge
curl                      7.54.1                        0    conda-forge
openssl                   1.0.2l                        0    conda-forge

The openssl build has that symbol:

000000000004a250 g     F .text  000000000000005b              SSL_CTX_set_alpn_protos

The libcurl library is linked to that library:

libssl.so.1.0.0 => /work/ehovland/anaconda/4.3.0-py36/envs/msp_py27/lib/./libssl.so.1.0.0 (0x00007f58c7132000)

I have updated my environment to conda-forge latest using the suggestion in a previous issue.

Any help is much appreciated.

ocefpaf commented 7 years ago

Can you try it from a clean environment?

conda create --yes -n TEST gdal python=2.7
source activate TEST
python -c "from osgeo import gdal; print(dir(gdal))"

Also please send the results from conda list and conda info for that environment.

PS: I cannot reproduce it locally.

microe commented 7 years ago

I am not at all surprised that you cannot reproduce. My environment is a bit pathological. Listing at the bottom.

(TEST) ehovland@<host>:scenic$python -c "from osgeo import gdal; print(dir(gdal))"
['AllRegister', 'ApplyGeoTransform', 'ApplyVerticalShiftGrid', 'AsyncReader', 'AsyncReader_swigregister', 'AutoCreateWarpedVRT', 'Band', 'Band_swigregister', 'BuildVRT', 'BuildVRTInternalNames', 'BuildVRTInternalObjects', 'BuildVRTOptions', 'CE_Debug', 'CE_Failure', 'CE_Fatal', 'CE_None', 'CE_Warning', 'CPLBinaryToHex', 'CPLES_BackslashQuotable', 'CPLES_CSV', 'CPLES_SQL', 'CPLES_URL', 'CPLES_XML', 'CPLE_AppDefined', 'CPLE_AssertionFailed', 'CPLE_FileIO', 'CPLE_IllegalArg', 'CPLE_NoWriteAccess', 'CPLE_None', 'CPLE_NotSupported', 'CPLE_OpenFailed', 'CPLE_OutOfMemory', 'CPLE_UserInterrupt', 'CPLHexToBinary', 'CXT_Attribute', 'CXT_Comment', 'CXT_Element', 'CXT_Literal', 'CXT_Text', 'ColorEntry', 'ColorEntry_swigregister', 'ColorTable', 'ColorTable_swigregister', 'ComputeMedianCutPCT', 'ComputeProximity', 'ContourGenerate', 'CreatePansharpenedVRT', 'DCAP_CREATE', 'DCAP_CREATECOPY', 'DCAP_DEFAULT_FIELDS', 'DCAP_NOTNULL_FIELDS', 'DCAP_NOTNULL_GEOMFIELDS', 'DCAP_OPEN', 'DCAP_RASTER', 'DCAP_VECTOR', 'DCAP_VIRTUALIO', 'DEMProcessing', 'DEMProcessingInternal', 'DEMProcessingOptions', 'DMD_CONNECTION_PREFIX', 'DMD_CREATIONDATATYPES', 'DMD_CREATIONFIELDDATATYPES', 'DMD_CREATIONOPTIONLIST', 'DMD_EXTENSION', 'DMD_EXTENSIONS', 'DMD_HELPTOPIC', 'DMD_LONGNAME', 'DMD_MIMETYPE', 'DMD_SUBDATASETS', 'DataTypeIsComplex', 'Dataset', 'Dataset_swigregister', 'Debug', 'DecToDMS', 'DecToPackedDMS', 'DitherRGB2PCT', 'DontUseExceptions', 'Driver', 'Driver_swigregister', 'Error', 'ErrorReset', 'EscapeString', 'FPolygonize', 'FileFromMemBuffer', 'FillNodata', 'FindFile', 'FinderClean', 'GARIO_COMPLETE', 'GARIO_ERROR', 'GARIO_PENDING', 'GARIO_UPDATE', 'GA_ReadOnly', 'GA_Update', 'GCI_AlphaBand', 'GCI_BlackBand', 'GCI_BlueBand', 'GCI_CyanBand', 'GCI_GrayIndex', 'GCI_GreenBand', 'GCI_HueBand', 'GCI_LightnessBand', 'GCI_MagentaBand', 'GCI_PaletteIndex', 'GCI_RedBand', 'GCI_SaturationBand', 'GCI_Undefined', 'GCI_YCbCr_CbBand', 'GCI_YCbCr_CrBand', 'GCI_YCbCr_YBand', 'GCI_YellowBand', 'GCP', 'GCP_swigregister', 'GCPsToGeoTransform', 'GDALBuildVRTOptions', 'GDALBuildVRTOptions_swigregister', 'GDALDEMProcessingOptions', 'GDALDEMProcessingOptions_swigregister', 'GDALDestroyDriverManager', 'GDALGridOptions', 'GDALGridOptions_swigregister', 'GDALInfoOptions', 'GDALInfoOptions_swigregister', 'GDALNearblackOptions', 'GDALNearblackOptions_swigregister', 'GDALRasterizeOptions', 'GDALRasterizeOptions_swigregister', 'GDALTranslateOptions', 'GDALTranslateOptions_swigregister', 'GDALVectorTranslateOptions', 'GDALVectorTranslateOptions_swigregister', 'GDALWarpAppOptions', 'GDALWarpAppOptions_swigregister', 'GDAL_DATA_COVERAGE_STATUS_DATA', 'GDAL_DATA_COVERAGE_STATUS_EMPTY', 'GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED', 'GDAL_GCP_GCPLine_get', 'GDAL_GCP_GCPLine_set', 'GDAL_GCP_GCPPixel_get', 'GDAL_GCP_GCPPixel_set', 'GDAL_GCP_GCPX_get', 'GDAL_GCP_GCPX_set', 'GDAL_GCP_GCPY_get', 'GDAL_GCP_GCPY_set', 'GDAL_GCP_GCPZ_get', 'GDAL_GCP_GCPZ_set', 'GDAL_GCP_Id_get', 'GDAL_GCP_Id_set', 'GDAL_GCP_Info_get', 'GDAL_GCP_Info_set', 'GDT_Byte', 'GDT_CFloat32', 'GDT_CFloat64', 'GDT_CInt16', 'GDT_CInt32', 'GDT_Float32', 'GDT_Float64', 'GDT_Int16', 'GDT_Int32', 'GDT_TypeCount', 'GDT_UInt16', 'GDT_UInt32', 'GDT_Unknown', 'GFT_Integer', 'GFT_Real', 'GFT_String', 'GFU_Alpha', 'GFU_AlphaMax', 'GFU_AlphaMin', 'GFU_Blue', 'GFU_BlueMax', 'GFU_BlueMin', 'GFU_Generic', 'GFU_Green', 'GFU_GreenMax', 'GFU_GreenMin', 'GFU_Max', 'GFU_MaxCount', 'GFU_Min', 'GFU_MinMax', 'GFU_Name', 'GFU_PixelCount', 'GFU_Red', 'GFU_RedMax', 'GFU_RedMin', 'GF_Read', 'GF_Write', 'GMF_ALL_VALID', 'GMF_ALPHA', 'GMF_NODATA', 'GMF_PER_DATASET', 'GOA2GetAccessToken', 'GOA2GetAuthorizationURL', 'GOA2GetRefreshToken', 'GPI_CMYK', 'GPI_Gray', 'GPI_HLS', 'GPI_RGB', 'GRA_Average', 'GRA_Bilinear', 'GRA_Cubic', 'GRA_CubicSpline', 'GRA_Lanczos', 'GRA_Mode', 'GRA_NearestNeighbour', 'GRIORA_Average', 'GRIORA_Bilinear', 'GRIORA_Cubic', 'GRIORA_CubicSpline', 'GRIORA_Gauss', 'GRIORA_Lanczos', 'GRIORA_Mode', 'GRIORA_NearestNeighbour', 'GTO_BIT', 'GTO_BSQ', 'GTO_TIP', 'GeneralCmdLineProcessor', 'GetCacheMax', 'GetCacheUsed', 'GetColorInterpretationName', 'GetConfigOption', 'GetDataTypeByName', 'GetDataTypeName', 'GetDataTypeSize', 'GetDriver', 'GetDriverByName', 'GetDriverCount', 'GetJPEG2000Structure', 'GetJPEG2000StructureAsString', 'GetLastErrorMsg', 'GetLastErrorNo', 'GetLastErrorType', 'GetPaletteInterpretationName', 'GetUseExceptions', 'Grid', 'GridInternal', 'GridOptions', 'HasThreadSupport', 'IdentifyDriver', 'IdentifyDriverEx', 'Info', 'InfoInternal', 'InfoOptions', 'InvGeoTransform', 'MajorObject', 'MajorObject_swigregister', 'Mkdir', 'Nearblack', 'NearblackOptions', 'OF_ALL', 'OF_GNM', 'OF_RASTER', 'OF_READONLY', 'OF_SHARED', 'OF_UPDATE', 'OF_VECTOR', 'OF_VERBOSE_ERROR', 'Open', 'OpenEx', 'OpenShared', 'PackedDMSToDec', 'ParseCommandLine', 'ParseXMLString', 'Polygonize', 'PopErrorHandler', 'PopFinderLocation', 'PushErrorHandler', 'PushFinderLocation', 'RGBFile2PCTFile', 'RasterAttributeTable', 'RasterAttributeTable_swigregister', 'Rasterize', 'RasterizeLayer', 'RasterizeOptions', 'ReadDir', 'ReadDirRecursive', 'RegenerateOverview', 'RegenerateOverviews', 'Rename', 'ReprojectImage', 'Rmdir', 'SerializeXMLTree', 'SetCacheMax', 'SetConfigOption', 'SetErrorHandler', 'SieveFilter', 'StatBuf', 'StatBuf_swigregister', 'TermProgress', 'TermProgress_nocb', 'Transformer', 'Transformer_swigregister', 'Translate', 'TranslateInternal', 'TranslateOptions', 'Unlink', 'UseExceptions', 'VSICurlClearCache', 'VSIFCloseL', 'VSIFGetRangeStatusL', 'VSIFOpenExL', 'VSIFOpenL', 'VSIFReadL', 'VSIFSeekL', 'VSIFTellL', 'VSIFTruncateL', 'VSIFWriteL', 'VSIGetLastErrorMsg', 'VSIGetLastErrorNo', 'VSIStatL', 'VSISupportsSparseFiles', 'VSI_RANGE_STATUS_DATA', 'VSI_RANGE_STATUS_HOLE', 'VSI_RANGE_STATUS_UNKNOWN', 'VSI_STAT_EXISTS_FLAG', 'VSI_STAT_NATURE_FLAG', 'VSI_STAT_SIZE_FLAG', 'VectorTranslate', 'VectorTranslateOptions', 'VersionInfo', 'VirtualMem', 'VirtualMem_swigregister', 'Warp', 'WarpOptions', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__version__', '_gdal', '_is_str_or_unicode', '_newclass', '_object', '_swig_getattr', '_swig_getattr_nondynamic', '_swig_property', '_swig_repr', '_swig_setattr', '_swig_setattr_nondynamic', 'array_modes', 'byteorders', 'deprecation_warn', 'gdalconst', 'have_warned', 'ogr', 'osr', 'sys', 'wrapper_GDALNearblackDestDS', 'wrapper_GDALNearblackDestName', 'wrapper_GDALRasterizeDestDS', 'wrapper_GDALRasterizeDestName', 'wrapper_GDALVectorTranslateDestDS', 'wrapper_GDALVectorTranslateDestName', 'wrapper_GDALWarpDestDS', 'wrapper_GDALWarpDestName']
# packages in environment at /work/ehovland/anaconda/4.3.0-py36/envs/TEST:
#
ca-certificates           2017.7.27.1                   0    conda-forge
certifi                   2017.7.27.1              py27_0    conda-forge
curl                      7.54.1                        0    conda-forge
expat                     2.2.1                         0    conda-forge
freexl                    1.0.2                         2    conda-forge
gdal                      2.2.1               np113py27_0    conda-forge
geos                      3.5.1                         1    conda-forge
giflib                    5.1.4                         0    conda-forge
hdf4                      4.2.12                        0    conda-forge
hdf5                      1.8.18                        0    conda-forge
icu                       58.1                          1    conda-forge
jpeg                      9b                            0    conda-forge
json-c                    0.12.1                        0    conda-forge
kealib                    1.4.7                         2    conda-forge
krb5                      1.14.2                        0    conda-forge
libdap4                   3.18.3                        2    conda-forge
libgdal                   2.2.1                         0    conda-forge
libgfortran               3.0.0                         1  
libiconv                  1.14                          4    conda-forge
libnetcdf                 4.4.1.1                       5    conda-forge
libpng                    1.6.28                        0    conda-forge
libpq                     9.6.3                         0    conda-forge
libspatialite             4.3.0a                       15    conda-forge
libssh2                   1.8.0                         1    conda-forge
libtiff                   4.0.6                         7    conda-forge
libxml2                   2.9.4                         4    conda-forge
mkl                       2017.0.3                      0  
ncurses                   5.9                          10    conda-forge
numpy                     1.13.1                   py27_0  
openjpeg                  2.1.2                         3    conda-forge
openssl                   1.0.2l                        0    conda-forge
pip                       9.0.1                    py27_0    conda-forge
proj4                     4.9.3                         4    conda-forge
python                    2.7.13                        1    conda-forge
readline                  6.2                           0    conda-forge
setuptools                36.2.2                   py27_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        2    conda-forge
util-linux                2.21                          0  
wheel                     0.29.0                   py27_0    conda-forge
xerces-c                  3.1.4                         3    conda-forge
xz                        5.2.2                         0    conda-forge
zlib                      1.2.11                        0    conda-forge
(TEST) ehovland@<host>:scenic$conda info
Current conda install:

               platform : linux-64
          conda version : 4.3.22
       conda is private : False
      conda-env version : 4.3.22
    conda-build version : 2.1.17
         python version : 3.6.1.final.0
       requests version : 2.14.2
       root environment : /work/ehovland/anaconda/4.3.0-py36  (writable)
    default environment : /work/ehovland/anaconda/4.3.0-py36/envs/TEST
       envs directories : /work/ehovland/anaconda/4.3.0-py36/envs
                          /home/ehovland/.conda/envs
          package cache : /work/ehovland/anaconda/4.3.0-py36/pkgs
                          /home/ehovland/.conda/pkgs
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.continuum.io/pkgs/free/linux-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/linux-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/linux-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : /home/ehovland/.condarc
             netrc file : None
           offline mode : False
             user-agent : conda/4.3.22 requests/2.14.2 CPython/3.6.1 Linux/4.4.0-78-generic debian/stretch/sid glibc/2.23

conda list for the environment where it is failing:

ehovland@<host>:scenic$conda list -n msp_py27
# packages in environment at /work/ehovland/anaconda/4.3.0-py36/envs/msp_py27:
#
asn1crypto                0.22.0                   py27_0    conda-forge
astroid                   1.5.3                    py27_0    conda-forge
backports.functools_lru_cache 1.3                      py27_0    conda-forge
backports.shutil_get_terminal_size 1.0.0                    py27_1    conda-forge
backports_abc             0.5                      py27_0    conda-forge
bcrypt                    3.1.3                    py27_0  
bkcharts                  0.2                      py27_0    conda-forge
blas                      1.1                    openblas    conda-forge
bokeh                     0.12.6                   py27_0    conda-forge
boost                     1.64.0                   py27_3    conda-forge
boost-cpp                 1.64.0                        1    conda-forge
bzip2                     1.0.6                         1    conda-forge
ca-certificates           2017.7.27.1                   0    conda-forge
cairo                     1.14.6                        4    conda-forge
certifi                   2017.7.27.1              py27_0    conda-forge
cffi                      1.10.0                   py27_0    conda-forge
chardet                   3.0.2                    py27_1    conda-forge
click                     6.7                      py27_0    conda-forge
cloudpickle               0.3.1                    py27_0    conda-forge
configparser              3.5.0                    py27_0    conda-forge
coverage                  4.4.1                    py27_0    conda-forge
cryptography              1.9                      py27_0    conda-forge
curl                      7.54.1                        0    conda-forge
cycler                    0.10.0                   py27_0    conda-forge
dask                      0.15.1                   py27_0    conda-forge
dbus                      1.10.10                       3    conda-forge
decorator                 4.1.2                    py27_0    conda-forge
distributed               1.18.0                   py27_0    conda-forge
eigen                     3.3.3                         0    conda-forge
enum34                    1.1.6                    py27_1    conda-forge
expat                     2.1.0                         3    conda-forge
fftw                      3.3.6                         2    conda-forge
flake8                    3.3.0                    py27_0    conda-forge
fontconfig                2.12.1                        4    conda-forge
freetype                  2.7                           1    conda-forge
freexl                    1.0.2                         2    conda-forge
functools32               3.2.3.2                  py27_1    conda-forge
futures                   3.0.5                    py27_0    conda-forge
gdal                      2.2.1               np113py27_0    conda-forge
geos                      3.5.1                         1    conda-forge
gettext                   0.19.7                        1    conda-forge
giflib                    5.1.4                         0    conda-forge
glib                      2.51.4                        0    conda-forge
glog                      0.3.5                         0    conda-forge
gst-plugins-base          1.8.0                         0    conda-forge
gstreamer                 1.8.0                         2    conda-forge
gtest                     1.8.0                         0    conda-forge
hdf4                      4.2.12                        0    conda-forge
hdf5                      1.8.18                        0    conda-forge
heapdict                  1.0.0                    py27_0    conda-forge
icu                       58.1                          1    conda-forge
idna                      2.5                      py27_0    conda-forge
imageio                   2.2.0                    py27_0    conda-forge
ipaddress                 1.0.18                   py27_0    conda-forge
ipython                   5.4.1                    py27_0    conda-forge
ipython_genutils          0.2.0                    py27_0    conda-forge
isort                     4.2.9                    py27_0    conda-forge
jinja2                    2.9.5                    py27_0    conda-forge
jpeg                      9b                            0    conda-forge
json-c                    0.12.1                        0    conda-forge
jsonschema                2.5.1                    py27_0    conda-forge
kealib                    1.4.7                         2    conda-forge
krb5                      1.14.2                        0    conda-forge
lazy-object-proxy         1.3.0                    py27_0    conda-forge
libdap4                   3.18.3                        2    conda-forge
libffi                    3.2.1                         3    conda-forge
libgdal                   2.2.1                         2    conda-forge
libgfortran               3.0.0                         1  
libiconv                  1.14                          4    conda-forge
libkml                    1.3.0                         0    conda-forge
libnetcdf                 4.4.1.1                       5    conda-forge
libpng                    1.6.28                        0    conda-forge
libpq                     9.6.3                         0    conda-forge
libspatialite             4.3.0a                       15    conda-forge
libssh2                   1.8.0                         1    conda-forge
libtiff                   4.0.6                         7    conda-forge
libuv                     1.11.0                        0    conda-forge
libxcb                    1.12                          1    conda-forge
libxml2                   2.9.4                         4    conda-forge
libxslt                   1.1.29                        5    conda-forge
locket                    0.2.0                    py27_1    conda-forge
lxml                      3.8.0                    py27_0    conda-forge
markupsafe                1.0                      py27_0    conda-forge
matplotlib                2.0.2                    py27_1    conda-forge
mccabe                    0.6.1                    py27_0    conda-forge
mkl                       2017.0.3                      0  
mlep                      0.2.2                    py27_0    file:///work/ehovland/conda-env
msgpack-python            0.4.8                    py27_0    conda-forge
mspy                      0.4                      py27_0    file:///work/ehovland/mspy/conda
ncurses                   5.9                          10    conda-forge
networkx                  1.11                     py27_0    conda-forge
numpy                     1.13.1          py27_blas_openblas_200  [blas_openblas]  conda-forge
olefile                   0.44                     py27_0    conda-forge
openblas                  0.2.19                        2    conda-forge
openjpeg                  2.1.2                         3    conda-forge
openssl                   1.0.2l                        0    conda-forge
packaging                 16.8                     py27_0    conda-forge
pandas                    0.20.3                   py27_1    conda-forge
paramiko                  2.2.1                    py27_0    conda-forge
partd                     0.3.8                    py27_0    conda-forge
pathlib2                  2.3.0                    py27_0    conda-forge
pcre                      8.39                          0    conda-forge
pexpect                   4.2.1                    py27_0    conda-forge
pickleshare               0.7.3                    py27_0    conda-forge
pillow                    4.2.1                    py27_0    conda-forge
pip                       9.0.1                    py27_0    conda-forge
pixman                    0.34.0                        0    conda-forge
poppler                   0.52.0                        2    conda-forge
poppler-data              0.4.7                         0    conda-forge
proj4                     4.9.3                         4    conda-forge
prompt_toolkit            1.0.14                   py27_0    conda-forge
psutil                    5.2.1                    py27_0    conda-forge
ptyprocess                0.5.2                    py27_0    conda-forge
py                        1.4.34                   py27_0    conda-forge
pyasn1                    0.2.3                    py27_0    conda-forge
pybind11                  2.1.1                    py27_0    conda-forge
pycodestyle               2.3.1                    py27_0    conda-forge
pycparser                 2.18                     py27_0    conda-forge
pyflakes                  1.5.0                    py27_0    conda-forge
pygments                  2.2.0                    py27_0    conda-forge
pylint                    1.7.1                    py27_0    conda-forge
pynacl                    1.1.2                    py27_0    conda-forge
pyopenssl                 16.2.0                   py27_0    conda-forge
pyparsing                 2.2.0                    py27_0    conda-forge
pyqt                      5.6.0                    py27_4    conda-forge
pysocks                   1.6.7                    py27_0    conda-forge
pytest                    3.1.3                    py27_0    conda-forge
pytest-cov                2.5.1                    py27_0    conda-forge
python                    2.7.13                        1    conda-forge
python-dateutil           2.6.1                    py27_0    conda-forge
pytz                      2017.2                   py27_0    conda-forge
pywavelets                0.5.2               np113py27_0    conda-forge
pyyaml                    3.12                     py27_1    conda-forge
qt                        5.6.2                         3    conda-forge
readline                  6.2                           0    conda-forge
requests                  2.18.2                   py27_0    conda-forge
rhash                     1.3.4                         0    conda-forge
scandir                   1.5                      py27_1    conda-forge
scikit-image              0.13.0                   py27_1    conda-forge
scikit-learn              0.18.2          np113py27_blas_openblas_200  [blas_openblas]  conda-forge
scipy                     0.19.1          py27_blas_openblas_201  [blas_openblas]  conda-forge
setuptools                36.2.2                   py27_0    conda-forge
simplegeneric             0.8.1                    py27_0    conda-forge
singledispatch            3.4.0.3                  py27_0    conda-forge
sip                       4.18                     py27_1    conda-forge
six                       1.10.0                   py27_1    conda-forge
sortedcontainers          1.5.3                    py27_0    conda-forge
spectral                  0.18                     py27_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
ssl_match_hostname        3.5.0.1                  py27_1    conda-forge
subprocess32              3.2.7                    py27_0    conda-forge
tblib                     1.3.2                    py27_0    conda-forge
tk                        8.5.19                        2    conda-forge
toolz                     0.8.2                    py27_0    conda-forge
tornado                   4.5.1                    py27_0    conda-forge
traitlets                 4.3.2                    py27_0    conda-forge
urllib3                   1.21.1                   py27_1    conda-forge
util-linux                2.21                          0  
wcwidth                   0.1.7                    py27_0    conda-forge
wheel                     0.29.0                   py27_0    conda-forge
wrapt                     1.10.8                   py27_0    conda-forge
xerces-c                  3.1.4                         3    conda-forge
xorg-libxau               1.0.8                         3    conda-forge
xorg-libxdmcp             1.1.2                         3    conda-forge
xz                        5.2.2                         0    conda-forge
yaml                      0.1.6                         0    conda-forge
zict                      0.1.2                    py27_0    conda-forge
zlib                      1.2.11                        0    conda-forge
ocefpaf commented 7 years ago

I am not at all surprised that you cannot reproduce. My environment is a bit pathological. Listing at the bottom.

It is not that bad. Only "expected" packages from defaults and those from conda-forge look consistent. Without more details on your package and your workflow to build it I cannot help you further...

microe commented 7 years ago

This script when run by the python executable in the environment fails without having to load my custom package or having to do anything with my workflow. It does import matlab.engine:

#!/usr/bin/env python
"""
===============
MATLAB_is_evil.py
===============

MATLAB is evil
"""
import sys
import argparse
import matlab.engine
from osgeo import gdal

ARG_PARSER = argparse.ArgumentParser(
    description='Script to prove that the MATLAB engine for Python is an evil Python module'
)

ARG_PARSER.add_argument('foo', help='bar')

def main(options):
    print('MATLAB is evil')
    return 0

if __name__ == '__main__':
    ARGS = ARG_PARSER.parse_args()
    sys.exit(main(ARGS))

It turns out that MATLAB includes its own build of libssl.so.1.0.0:

15 Jun 21 08:03 /usr/local/matlab/bin/glnxa64/libssl.so.1 -> libssl.so.1.0.0
477K Jul 22  2016 /usr/local/matlab/bin/glnxa64/libssl.so.1.0.0

This build of libssl does not have SSL_CTX_set_alpn_protos.

If you comment out the import matlab.engine then the above script works fine.

Ugh, many thanks for the help.

ocefpaf commented 7 years ago

No problem! Glad you could sort it out :smile:

microe commented 7 years ago

I was able to work-around this issue by judiciously replacing shared libraries in the matlab install area. I do not suggest others do this, but I had to replace libssl, libcrypto and libcurl with the libraries from my conda environment. KLUDGE!