Skip to content

bitcoin.core.keys links to broken SSL on OSX Catalina #238

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

Closed
sr-gi opened this issue Apr 30, 2020 · 1 comment · Fixed by #240
Closed

bitcoin.core.keys links to broken SSL on OSX Catalina #238

sr-gi opened this issue Apr 30, 2020 · 1 comment · Fixed by #240

Comments

@sr-gi
Copy link

sr-gi commented Apr 30, 2020

I've been having some issues lately trying to use the library. Just importing some parts of it would make Python crash with a code 134 (interrupted by signal 6: SIGABRT).

After a bit of digging I found out the root of the problem is on SSL linking in bitcoin.core.keys:

_ssl = ctypes.cdll.LoadLibrary(ctypes.util.find_library('ssl') or 'libeay32')

Looks like ctypes.util.find_library('ssl') for OSX Catalina points to /usr/lib/libcrypto.dylib, which is broken, instead of /usr/local/opt/[email protected]/lib/libcrypto.dylib.

I've hotfixed it on my machine by hardcoding the path to the proper one and it works fine again.

Similar issues: Homebrew/homebrew-core#44996

Not sure if other users of the library with the same OS version can reproduce, I thought I'd be worth leaving a note just in case.

@dhimmel
Copy link
Contributor

dhimmel commented May 25, 2020

I'm getting a similar issue when running Python 3.8 on GitHub Actions Windows. The issue does not occur for Python 3.6 or 3.7 on Windows or 3.8 on Windows on AppVeyor. It does not occur for any linux or macOS builds.

Here's the stack trace from this build log:

  File "c:\hostedtoolcache\windows\python\3.8.3\x64\lib\site-packages\bitcoin\core\key.py", line 33, in <module>
    _ssl = ctypes.cdll.LoadLibrary(ctypes.util.find_library('ssl') or 'libeay32')
  File "c:\hostedtoolcache\windows\python\3.8.3\x64\lib\ctypes\__init__.py", line 451, in LoadLibrary
    return self._dlltype(name)
  File "c:\hostedtoolcache\windows\python\3.8.3\x64\lib\ctypes\__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libeay32' (or one of its dependencies). Try using the full path with constructor syntax.

So the line where the error is raised is:

_ssl = ctypes.cdll.LoadLibrary(ctypes.util.find_library('ssl') or 'libeay32')

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

Successfully merging a pull request may close this issue.

2 participants