Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure script breaks with Python 3.10 #1135

Closed
leahneukirchen opened this issue Sep 27, 2021 · 4 comments
Closed

configure script breaks with Python 3.10 #1135

leahneukirchen opened this issue Sep 27, 2021 · 4 comments

Comments

@leahneukirchen
Copy link

Describe the bug

The configure script doesn't detect Python 3.10 properly.

To Reproduce
Steps to reproduce the behavior:

  • install python3.10
  • ./configure --with-python
checking for a Python interpreter with version >= 2.3... python                 
checking for python... /usr/bin/python                                          
checking for python version... 3.1                                              
checking for python platform... linux                                           
checking for python script directory... ${prefix}/lib/python3.10/site-packages  
checking for python extension module directory... ${exec_prefix}/lib/python3.10/
site-packages                                                                   
checking for headers required to compile python extensions... not found         
configure: WARNING: could not find Python headers                               

Expected behavior

checking for python version... 3.10
...
checking for headers required to compile python extensions... found

Desktop (please complete the following information):

  • OS: Void Linux x86_64/glibc

Additional context

The test hardcodes three characters for the python version:

  am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`

As a workaround, one can pass am_cv_python_version=3.10 to ./configure, then it works fine.

You should update the AM_PATH_PYTHON in aclocal.m4.

@c72578
Copy link
Collaborator

c72578 commented Oct 1, 2021

@leahneukirchen this does not look like an issue caused by RRDtool.
See a current Fedora build log [1]:

checking for a Python interpreter with version >= 2.3... python3
checking for python3... /usr/bin/python3
checking for python3 version... 3.10
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.10/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib64/python3.10/site-packages
checking for headers required to compile python extensions... found

Involved package versions, e.g. automake 1.16.2 [2]

[1] https://kojipkgs.fedoraproject.org//packages/rrdtool/1.7.2/21.fc35/data/logs/x86_64/build.log
[2] https://kojipkgs.fedoraproject.org//packages/rrdtool/1.7.2/21.fc35/data/logs/x86_64/root.log

@c72578
Copy link
Collaborator

c72578 commented Oct 1, 2021

This is how it has been fixed in Fedora for automake-1.16.2:
https://src.fedoraproject.org/rpms/automake/c/3327906e94b767330433fda3da2d0997292c55ad?branch=rawhide

Upstream fix:
python: determine Python (3.10) version number correctly.
https://git.savannah.gnu.org/cgit/automake.git/commit/?id=e21d46fddd0753e66a4acda88317670fee07f3e6
This fix is included in automake 1.16.3 and 1.16.4

@leahneukirchen
Copy link
Author

Yes, reconfiguring with a new automake fixes it.

Still, the configure script in the latest release tarball is broken.

@c72578
Copy link
Collaborator

c72578 commented Oct 1, 2021

In order to avoid this, ./bootstrap should be run first.

@c72578 c72578 closed this as completed Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants