https://docs.python.org/3/whatsnew/3.12.html#distutils
==> Starting package()...
*** Using PETSC_DIR=/tmp/makepkg/petsc/src/petsc-3.21.0 PETSC_ARCH=linux-c-opt ***
*** Copying PETSc to DESTDIR location: /tmp/makepkg/petsc/pkg/petsc/opt/petsc/linux-c-opt ***
====================================
Copy to DESTDIR /tmp/makepkg/petsc/pkg/petsc/opt/petsc/linux-c-opt is now complete.
Before use - please copy/install over to specified prefix: /opt/petsc/linux-c-opt
====================================
/usr/sbin/make --no-print-directory -f makefile PETSC_ARCH=linux-c-opt PETSC_DIR=/tmp/makepkg/petsc/src/petsc-3.21.0 PETSC_INSTALL=install install-builtafterpetsc
/usr/sbin/make --no-print-directory -f makefile PETSC_ARCH=linux-c-opt PETSC_DIR=/tmp/makepkg/petsc/src/petsc-3.21.0 PETSC_INSTALL=install petsc4py-install libmesh-install mfem-install slepc-install hpddm-install amrex-install bamg-install
*** Building petsc4py ***
Traceback (most recent call last):
File "/tmp/makepkg/petsc/src/petsc-3.21.0/src/binding/petsc4py/setup.py", line 273, in <module>
main()
File "/tmp/makepkg/petsc/src/petsc-3.21.0/src/binding/petsc4py/setup.py", line 270, in main
run_setup()
File "/tmp/makepkg/petsc/src/petsc-3.21.0/src/binding/petsc4py/setup.py", line 237, in run_setup
conf = __import__(F('conf{name}'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/makepkg/petsc/src/petsc-3.21.0/src/binding/petsc4py/conf/confpetsc.py", line 25, in <module>
from distutils.core import setup as _setup
ModuleNotFoundError: No module named 'distutils'
**************************ERROR*************************************
Error building petsc4py.
********************************************************************
make[3]: *** [/tmp/makepkg/petsc/src/petsc-3.21.0/linux-c-opt/lib/petsc/conf/petscrules:45: petsc4pybuild] Error 1
make[2]: *** [makefile:237: install-builtafterpetsc] Error 2
make[1]: *** [makefile:229: install] Error 2
make: *** [GNUmakefile:17: install] Error 2
==> ERROR: A failure occurred in package().
Pinned Comments
MartinDiehl commented on 2022-10-06 10:26 (UTC)
@jrohwer
When building PETSc (more specifically, petsc4py), one test (ex100 from ksp) will fail if a previous (major) version is installed. I could not figure out why this happens. The solution would be to build in a clean root (which is a little bit complicated due to dependency on other AUR packages) or simply uninstall the old version before.
Any help to solve this issue is welcomed.