conda-forge / curl-feedstock

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

undefined symbol: libssh2_scp_recv2 #23

Closed quartox closed 6 years ago

quartox commented 7 years ago

Error when trying to load libhdfs3 (https://github.com/conda-forge/hdfs3-feedstock/issues/4#issuecomment-335294853):

>>> ctypes.cdll.LoadLibrary('libhdfs3.so')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jlord/.conda/envs/dask/lib/python3.6/ctypes/__init__.py", line 426, in LoadLibrary
    return self._dlltype(name)
  File "/home/jlord/.conda/envs/dask/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/jlord/.conda/envs/dask/lib/python3.6/lib-dynload/../.././libcurl.so.4: undefined symbol: libssh2_scp_recv2

Downgrading from 7.54.1 to 7.49.1 resolves the issue for me.

ocefpaf commented 7 years ago

Seems related to https://github.com/curl/curl/issues/1035

I'm investigating what can be done to solve that.

zhenyisong commented 6 years ago

@quartox Thanks. I downgraded the curl lib ( conda install curl=7.49.1) and this problem is solved as your suggestion.

smithsp commented 6 years ago

Adding myself so that I get updated on progress, and remind myself to remove pinning of curl dependency in omfit recipe, (which saw the problem when trying to import netCDF4).

jakirkham commented 6 years ago

Is anyone here setting LD_LIBRARY_PATH? If so, please try unsetting LD_LIBRARY_PATH and retrying.

The curl build does link against libssh2, which we also build and package, and our copy of libssh2 has the libssh2_scp_recv2 symbol. So am not seeing anything actionable here. Also have no problem loading libcurl.so.4.4.0.

>>> import ctypes
>>> ctypes.cdll.LoadLibrary('libcurl.so.4.4.0')
jakirkham commented 6 years ago

We now test for this symbol on Linux as well. So this issue has either been resolved with curl or something else is going on (e.g. old/broken curl package pulled in, etc.)

jakirkham commented 6 years ago

Think PR ( https://github.com/conda-forge/curl-feedstock/pull/29 ) should have resolved any potentially incorrect loading order.