Bug 246903 - net/py-s3cmd and devel/awscli failing with SSL error
Summary: net/py-s3cmd and devel/awscli failing with SSL error
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
Depends on:
Reported: 2020-06-01 08:16 UTC by mmatalka
Modified: 2020-06-02 16:33 UTC (History)
3 users (show)

See Also:
linimon: maintainer-feedback? (bofh)


Note You need to log in before you can comment on or make changes to this bug.
Description mmatalka 2020-06-01 08:16:43 UTC
Invoked as: /usr/local/bin/s3cmd
Problem: <class 'ImportError: /usr/local/lib/python3.7/lib-dynload/_ssl.so: Undefined symbol "SSLv3_method@OPENSSL_1_1_0"
S3cmd:   unknown version. Module import problem?
python:   3.7.7 (default, Mar 28 2020, 01:47:33)
[Clang 10.0.0 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-0-gd32170dbd
environment LANG=None

Traceback (most recent call last):
  File "/usr/local/bin/s3cmd", line 3100, in <module>
    from S3.Exceptions import *
  File "/usr/local/lib/python3.7/site-packages/S3/Exceptions.py", line 25, in <module>
    from ssl import SSLError as S3SSLError
  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"
Comment 1 mmatalka 2020-06-01 08:17:47 UTC
I'm on 13-CURRENT 361660
Comment 2 mmatalka 2020-06-01 08:30:23 UTC
awscli is failing for similar reasons.

Traceback (most recent call last):
  File "/usr/local/bin/aws", line 19, in <module>
    import awscli.clidriver
  File "/usr/local/lib/python3.7/site-packages/awscli/clidriver.py", line 17, in <module>
    import botocore.session
  File "/usr/local/lib/python3.7/site-packages/botocore/session.py", line 29, in <module>
    import botocore.credentials
  File "/usr/local/lib/python3.7/site-packages/botocore/credentials.py", line 34, in <module>
    from botocore.config import Config
  File "/usr/local/lib/python3.7/site-packages/botocore/config.py", line 16, in <module>
    from botocore.endpoint import DEFAULT_TIMEOUT, MAX_POOL_CONNECTIONS
  File "/usr/local/lib/python3.7/site-packages/botocore/endpoint.py", line 22, in <module>
    from botocore.awsrequest import create_request_object
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 25, in <module>
    import botocore.utils
  File "/usr/local/lib/python3.7/site-packages/botocore/utils.py", line 31, in <module>
    import botocore.httpsession
  File "/usr/local/lib/python3.7/site-packages/botocore/httpsession.py", line 8, in <module>
    from urllib3.util.ssl_ import (
ImportError: cannot import name 'ssl' from 'urllib3.util.ssl_' (/usr/local/lib/python3.7/site-packages/urllib3/util/ssl_.py)
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2020-06-01 09:05:22 UTC
To which port does this PR apply?
Comment 4 mmatalka 2020-06-01 09:15:58 UTC
SOrry I did not mention it:

py-s3cmd and awscli
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2020-06-01 09:41:26 UTC
Assign to maintainer of net/py-s3cmd; notify maintainer of devel/awscli.
Comment 6 Muhammad Moinur Rahman freebsd_committer 2020-06-02 08:28:20 UTC
Can you please rebuild your ports tree? I don't think this is a problem of either python or awscli or s3cmd. openssl base version was updated couple of weeks ago in the head and this looks like your python was not rebuilt after that. I have tried running py-s3cmd in one of my head slightly less than 361660 and it works fine.
Comment 7 mmatalka 2020-06-02 16:33:02 UTC
Thank you.

I can confirm that rebuilding python37 solved the issue.  Apologies for the distraction.