[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread Mike Gilbert


Change by Mike Gilbert :


--
keywords: +patch
pull_requests: +27176
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28881

___
Python tracker 
<https://bugs.python.org/issue45433>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread Mike Gilbert


New submission from Mike Gilbert :

In https://bugs.python.org/issue44751, crypt.h was removed from Python.h. This 
would imply that libpython is not meant to expose any crypt-related symbols.

In fact, it looks like libpython does not use crypt() or crypt_r() at all. 
These are only used by cryptmodule.

In configure.ac, we have this this logic to determine if crypt_r() is available:

```
# We search for both crypt and crypt_r as one or the other may be defined
# This gets us our -lcrypt in LIBS when required on the target platform.
AC_SEARCH_LIBS(crypt, crypt)
AC_SEARCH_LIBS(crypt_r, crypt)

AC_CHECK_FUNC(crypt_r,
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE  /* Required for crypt_r()'s prototype in glibc. */
#include 
]], [[
struct crypt_data d;
char *r = crypt_r("", "", );
]])],
[AC_DEFINE(HAVE_CRYPT_R, 1, [Define if you have the crypt_r() function.])],
[])
)
```

The AC_SEARCH_LIBS macro adds "-lcrypt" to LIBS, and this gets passed down to 
the link command for libpython. This is probably not intentional.

The HAVE_CRYPT_R value is used in _cryptmodule.c. setup.py performs its own 
check for libcrypt when building the module.

I think the value of LIBS should be saved before the AC_SEARCH_LIBS calls and 
restored after the AC_CHECK_FUNC call. I have tested this locally on Gentoo 
Linux, and it seems to work fine.

I will work on a pull request.

--
components: C API
messages: 403663
nosy: floppymaster
priority: normal
severity: normal
status: open
title: libpython should not be linked with libcrypt
type: compile error
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45433>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


Mike Gilbert  added the comment:

Ok, so this appears to be working correctly on master. Just the 3.7 branch is 
broken.

I think this is because we use OBJ_NAME_do_all instead of EVP_MD_do_all in 3.7.

I think backporting https://github.com/python/cpython/pull/16083 to 3.7 would 
resolve this.

--

___
Python tracker 
<https://bugs.python.org/issue38550>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


Mike Gilbert  added the comment:

I see that generate_hash_name_list() calls EVP_MD_do_all() which calls  
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL);

I'm not sure why that doesn't do the job here.

--

___
Python tracker 
<https://bugs.python.org/issue38550>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


Mike Gilbert  added the comment:

Then the OpenSSL documentation is wrong, or Python is subsequently doing 
something to disable some algorithms.

--

___
Python tracker 
<https://bugs.python.org/issue38550>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


Change by Mike Gilbert :


--
keywords: +patch
pull_requests: +16418
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16873

___
Python tracker 
<https://bugs.python.org/issue38550>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


New submission from Mike Gilbert :

After upgrading to Python 3.7.5, several algorithms are unavailable in the 
hashlib module.

This seems to have been caused by the "fix" for 
https://bugs.python.org/issue33936. I will submit a PR with a more appropriate 
change shortly.

Python 3.7.4:
>>> hashlib.algorithms_available
{'ripemd160', 'blake2s256', 'sha512', 'sha3-224', 'sha3_224', 'blake2s', 
'shake_128', 'sha3-384', 'sha3_384', 'whirlpool', 'md4', 'md5', 'sha512-224', 
'sha3-512', 'sha1', 'blake2b', 'sha384', 'md5-sha1', 'sha3-256', 'shake_256', 
'mdc2', 'sha224', 'blake2b512', 'shake128', 'sm3', 'sha256', 'shake256', 
'sha3_512', 'sha512-256', 'sha3_256'}

Python 3.7.5:
>>> hashlib.algorithms_available
{'sha224', 'sha256', 'sha3_224', 'blake2s', 'md5', 'sha3_256', 'sha384', 
'sha3_512', 'sha3_384', 'shake_256', 'blake2b', 'sha512', 'shake_128', 'sha1'}

--
components: Extension Modules
messages: 355080
nosy: floppymaster
priority: normal
severity: normal
status: open
title: hashlib missing algorithms
type: behavior
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue38550>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32007] nis module fails to build against glibc-2.26

2017-11-11 Thread Mike Gilbert

New submission from Mike Gilbert <floppymas...@gmail.com>:

The nis extension module fails to build against glibc-2.26 with the 
"obsolete-rpc" option disabled.

Downstream bug report: https://bugs.gentoo.org/631488

glibc-2.26 release notes: 
https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html

The nis module is normally skipped since rpcsvc/yp_prot.h will not exist. 
However, if the external "libnsl" package is installed, compilation is 
attempted and fails as given below.

building 'nis' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Wno-unused-result -Wsign-compare 
-DNDEBUG -march=native -O2 -pipe -g -fwrapv -std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers -I./Include -I. 
-I/var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3/Include 
-I/var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3 -c 
/var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3/Modules/nismodule.c -o 
build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3/Modules/nismodule.o
/var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3/Modules/nismodule.c:17:21:
 fatal error: rpc/rpc.h: No such file or directory
 #include 
 ^
compilation terminated.

To summarize:

glibc no longer provides rpc/rpc.h or rpcsvc/yp_prot.h. One must install a 
couple of external libraries to provide the same functionality.

The missing rpcsvc/yp_prot.h file can be resolved by installing the "libnsl" 
package, which installs the header where setup.py expects to find it.

The missing rpc/rpc.h file may be provided by the "libtirpc" package, but this 
installs the file under /usr/include/tirpc, which must be added to the include 
path (-I/usr/include/tirpc).

Ideally, pkg-config would be used to find both libnsl and libtirpc.

--
components: Build
messages: 306090
nosy: floppymaster
priority: normal
severity: normal
status: open
title: nis module fails to build against glibc-2.26
type: compile error

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32007>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31769] configure includes user CFLAGS when detecting pthreads support

2017-10-11 Thread Mike Gilbert

Change by Mike Gilbert <floppymas...@gmail.com>:


--
title: configure includes user CFLAGS testing detecting pthreads support -> 
configure includes user CFLAGS when detecting pthreads support

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert

Mike Gilbert <floppymas...@gmail.com> added the comment:

To resolve this, I suggest clearing CFLAGS/CXXFLAGS before performing the 
ptheads check, and restoring them afterward.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert

Change by Mike Gilbert <floppymas...@gmail.com>:


Added file: https://bugs.python.org/file47215/configure.log

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert

Change by Mike Gilbert <floppymas...@gmail.com>:


Added file: https://bugs.python.org/file47216/build.log

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert

New submission from Mike Gilbert <floppymas...@gmail.com>:

When testing for ptheads support in the compiler, configure includes the CFLAGS 
value from the environment.

If CFLAGS contains -pthread, or an option which implies -pthread (like 
-fopenmp), this will cause configure to not include -pthread in the CC 
variable, and -pthread will not be passed to the linker.

This ultimately leads to a link failure when building with glibc/gcc.

gcc   -Xlinker -export-dynamic -o python Programs/python.o libpython3.7m.a -ldl 
 -lutil   -lm  
libpython3.7m.a(thread.o): In function `PyThread_start_new_thread':
/home/floppym/src/cpython/Python/thread_pthread.h:191: undefined reference to 
`pthread_attr_setstacksize'

--
components: Build
messages: 304200
nosy: floppymaster
priority: normal
severity: normal
status: open
title: configure includes user CFLAGS testing detecting pthreads support
type: compile error
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30008] OpenSSL 1.1.0 deprecated functions

2017-04-08 Thread Mike Gilbert

Mike Gilbert added the comment:

Thanks for the reply.

OpenSSL 1.1.0 added functions to control the SSL/TLS version used by SSL 
contexts created using TLS_method(). You might consider updating the code for 
existing Python branches to use these functions.

SSL_CTX_set_min_proto_version
SSL_CTX_set_max_proto_version

https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30008>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30008] OpenSSL 1.1.0 deprecated functions

2017-04-06 Thread Mike Gilbert

New submission from Mike Gilbert:

Some effort was made to port Python to OpenSSL 1.1.0 (see issue 26470). 
However, the code still uses several deprecated functions, and fails to compile 
against OpenSSL 1.1.0 if these functions are disabled.

This may be replicated by building OpenSSL with --api=1.1.0. This will disable 
all functions marked as deprecated.

I have attached a build log from the cpython master branch.

Downstream bug: https://bugs.gentoo.org/show_bug.cgi?id=592480

--
components: Library (Lib)
files: build.log
messages: 291236
nosy: floppymaster
priority: normal
severity: normal
status: open
title: OpenSSL 1.1.0 deprecated functions
type: compile error
versions: Python 3.7
Added file: http://bugs.python.org/file46782/build.log

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30008>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29504] blake2: compile error with -march=bdver2

2017-02-08 Thread Mike Gilbert

Mike Gilbert added the comment:

Downstream bug report: https://bugs.gentoo.org/show_bug.cgi?id=608586

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29504>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29504] blake2: compile error with -march=bdver2

2017-02-08 Thread Mike Gilbert

New submission from Mike Gilbert:

When compiling python-3.6.0 with -march=bdver2, the blake2 module fails to 
build.

In file included from 
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-round.h:70:0,
 from 
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:40,
 from 
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/blake2s_impl.c:32:
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-load-xop.h:29:4:
 error: expected identifier or '(' before 'return'
return _mm_blendv_epi8(t0, s1, mask);
^
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-load-xop.h:30:1:
 error: expected identifier or '(' before '}' token
 }*/
 ^
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-load-xop.h:30:3:
 error: expected identifier or '(' before '/' token
 }*/
   ^
In file included from 
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/blake2s_impl.c:32:0:
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:
 In function 'blake2s_init0':
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:167:38:
 error: 'blake2s_IV' undeclared (first use in this function)
   for( i = 0; i < 8; ++i ) S->h[i] = blake2s_IV[i];
  ^
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:167:38:
 note: each undeclared identifier is reported only once for each function it 
appears in
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:
 In function 'PyBlake2_blake2s_init_param':
/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:176:44:
 error: 'blake2s_IV' undeclared (first use in this function)
   const uint8_t * v = ( const uint8_t * )( blake2s_IV );
^

--
components: Extension Modules
files: build.log
messages: 287356
nosy: floppymaster
priority: normal
severity: normal
status: open
title: blake2: compile error with -march=bdver2
versions: Python 3.6
Added file: http://bugs.python.org/file46598/build.log

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29504>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24421] Race condition compiling Modules/_math.c

2015-11-11 Thread Mike Gilbert

Changes by Mike Gilbert <floppymas...@gmail.com>:


--
nosy: +floppymaster

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24421>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-05-27 Thread Mike Gilbert

Changes by Mike Gilbert floppymas...@gmail.com:


--
nosy: +floppymaster

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24303
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22758] Regression in Python 3.2 cookie parsing

2014-12-26 Thread Mike Gilbert

Changes by Mike Gilbert floppymas...@gmail.com:


--
nosy: +floppymaster

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22758
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works)

2013-06-29 Thread Mike Gilbert

Changes by Mike Gilbert floppymas...@gmail.com:


--
nosy: +floppymaster

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16809
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13032] h2py.py can fail with UnicodeDecodeError

2012-05-02 Thread Mike Gilbert

Changes by Mike Gilbert floppymas...@gmail.com:


--
nosy: +floppymaster

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13032
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com