Package Details: python34 3.4.6-1

Git Clone URL: https://aur.archlinux.org/python34.git (read-only)
Package Base: python34
Description: Major release 3.4 of the Python high-level programming language
Upstream URL: http://www.python.org/
Licenses: custom
Submitter: rami
Maintainer: rami
Last Packager: rami
Votes: 16
Popularity: 0.530290
First Submitted: 2015-10-02 11:14
Last Updated: 2017-02-02 12:06

Latest Comments

gagarski commented on 2017-04-26 17:05

After updating openssl to 1.1.0 this package cannot be properly built with ssl.

I am getting some compliler errors about building _ssl module. After building and installing I have the same problem as @krumelmonster. My guess is that OPENSSL_NO_SSL2 flag is removed in openssl 1.1.0. Any ideas about fixing it?

Compilation errors:

/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c: In function ‘_create_tuple_for_X509_NAME’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:694:35: error: dereferencing pointer to incomplete type ‘X509_NAME_ENTRY {aka struct X509_name_entry_st}’
if (rdn_level != entry->set) {
^~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c: In function ‘_get_peer_alt_names’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:814:16: error: dereferencing pointer to incomplete type ‘X509_EXTENSION {aka struct X509_extension_st}’
p = ext->value->data;
^~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:886:17: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
v = PyUnicode_FromStringAndSize((char *)ASN1_STRING_data(as),
^
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/rsa.h:16,
from /home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:59:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c: In function ‘_get_crl_dp’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:1041:22: error: dereferencing pointer to incomplete type ‘X509 {aka struct x509_st}’
dps = certificate->crldp;
^~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c: In function ‘PySSL_compression’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:1430:43: error: dereferencing pointer to incomplete type ‘COMP_METHOD {aka const struct comp_method_st}’
if (comp_method == NULL || comp_method->type == NID_undef)
^~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c: In function ‘context_new’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:1991:9: warning: ‘TLSv1_method’ is deprecated [-Wdeprecated-declarations]
ctx = SSL_CTX_new(TLSv1_method());
^~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from /home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:64:
/usr/include/openssl/ssl.h:1596:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /* TLSv1.0 */
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:1994:9: warning: ‘TLSv1_1_method’ is deprecated [-Wdeprecated-declarations]
ctx = SSL_CTX_new(TLSv1_1_method());
^~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from /home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:64:
/usr/include/openssl/ssl.h:1602:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_method(void)) /* TLSv1.1 */
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:1996:9: warning: ‘TLSv1_2_method’ is deprecated [-Wdeprecated-declarations]
ctx = SSL_CTX_new(TLSv1_2_method());
^~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from /home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:64:
/usr/include/openssl/ssl.h:1608:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_method(void)) /* TLSv1.2 */
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:2004:27: warning: implicit declaration of function ‘SSLv2_method’ [-Wimplicit-function-declaration]
ctx = SSL_CTX_new(SSLv2_method());
^~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:2004:27: warning: passing argument 1 of ‘SSL_CTX_new’ makes pointer from integer without a cast [-Wint-conversion]
In file included from /home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:64:0:
/usr/include/openssl/ssl.h:1305:17: note: expected ‘const SSL_METHOD * {aka const struct ssl_method_st *}’ but argument is of type ‘int’
__owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
^~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c: In function ‘get_verify_flags’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:2265:46: error: dereferencing pointer to incomplete type ‘X509_STORE {aka struct x509_store_st}’
flags = X509_VERIFY_PARAM_get_flags(store->param);
^~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c: In function ‘load_cert_chain’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:2458:48: error: dereferencing pointer to incomplete type ‘SSL_CTX {aka struct ssl_ctx_st}’
pem_password_cb *orig_passwd_cb = self->ctx->default_passwd_callback;
^~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c: In function ‘cert_store_stats’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:3045:20: error: dereferencing pointer to incomplete type ‘X509_OBJECT {aka struct x509_object_st}’
switch (obj->type) {
^~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:3055:18: error: ‘X509_LU_PKEY’ undeclared (first use in this function)
case X509_LU_PKEY:
^~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:3055:18: note: each undeclared identifier is reported only once for each function it appears in
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c: In function ‘PySSL_RAND’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:3265:9: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations]
ok = RAND_pseudo_bytes((unsigned char*)PyBytes_AS_STRING(bytes), len);
^~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from /home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:64:
/usr/include/openssl/rand.h:47:1: note: declared here
DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
^
At top level:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:3802:13: warning: ‘_ssl_thread_locking_function’ defined but not used [-Wunused-function]
static void _ssl_thread_locking_function
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_ssl.c:3789:1: warning: ‘_ssl_threadid_callback’ defined but not used [-Wunused-function]
_ssl_threadid_callback(CRYPTO_THREADID *id)
^~~~~~~~~~~~~~~~~~~~~~
building '_hashlib' extension
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIC -I./Include -I. -IInclude -I/usr/local/include -I/home/gagarski/Downloads/python34/src/Python-3.4.6/Include -I/home/gagarski/Downloads/python34/src/Python-3.4.6 -c /home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c -o build/temp.linux-x86_64-3.4/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.o
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:42:26: error: field ‘ctx’ has incomplete type
EVP_MD_CTX ctx; /* OpenSSL message digest context */
^~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c: In function ‘EVP_dealloc’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:109:5: warning: implicit declaration of function ‘EVP_MD_CTX_cleanup’ [-Wimplicit-function-declaration]
EVP_MD_CTX_cleanup(&self->ctx);
^~~~~~~~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c: In function ‘EVP_digest’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:145:16: error: storage size of ‘temp_ctx’ isn’t known
EVP_MD_CTX temp_ctx;
^~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:145:16: warning: unused variable ‘temp_ctx’ [-Wunused-variable]
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c: In function ‘EVP_hexdigest’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:165:16: error: storage size of ‘temp_ctx’ isn’t known
EVP_MD_CTX temp_ctx;
^~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:165:16: warning: unused variable ‘temp_ctx’ [-Wunused-variable]
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c: In function ‘PKCS5_PBKDF2_HMAC_fast’:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:497:14: error: storage size of ‘hctx_tpl’ isn’t known
HMAC_CTX hctx_tpl, hctx;
^~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:497:24: error: storage size of ‘hctx’ isn’t known
HMAC_CTX hctx_tpl, hctx;
^~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:503:5: warning: implicit declaration of function ‘HMAC_CTX_init’ [-Wimplicit-function-declaration]
HMAC_CTX_init(&hctx_tpl);
^~~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:508:9: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]
HMAC_CTX_cleanup(&hctx_tpl);
^~~~~~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:497:24: warning: unused variable ‘hctx’ [-Wunused-variable]
HMAC_CTX hctx_tpl, hctx;
^~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:497:14: warning: unused variable ‘hctx_tpl’ [-Wunused-variable]
HMAC_CTX hctx_tpl, hctx;
^~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c: At top level:
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:54:23: error: storage size of ‘CONST_new_md5_ctx’ isn’t known
static EVP_MD_CTX CONST_new_ ## Name ## _ctx; \
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:57:1: note: in expansion of macro ‘DEFINE_CONSTS_FOR_NEW’
DEFINE_CONSTS_FOR_NEW(md5)
^~~~~~~~~~~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:54:23: error: storage size of ‘CONST_new_sha1_ctx’ isn’t known
static EVP_MD_CTX CONST_new_ ## Name ## _ctx; \
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:58:1: note: in expansion of macro ‘DEFINE_CONSTS_FOR_NEW’
DEFINE_CONSTS_FOR_NEW(sha1)
^~~~~~~~~~~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:54:23: error: storage size of ‘CONST_new_sha224_ctx’ isn’t known
static EVP_MD_CTX CONST_new_ ## Name ## _ctx; \
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:60:1: note: in expansion of macro ‘DEFINE_CONSTS_FOR_NEW’
DEFINE_CONSTS_FOR_NEW(sha224)
^~~~~~~~~~~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:54:23: error: storage size of ‘CONST_new_sha256_ctx’ isn’t known
static EVP_MD_CTX CONST_new_ ## Name ## _ctx; \
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:61:1: note: in expansion of macro ‘DEFINE_CONSTS_FOR_NEW’
DEFINE_CONSTS_FOR_NEW(sha256)
^~~~~~~~~~~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:54:23: error: storage size of ‘CONST_new_sha384_ctx’ isn’t known
static EVP_MD_CTX CONST_new_ ## Name ## _ctx; \
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:62:1: note: in expansion of macro ‘DEFINE_CONSTS_FOR_NEW’
DEFINE_CONSTS_FOR_NEW(sha384)
^~~~~~~~~~~~~~~~~~~~~
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:54:23: error: storage size of ‘CONST_new_sha512_ctx’ isn’t known
static EVP_MD_CTX CONST_new_ ## Name ## _ctx; \
^
/home/gagarski/Downloads/python34/src/Python-3.4.6/Modules/_hashopenssl.c:63:1: note: in expansion of macro ‘DEFINE_CONSTS_FOR_NEW’
DEFINE_CONSTS_FOR_NEW(sha512)
^~~~~~~~~~~~~~~~~~~~~

Failed to build these modules:
_hashlib _ssl

hobarrera commented on 2016-12-23 15:22

Could you be a bit clearer?

Light2Yellow commented on 2016-12-23 14:41

How to recover the python environment after uninstalling this? It fucked up the whole thing with pip and setuptools :(
UPD. fixed everything by removing/installing pip, removing all packages through pip and reinstalling through pacman.

rami commented on 2016-03-10 19:19

I added the flag krumelmonster suggested. The patch from the python32 package can not be exactly applied to Python 3.4 as it seems. If this solution is not sufficient for anyone I'm happy for any suggestions.

krumelmonster commented on 2016-03-08 19:57

A simple CFLAGS=-DOPENSSL_NO_SSL2 ./configure … worked for me and as I understand it, OPENSSL_NO_SSL2 is exactly what we want.

hobarrera commented on 2016-03-08 17:41

python32 includes a patch for this, python34 probably needs it too:
https://aur.archlinux.org/cgit/aur.git/commit/?h=python32&id=5170ebf2319e761c229fe8f029760722954189a6

krumelmonster commented on 2016-03-08 17:18

SSLv2 is (by default) disabled from OpenSSL 1.0.2g onwards
https://www.openssl.org/news/openssl-1.0.2-notes.html
So we need a -DOPENSSL_NO_SSL2
https://bugs.python.org/issue12012
Or this will happen:
$ python3.4 -c "import ssl"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.4/ssl.py", line 97, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: /usr/lib/python3.4/lib-dynload/_ssl.cpython-34m.so: undefined symbol: SSLv2_method

Also, I'm wondering if it is a bug in the core/openssl package that SSLv2_method is declared in /usr/include/openssl/ssl.h (It feels wrong to get undefined symbols at runtime)