Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302908 - sys-libs/cracklib-2.8.15 compile fails with python3.1
Summary: sys-libs/cracklib-2.8.15 compile fails with python3.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-30 20:46 UTC by Neil Funk
Modified: 2010-06-02 06:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Funk 2010-01-30 20:46:04 UTC
cracklib's configure script uses the old python syntax of "print sys.version" instad of the Python3-compatible "print(sys.version)"

This causes the configure to fail when python3.1 is set as the system's python version.  It works fine with python2.6.

Reproducible: Always

Steps to Reproduce:
1. eselect python set python3.1
2. USE="python" emerge cracklib


Actual Results:  
checking for python... /usr/bin/python
checking for python version...   File "<string>", line 1
    import sys; print sys.version[:3]
                        ^
SyntaxError: invalid syntax

checking for python platform...   File "<string>", line 1
    import sys; print sys.platform
                        ^
SyntaxError: invalid syntax

checking for python script directory... ${prefix}/lib/python/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python/sit$
checking python/Python.h usability... no
checking python/Python.h presence... no
checking for python/Python.h... no
configure: error: python headers not found

Expected Results:  
No "print sys.version" error, allowing configure to find all Python headers - Like what happens when the system Python version is set to python2.6.

This same problem also occurs on cracklib-2.8.13-r1.
This shouldn't have anything to do with bug#301226.
Comment 1 SpanKY gentoo-dev 2010-02-14 16:40:23 UTC
it's the fault of python's own m4 code.  added a sed workaround in the meantime:
http://sources.gentoo.org/sys-libs/cracklib/cracklib-2.8.15.ebuild?r1=1.1&r2=1.2
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2010-06-02 06:23:12 UTC
I don't think this was correct solution. I'll post my thoughts in bug 316951.