Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592480 - dev-lang/python fails to build with >=dev-libs/openssl-1.1.0
Summary: dev-lang/python fails to build with >=dev-libs/openssl-1.1.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL: https://bugs.python.org/issue26470
Whiteboard:
Keywords:
: 627684 (view as bug list)
Depends on:
Blocks: openssl-1.1 624858
  Show dependency tree
 
Reported: 2016-08-30 21:20 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2019-01-26 01:24 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,196.89 KB, text/plain)
2016-08-30 21:20 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details
python-2.7.14-openssl-1.1.0.patch (python-2.7.14-openssl-1.1.0.patch,5.19 KB, patch)
2017-10-09 14:06 UTC, Mark Wright
Details | Diff
python-3.4.6-openssl-1.1.0.patch (python-3.4.6-openssl-1.1.0.patch,19.88 KB, patch)
2017-10-09 14:07 UTC, Mark Wright
Details | Diff
python-3.5.4-openssl-1.1.0.patch (python-3.5.4-openssl-1.1.0.patch,6.17 KB, patch)
2017-10-09 14:08 UTC, Mark Wright
Details | Diff
python-3.6.3-openssl-1.1.0.patch (python-3.6.3-openssl-1.1.0.patch,5.85 KB, patch)
2017-10-09 14:11 UTC, Mark Wright
Details | Diff
python-2.7.14-p1-emulate-TLS-methods.patch (python-2.7.14-p1-emulate-TLS-methods.patch,4.07 KB, patch)
2017-10-14 01:11 UTC, Mark Wright
Details | Diff
python-2.7.14-p2-openssl-1.1.patch (python-2.7.14-p2-openssl-1.1.patch,3.67 KB, patch)
2017-10-14 01:14 UTC, Mark Wright
Details | Diff
python-3.4.6-p1-Port-Python-s-SSL-module-to-OpenSSL-1.1.0.patch (python-3.4.6-p1-Port-Python-s-SSL-module-to-OpenSSL-1.1.0.patch,39.55 KB, patch)
2017-10-14 01:20 UTC, Mark Wright
Details | Diff
python-3.4.6-p2-emulate-TLS-methods.patch (python-3.4.6-p2-emulate-TLS-methods.patch,4.06 KB, patch)
2017-10-14 01:25 UTC, Mark Wright
Details | Diff
python-3.4.6-p3-openssl-1.1.patch (python-3.4.6-p3-openssl-1.1.patch,4.32 KB, patch)
2017-10-14 01:28 UTC, Mark Wright
Details | Diff
python-3.5.4-p1-emulate-TLS-methods.patch (python-3.5.4-p1-emulate-TLS-methods.patch,3.98 KB, patch)
2017-10-14 01:31 UTC, Mark Wright
Details | Diff
python-3.5.4-p2-openssl-1.1.patch (python-3.5.4-p2-openssl-1.1.patch,4.52 KB, patch)
2017-10-14 01:33 UTC, Mark Wright
Details | Diff
python-3.6.3-p1-emulate-TLS-methods.patch (python-3.6.3-p1-emulate-TLS-methods.patch,4.32 KB, patch)
2017-10-14 01:35 UTC, Mark Wright
Details | Diff
python-3.6.3-p2-openssl-1.1.patch (python-3.6.3-p2-openssl-1.1.patch,4.24 KB, patch)
2017-10-14 01:37 UTC, Mark Wright
Details | Diff
build.log (build.log,235.65 KB, text/x-log)
2019-01-26 01:24 UTC, occ1701
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-08-30 21:20:57 UTC
Created attachment 444486 [details]
build.log

Failed to build these modules:
_hashlib              _ssl


All slots are affected.
Comment 1 Craig Andrews gentoo-dev 2016-12-19 03:34:28 UTC
This issue was fixed in:
Python 3.6.0 beta 1: https://docs.python.org/3.6/whatsnew/changelog.html
Python 2.7.13: https://hg.python.org/cpython/raw-file/v2.7.13/Misc/NEWS

and will be fixed with the upcoming Python 3.5.3 release candidate 1: https://docs.python.org/3.5/whatsnew/changelog.html

It appears the issue will not be address in Python 3.4.
Comment 2 eroen 2017-01-05 00:44:37 UTC
Since we build openssl 1.1.0c with --api=1.1, the compatibility fixes currently in python upstream's default branch are not sufficient. For example, 'X509_get_notBefore' is still used.[0]

0: https://hg.python.org/cpython/file/af363b5200ff/Modules/_ssl.c#l1339
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-04-05 14:28:57 UTC
Somebody should report that to python upstream.
Comment 4 Mike Gilbert gentoo-dev 2017-04-06 16:37:06 UTC
I reported the remaining issues upstream.

http://bugs.python.org/issue30008
Comment 5 Brian Evans (RETIRED) gentoo-dev 2017-08-16 20:26:57 UTC
*** Bug 627684 has been marked as a duplicate of this bug. ***
Comment 6 Mark Wright gentoo-dev 2017-10-09 14:06:58 UTC
Created attachment 498216 [details, diff]
python-2.7.14-openssl-1.1.0.patch
Comment 7 Mark Wright gentoo-dev 2017-10-09 14:07:34 UTC
Created attachment 498218 [details, diff]
python-3.4.6-openssl-1.1.0.patch
Comment 8 Mark Wright gentoo-dev 2017-10-09 14:08:14 UTC
Created attachment 498220 [details, diff]
python-3.5.4-openssl-1.1.0.patch
Comment 9 Mark Wright gentoo-dev 2017-10-09 14:11:36 UTC
Created attachment 498224 [details, diff]
python-3.6.3-openssl-1.1.0.patch

I submitted these patches (by me, except the 3.4.6 patch has backported changes
from 3.5.4 and 3.6.3) in the upstream bug report.
Comment 10 Mike Gilbert gentoo-dev 2017-10-09 15:25:58 UTC
Thanks very much for the effort on this!
Comment 11 Mark Wright gentoo-dev 2017-10-14 01:11:14 UTC
Created attachment 498594 [details, diff]
python-2.7.14-p1-emulate-TLS-methods.patch
Comment 12 Mark Wright gentoo-dev 2017-10-14 01:14:39 UTC
Created attachment 498596 [details, diff]
python-2.7.14-p2-openssl-1.1.patch

Backport of the second patch of the 2 proposed patches from python 3.7.0a to 2.7.14.
Comment 13 Mark Wright gentoo-dev 2017-10-14 01:20:55 UTC
Created attachment 498600 [details, diff]
python-3.4.6-p1-Port-Python-s-SSL-module-to-OpenSSL-1.1.0.patch

First of three patches for python 3.4.6:
The Port-Python-s-SSL-module-to-OpenSSL-1.1.0-5.patch patch from
https://bugs.python.org/issue26470
adapted to apply to python 3.4.6.
Comment 14 Mark Wright gentoo-dev 2017-10-14 01:25:40 UTC
Created attachment 498602 [details, diff]
python-3.4.6-p2-emulate-TLS-methods.patch

The second of 3 patches for python 3.4.6:
The backport (by me) of the first prosposed patch from python 3.7.0a to 3.4.6 from https://github.com/python/cpython/pull/3934 (by tiran from upstream)
Comment 15 Mark Wright gentoo-dev 2017-10-14 01:28:47 UTC
Created attachment 498604 [details, diff]
python-3.4.6-p3-openssl-1.1.patch

The third of 3 patches for python 3.4.6:
The backport (by me) of the second prosposed patch from python 3.7.0a to 3.4.6 from https://github.com/python/cpython/pull/3943 (by me).
Comment 16 Mark Wright gentoo-dev 2017-10-14 01:31:30 UTC
Created attachment 498606 [details, diff]
python-3.5.4-p1-emulate-TLS-methods.patch

The first of 2 patches for python 3.5.4
The backport (by me) of the first prosposed patch from python 3.7.0a to 3.5.4 from https://github.com/python/cpython/pull/3934 (by tiran from upstream)
Comment 17 Mark Wright gentoo-dev 2017-10-14 01:33:33 UTC
Created attachment 498608 [details, diff]
python-3.5.4-p2-openssl-1.1.patch

The second of 2 patches for python 3.5.4:
The backport (by me) of the second prosposed patch from python 3.7.0a to 3.5.4 from https://github.com/python/cpython/pull/3943 (by me).
Comment 18 Mark Wright gentoo-dev 2017-10-14 01:35:44 UTC
Created attachment 498610 [details, diff]
python-3.6.3-p1-emulate-TLS-methods.patch

The first of 2 patches for python 3.6.3.
The backport (by me) of the first prosposed patch from python 3.7.0a to 3.6.3 from https://github.com/python/cpython/pull/3934 (by tiran from upstream)
Comment 19 Mark Wright gentoo-dev 2017-10-14 01:37:21 UTC
Created attachment 498612 [details, diff]
python-3.6.3-p2-openssl-1.1.patch

The second of 2 patches for python 3.6.3:
The backport (by me) of the second prosposed patch from python 3.7.0a to 3.6.3 from https://github.com/python/cpython/pull/3943 (by me).
Comment 20 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2017-12-04 17:32:19 UTC
mark, would you say that upstream is not going to backport support for ossl-1.1 to anything?
Comment 21 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-09-29 16:45:19 UTC
I've compile-/use-tested the following python versions and they all build and work successfully with openssl-1.1:

dev-lang/python-2.7.15
dev-lang/python-3.6.6
dev-lang/python-3.7.0
Comment 22 occ1701 2019-01-26 01:24:10 UTC
Created attachment 562840 [details]
build.log

build.log

Failed to build these modules:
_hashlib              _ssl

python-3.4.8-r1