Am 05.02.24 um 09:52 schrieb Andreas Schwab:
On Feb 03 2024, Jan Engelhardt wrote:

There is a different problem with py3.12, too:

security:forensics/lib* does a multipython build, which errors out with

...
[   43s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/libevt-20240203/pyevt'
[   43s]  /usr/bin/mkdir -p '/home/abuild/rpmbuild/BUILD/rtpython312_bin_suffix/usr/'
[   43s]  /usr/bin/bash ../libtool   --mode=install /usr/bin/install -c   pyevt.la '/home/abuild/rpmbuild/BUILD/rtpython312_bin_suffix/usr/'
[   43s] libtool:   error: error: cannot install 'pyevt.la' to a directory not ending in /usr/

That only seems to happen with python 3.12 && security:forensics,
and the error message does not even make sense, of course it ends in usr/.
It is the trailing slash that apparently confuses it, but then the
library directory should be /usr/lib or /usr/lib64, not /usr.  Looks
like the expansion of a variable with an empty value.


Correct. (There must be some copy and paste error. The current build log of libevt does not have the unexpanded python312_bin_suffix in that path:

[   60s]  /usr/bin/bash ../libtool   --mode=install /usr/bin/install -c   pyevt.la '/home/abuild/rpmbuild/BUILD/rt/usr/'
[   60s] libtool:   error: error: cannot install 'pyevt.la' to a directory not ending in /usr

Compare to the python3.10 iteration before:

[   44s]  /usr/bin/mkdir -p '/home/abuild/rpmbuild/BUILD/rt/usr/lib64/python3.10/site-packages'
[   44s]  /usr/bin/bash ../libtool   --mode=install /usr/bin/install -c   pyevt.la '/home/abuild/rpmbuild/BUILD/rt/usr/lib64/python3.10/site-packages'


So don't let yourself mislead you by the bogus error message. The real problem is that python 3.12 removed distutils from the standard library. Upstream's python autoconf macro depends on it. It's all either solved by replacing distutils.sysconfig with sysconfig [1] or providing distutils from setuptools in the interim [2].


 - Ben

[1] https://github.com/libyal/libbde/pull/68
[2] https://build.opensuse.org/request/show/1143980