Re: CrackLib-2.10.2 python module
| Newsgroups | gmane.linux.lfs.beyond.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2024-10-30 at 22:07 -0500, Bruce Dubbs wrote:
> I've been checking the packages that use Python with python-3.13.
>
> In the cracklib build I've been unable to build the python module that we mention
> in BLFS:
>
> Installed Libraries: libcrack.so and the _cracklib.so (Python module)
>
> First, the configure command refuses to find python3.13/Python.h, yet that exists:
>
> -rw-r--r-- 1 root root 3960 Oct 28 13:26 /usr/include/python3.13/Python.h
>
> If I hack configure to force it to build the module, I get:
>
> libtool: compile: gcc -DHAVE_CONFIG_H
> -DDEFAULT_CRACKLIB_DICT=\"/usr/local/share/cracklib/pw_dict\"
> -DPYTHON_H=\"python3.13/Python.h\" -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\"
> -I../lib -Wall -g -O2 -MT _cracklib.lo -MD -MP -MF .deps/_cracklib.Tpo -c _cracklib.c
> -fPIC -DPIC -o .libs/_cracklib.o
> In file included from /usr/include/python3.13/pyatomic.h:9,
> from /usr/include/python3.13/Python.h:70,
> from _cracklib.c:28:
> /usr/include/python3.13/cpython/pyatomic.h:532:12: fatal error:
> cpython/pyatomic_gcc.h: No such file or directory
> 532 | # include "cpython/pyatomic_gcc.h"
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
>
> We do not mention cpython anywhere in BLFS although the Python build installs 50
> header files in the /usr/include/python3.13/cpython/ directory including pyatomic_gcc.h
>
> I do note that Arch Linux passes --without-python to configure.
>
> The easy way to go is to just remove the mention of the python module.
>
> What do you think?
What I've done to make it work:
autoreconf &&
CPPFLAGS+=' -I /usr/include/python3.13' \
./configure --prefix=/usr \
--disable-static \
--with-default-dict=/usr/lib/cracklib/pw_dict &&
sed 's/makeSuite/TestLoader().loadTestsFromTestCase/' \
-i ./python/test_cracklib.py
make &&
make install
I.e. "autoreconf" makes it to recognize python3.13 as an interpreter,
and CPPFLAGS makes it able to find pyatomic_gcc.h. The sed adapts the
test suite for Python 3.13.
Then `python3 -c 'import cracklib; cracklib.test()'` for testing the
python module.
--
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University
--
http://lists.linuxfromscratch.org/sympa/info/blfs-dev
Unsubscribe: See the above information page