x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -march=native -fwrapv build/temp.linux-x86_64-3.5/var/tmp/portage/dev-lang/python-3.5.4-r1/work/Python-3.5.4/Modules/_datetimemodule.o -L. -L/usr/local/lib64 -lm -lpython3.5m -o build/lib.linux-x86_64-3.5/_datetime.cpython-35m-x86_64-linux-gnu.so /var/tmp/portage/dev-lang/python-3.5.4-r1/work/Python-3.5.4/Modules/_ssl.c:144:12: error: static declaration of 'X509_NAME_ENTRY_set' follows non-static declaration static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne) ^~~~~~~~~~~~~~~~~~~ In file included from /var/tmp/portage/dev-lang/python-3.5.4-r1/work/Python-3.5.4/Modules/_ssl.c:69:0: ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0-desktop_libressl_20180320-184243 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-7.3.0 * Available Python interpreters, in order of preference: [1] python3.5 [2] python2.7 (fallback) Available Ruby profiles: [1] ruby22 (with Rubygems) [2] ruby23 (with Rubygems) * emerge -qpv dev-lang/python [ebuild NS ] dev-lang/python-3.6.4 [2.7.14-r1, 3.5.4-r1] USE="gdbm ipv6 libressl ncurses readline sqlite ssl (threads) xml -build -examples -hardened {-test} -tk -wininst"
Created attachment 524854 [details] emerge-info.txt
Created attachment 524856 [details] dev-lang:python-3.5.4-r1:20180322-132107.log
Created attachment 524858 [details] emerge-history.txt
Created attachment 524860 [details] environment
Created attachment 524862 [details] etc.portage.tbz2
Created attachment 524864 [details] logs.tbz2
Created attachment 524866 [details] temp.tbz2
FWIW this is reliable at this particular tinderbox chroot image. The issue happened at few others too I'd say but there it healed by @system and @world and @preserved-rebuild
I had the same issue, it can be fixed with following patch that applies for python 2.7 as well as python 3.x: http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/python/2.7/patches/patch-Modules__ssl_c?rev=1.6&content-type=text/x-cvsweb-markup http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/python/3.6/patches/patch-Modules__ssl_c?rev=1.2&content-type=text/x-cvsweb-markup The patch work as-is, and could be added to ebuild or epatch-user patches.
(In reply to Quentin R. from comment #9) I forgot to say it's related to dev-libs/libressl-2.7.0 update that now offers OpenSSL 1.0.2 and 1.1 APIs, which explains packages breakage (not only python is affected by this).
All bug reporters, can you please test against dev-libs/libressl-2.7.1
Created attachment 525284 [details] dev-lang:python-3.5.4-r1:20180324-193408.log from 17.0-no-multilib_libressl_20180324-155423 :-/
got at the unstable amd64 chroot image 17.0_libressl_20180324-152213 this : /.../_ssl.c:144:12: error: static declaration of X509_NAME_ENTRY_set follows non-static declaration
Created attachment 525286 [details] emerge-info.txt
Created attachment 525288 [details] dev-lang:python-3.5.4-r1:20180324-200930.log
Created attachment 525290 [details] emerge-history.txt
Created attachment 525292 [details] environment
Created attachment 525294 [details] etc.portage.tbz2
Created attachment 525296 [details] logs.tbz2
Created attachment 525298 [details] temp.tbz2
/var/tmp/portage/dev-lang/python-3.6.4/work/Python-3.6.4/Modules/_ssl.c:146:12: error: static declaration of 'X509_NAME_ENTRY_set' follows non-static declaration static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne) ^~~~~~~~~~~~~~~~~~~
building '_ssl' extension x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=native -O2 -pipe -fwrapv -DNDEBUG -I. -I/var/tmp/portage/dev-lang/python-2.7.14-r1/work/Python-2.7.14/Include -I/var/tmp/portage/dev-lang/python-2.7.14-r1/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.14-r1/work/Python-2.7.14/Modules/_ssl.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.14-r1/work/Python-2.7.14/Modules/_ssl.o /var/tmp/portage/dev-lang/python-2.7.14-r1/work/Python-2.7.14/Modules/_ssl.c:148:0: warning: "OPENSSL_VERSION" redefined #define OPENSSL_VERSION SSLEAY_VERSION In file included from /usr/include/openssl/bio.h:69:0, from /usr/include/openssl/asn1.h:67, from /usr/include/openssl/rsa.h:64, from /var/tmp/portage/dev-lang/python-2.7.14-r1/work/Python-2.7.14/Modules/_ssl.c:64: /usr/include/openssl/crypto.h:334:0: note: this is the location of the previous definition #define OPENSSL_VERSION 0 /var/tmp/portage/dev-lang/python-2.7.14-r1/work/Python-2.7.14/Modules/_ssl.c:150:12: error: static declaration of ‘X509_NAME_ENTRY_set’ follows non-static declaration static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne) ^~~~~~~~~~~~~~~~~~~
fixed in https://github.com/gentoo/libressl/commit/2d05b32fd543a1ce03ed2357da4b43ef4b605d91 libressl overlay
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f295e6e7bc5fc6065d735e562ad51996260588f commit 9f295e6e7bc5fc6065d735e562ad51996260588f Author: Aaron Bauman <bman@gentoo.org> AuthorDate: 2018-04-13 22:44:30 +0000 Commit: Aaron Bauman <bman@gentoo.org> CommitDate: 2018-04-16 16:14:08 +0000 dev-lang/python: compatibility patch for libressl This patch fixes building with >=dev-libs/libressl-2.7. Additionally, the slot and subslot modifier have been updated to ensure rebuilds are properly triggered. Bug: https://bugs.gentoo.org/651162 Package-Manager: Portage-2.3.28, Repoman-2.3.9 Closes: https://github.com/gentoo/gentoo/pull/7978 .../python-3.5.5-libressl-compatibility.patch | 69 ++++++++++++++++++++++ dev-lang/python/python-3.5.5.ebuild | 3 +- 2 files changed, 71 insertions(+), 1 deletion(-)}
Patched version of dev-lang/python are being stabilized.
I am calling this fixed as 2.7.2 is not even keyworded.