pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56167: lang/python39 build failure on FreeBSD 12



>Number:         56167
>Category:       pkg
>Synopsis:       lang/python39 build failure on FreeBSD 12
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 14 14:35:00 +0000 2021
>Originator:     Frédéric Fauberteau
>Release:        FreeBSD 12.2-RELEASE-p6
>Organization:
>Environment:
System: FreeBSD cocoon.triaxx.org 12.2-RELEASE-p6 FreeBSD 12.2-RELEASE-p6 GENERIC  amd64
Architecture: x86_64
Machine: amd64
>Description:
The release 3.9.5 of Python fails during the building step.

The following error is reported by the building application:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
building '_ssl' extension                                                                                                                                                                                                                      
clang -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -I/usr/include -I/usr/pkg/include -O2 -I/usr/include -I/usr/pkg/include -O2 -I/usr/include -I/usr/pkg/include -std=gnu99 -Wextra -Wno-unused-result -Wno-unused-p
arameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I/usr/include -I./Include -I. -I/usr/include -I/usr/pkg/include -I/usr/pkgsrc/lang/python39/work/P
ython-3.9.5/Include -I/usr/pkgsrc/lang/python39/work/Python-3.9.5 -c /usr/pkgsrc/lang/python39/work/Python-3.9.5/Modules/_ssl.c -o build/temp.freebsd-12.2-RELEASE-p6-amd64-3.9/usr/pkgsrc/lang/python39/work/Python-3.9.5/Modules/_ssl.o
In file included from /usr/pkgsrc/lang/python39/work/Python-3.9.5/Modules/_ssl.c:43:                                                                                                                                                           
In file included from /usr/pkgsrc/lang/python39/work/Python-3.9.5/Modules/socketmodule.h:116:                                                                                                                                                  
In file included from /usr/include/bluetooth.h:54:                                                                                                                                                                                             
/usr/include/netgraph/bluetooth/include/ng_btsocket.h:244:2: warning: "Make sure new member of socket address initialized" [-W#warnings]             
#warning "Make sure new member of socket address initialized"                                                                                                                                                                                  
 ^                                                                                                                                                                                                                                             
/usr/pkgsrc/lang/python39/work/Python-3.9.5/Modules/_ssl.c:3116:27: error: implicit declaration of function 'SSLv3_method' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        ctx = SSL_CTX_new(SSLv3_method());                                                                                                                                                                                                     
                          ^                                                                                                                                                                                                                    
/usr/pkgsrc/lang/python39/work/Python-3.9.5/Modules/_ssl.c:3116:27: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const SSL_METHOD *' (aka 'const struct ssl_method_st *') [-Wint-conversion]
        ctx = SSL_CTX_new(SSLv3_method());                                                                                                                                                                                                     
                          ^~~~~~~~~~~~~~                                                                                                                                                                                                       
/usr/include/openssl/ssl.h:1503:47: note: passing argument to parameter 'meth' here                                                                                                                                                            
__owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);                                                                                                                                                                                           
                                              ^                                                                                                                                                                                                
2 warnings and 1 error generated.                                                                                                                                                                                                              
                                                                                                                                                                                                                                               
Python build finished successfully!                                                                                                                                                                                                            
The necessary bits to build these optional modules were not found:                                                                                                                                                                             
_gdbm                 _tkinter              spwd                                                                                                                                                                                               
To find the necessary bits, look in setup.py in detect_modules() for the module's name.                                                                                                                                                        
                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                               
The following modules found by detect_modules() in setup.py, have been                                                                                                                                                                         
built by the Makefile instead, as configured by the Setup files:                                                                                                                                                                               
_abc                  atexit                pwd                                                                                                                                                                                                time                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                               
Failed to build these modules:                                                                                                                                                                                                                 
_ssl                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                               
Could not build the ssl module!                                                                                                                                                                                                                
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().                                                                                                                                                  
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It results an error during the installation step:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=> Checking file-check results for python39-3.9.5
ERROR: ************************************************************
ERROR: The following files are in the PLIST but not in /usr/pkgsrc/lang/python39/work/.destdir/usr/pkg:
ERROR:         /usr/pkgsrc/lang/python39/work/.destdir/usr/pkg/lib/python3.9/lib-dynload/_ssl.so
*** Error code 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>How-To-Repeat:
cd /usr/pkgsrc/lang/python39 && bmake install
>Fix:
$NetBSD$

Fix build failure on FreeBSD 12. 
From https://github.com/python/cpython/commit/3309113

--- _ssl.c.orig 2021-05-14 15:52:07.251636000 +0200
+++ _ssl.c  2021-05-14 15:52:37.012941000 +0200
@@ -151,6 +151,9 @@
  * unless OpenSSL is compiled without the methods. It's the easiest way to
  * make 1.0.2, 1.1.0, 1.1.1, and 3.0.0 happy without deprecation warnings.
  */  
+#ifndef OPENSSL_NO_SSL3_METHOD
+extern const SSL_METHOD *SSLv3_method(void);
+#endif
 #ifndef OPENSSL_NO_TLS1_METHOD
 extern const SSL_METHOD *TLSv1_method(void);
 #endif



Home | Main Index | Thread Index | Old Index