Bug 246857 - finance/electrum: Fails to run: _ssl.so: Undefined symbol "SSLv3_method@OPENSSL_1_1_0"
Summary: finance/electrum: Fails to run: _ssl.so: Undefined symbol "SSLv3_method@OPENS...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-30 07:53 UTC by Per Gunnarsson
Modified: 2020-05-31 01:35 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
pkg version -v (58.50 KB, text/plain)
2020-05-30 08:49 UTC, Per Gunnarsson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Per Gunnarsson 2020-05-30 07:53:32 UTC
When I try to run electrum, I get:

/usr/local/bin/python3.7 /usr/local/bin/electrum
Traceback (most recent call last):
  File "/usr/local/bin/electrum", line 82, in <module>
    from electrum.logging import get_logger, configure_logging
  File "/usr/local/lib/python3.7/site-packages/electrum/__init__.py", line 2, in <module>
    from .util import format_satoshis
  File "/usr/local/lib/python3.7/site-packages/electrum/util.py", line 42, in <module>
    import ssl
  File "/usr/local/lib/python3.7/ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: /usr/local/lib/python3.7/lib-dynload/_ssl.so: Undefined symbol "SSLv3_method@OPENSSL_1_1_0"

Command exit status: 1
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-05-30 08:28:59 UTC
@Per Thank you for your report. Couyld you please include additional information, including:

- Exact FreeBSD version (uname -a output)
- Whether you are using ports or packages, and if packages, what version (quarterly or latest)
- pkg version -v output (as an attachment)
- /etc/make.conf contents (if not empty)

The issue itself appears to be related to Python, rather than electrum itself, and can often occur when updating or changing SSL library versions, but not also rebuilding Python after that change

This should be reproducible without electrum by running:

$ python3.7
>>> import ssl
Comment 2 Per Gunnarsson 2020-05-30 08:49:59 UTC
Created attachment 215047 [details]
pkg version -v
Comment 3 Per Gunnarsson 2020-05-30 08:53:00 UTC
>>> import ssl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: /usr/local/lib/python3.7/lib-dynload/_ssl.so: Undefined symbol "SSLv3_method@OPENSSL_1_1_0"
>>>

/etc/make.conf:

DEVELOPER=yes

I use packakes, except for these port where I have changed make options:

alsa-lib
alsa-plugins
pulseaudio
pulseaudio-module-sndio
ices
portaudio
vlc
mplayer
firefox



FreeBSD konjak 13.0-CURRENT FreeBSD 13.0-CURRENT #3 r361625: Fri May 29 22:32:55 CEST 2020     root@konjak:/usr/home/per/tmp/usr/src/amd64.amd64/sys/GENERIC  amd64
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2020-05-30 09:01:47 UTC
Thanks you for the additional information

The system does not have a SSL library built from ports, which means SSL functionality is provided by base, and I believe FreeBSD's base OpenSSL version recently changed, and has on a couple of occasions in the recent past.

When running non-RELEASE FreeBSD versions, part of the support and management process is to rebuild dependent subsystems (in this case Python and/or other SSL consuming softwares), when the underlying base system ABI changes. This appears to be one of those cases.

Since you're also using packages, and unless you're creating or using your own package sets built on or from the *same base revision* as the consuming system (13-CURRENT), this means that those packages will require (be built against) the OpenSSL version that the package building servers have, which may not match your systems.

This is very likely the cause of this issue.

Rebuilding Python and any other software that depends on OpenSSL from base, from ports, should resolve the issue.
Comment 5 Per Gunnarsson 2020-05-30 11:06:43 UTC
Thanks for quick help and advice!

I made python3.7 from ports and now electrum seems top work just fine, both the version in ports and the version I downloaded from the Electrum web page.
Comment 6 Emanuel Haupt freebsd_committer freebsd_triage 2020-05-30 15:05:10 UTC
Thank you for the feedback, I am glad it worked.

May I close this PR as resolved?