#3656 PyErr_NewExceptionWithDoc configure check should not use cached results for different python versions
Closed: Fixed 5 years ago Opened 5 years ago by sbose.

@lslebodn in #3653:
The configure time detection of function PyErr_NewExceptionWithDoc is twice in output.

checking for python2... yes
checking for python2... /usr/bin/python2
checking for python3... yes
checking for python3... /usr/bin/python3
checking whether /usr/bin/python2 version is >= 2.6... yes
checking for /usr/bin/python2 version... 2.7
checking for /usr/bin/python2 platform... linux2
checking for /usr/bin/python2 script directory... ${prefix}/lib/python2.7/site-packages
checking for /usr/bin/python2 extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
checking for python2.7-config... /usr/bin/python2.7-config
checking for headers required to compile python extensions... found
checking for PyErr_NewExceptionWithDoc... no
checking whether /usr/bin/python3 version is >= 3.3... yes
checking for /usr/bin/python3 version... 3.6
checking for /usr/bin/python3 platform... linux
checking for /usr/bin/python3 script directory... ${prefix}/lib/python3.6/site-packages
checking for /usr/bin/python3 extension module directory... ${exec_prefix}/lib64/python3.6/site-packages
checking for python3.6-config... /usr/bin/python3.6-config
checking for headers required to compile python extensions... found
checking for PyErr_NewExceptionWithDoc... (cached) no

But as we can see the 2nd value was cached. It was not a problem with python-2.7 + python-3.x because the function was already properly detected for python2. But it would not work with python-2.6 + python3.x which fedora/debian never had as a default for python2 and python3.

There are few ways how to fix it. Either have two separate detections of PyErr_NewExceptionWithDoc with different name of macros with existing function (HAVE_PY2ERR_NEWEXCEPTIONWITHDOC, HAVE_PY3ERR_NEWEXCEPTIONWITHDOC) or drop configure time detection of function and rely on version of python in python-header files.


Metadata Update from @jhrozek:
- Issue set to the milestone: SSSD 2.0

5 years ago

Metadata Update from @jhrozek:
- Issue assigned to lslebodn
- Issue close_status updated to: Fixed
- Issue set to the milestone: SSSD 1.16.2 (was: SSSD 2.0)
- Issue status updated to: Closed (was: Open)

5 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/4676

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata