This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 2.7.12 compile error from ssl related
Type: compile error Stage: resolved
Components: SSL Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: ada, christian.heimes
Priority: normal Keywords:

Created on 2017-03-09 01:00 by ada, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg289262 - (view) Author: ada (ada) Date: 2017-03-09 01:00
Download the python version 2.7.12 source code from official web site.
Compile the python code by the following steps:
sudo ./configure
sudo make
sudo make install

but from make, I get the following errors:
/Modules/_ssl.c: In function ‘_create_tuple_for_X509_NAME’:
./Modules/_ssl.c:684: error: dereferencing pointer to incomplete type
./Modules/_ssl.c:701: error: dereferencing pointer to incomplete type
./Modules/_ssl.c: In function ‘_get_peer_alt_names’:
./Modules/_ssl.c:804: error: dereferencing pointer to incomplete type
./Modules/_ssl.c:809: error: dereferencing pointer to incomplete type
./Modules/_ssl.c:815: error: dereferencing pointer to incomplete type
./Modules/_ssl.c:876: warning: ‘ASN1_STRING_data’ is deprecated (declared at /usr/local/include/openssl/asn1.h:553)
./Modules/_ssl.c: In function ‘_get_crl_dp’:
./Modules/_ssl.c:1029: error: dereferencing pointer to incomplete type
./Modules/_ssl.c: In function ‘PySSL_compression’:
./Modules/_ssl.c:1446: error: dereferencing pointer to incomplete type
./Modules/_ssl.c:1448: error: dereferencing pointer to incomplete type
./Modules/_ssl.c: In function ‘context_new’:
./Modules/_ssl.c:2000: warning: ‘TLSv1_method’ is deprecated (declared at /usr/local/include/openssl/ssl.h:1596)
./Modules/_ssl.c:2003: warning: ‘TLSv1_1_method’ is deprecated (declared at /usr/local/include/openssl/ssl.h:1602)

please help me check where I take a mistake. The related information is:
Linux version: 
Linux root:2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
OpenSSL version: 
[root@root Python-2.7.12]# rpm -aq | grep openssl
openssl-static-1.0.1e-48.el6_8.4.x86_64
openssl-1.0.1e-48.el6_8.4.x86_64
openssl-devel-1.0.1e-48.el6_8.4.x86_64
COMPILER version: 
[root@root Python-2.7.12]# yum list installed | grep -i  gcc
gcc.x86_64                           4.4.7-17.el6                       
gcc-c++.x86_64                       4.4.7-17.el6                       
gcc-gfortran.x86_64                  4.4.7-17.el6                       
libgcc.i686                          4.4.7-17.el6                       
libgcc.x86_64                        4.4.7-17.el6                       


Thanks in advance.
msg289329 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-03-09 22:11
/usr/local looks wrong. Did you install a custom build of OpenSSL? What's the output of

    rpm -qf /usr/local/include/openssl/asn1.h

?
msg289371 - (view) Author: ada (ada) Date: 2017-03-10 14:47
The output is: 

[root@root local]# rpm -qf /usr/local/include/openssl/asn1.h 
file /usr/local/include/openssl/asn1.h is not owned by any package
msg289405 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-03-10 19:54
You have some custom, unsupported version of OpenSSL installed in /usr/local. That custom version is not compatible with Python 2.7.12.
History
Date User Action Args
2022-04-11 14:58:44adminsetgithub: 73951
2017-03-10 19:54:47christian.heimessetstatus: open -> closed
resolution: not a bug
messages: + msg289405

stage: resolved
2017-03-10 14:47:40adasetmessages: + msg289371
2017-03-09 22:11:17christian.heimessetmessages: + msg289329
2017-03-09 01:00:20adacreate