Paraview 5.12.0: pvpython segmentation error with python 3.12.2

Hello

I am trying to build ParaView without X on Oracle Linux 9. I am using python 3.12.2, that I also build myself (with -fPIC). The build goes through just fine. Here my build parameters:

cmake -GNinja -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=TBB -DCMAKE_BUILD_TYPE=Release -DPARAVIEW_USE_QT=OFF -DVTK_USE_X=OFF -DVTK_OPENGL_HAS_EGL=ON -DVTK_PYTHON_OPTIONAL_LINK=OFF ../paraview

Now when I am trying to run pypython I get the following error:

*** Process received signal ***
Signal: Segmentation fault (11)
Signal code: Address not mapped (1)
Failing at address: 0x10
[ 0] /lib64/libc.so.6(+0x54db0)[0x7feeb06eedb0]
[ 1] /mnt/software/paraview/5.12.0_py-3.12.2/bin/../lib64/libvtkPythonInterpreter-pv5.12.so.1(+0xe8507)[0x7feeae615507]
[ 2] /mnt/software/paraview/5.12.0_py-3.12.2/bin/../lib64/libvtkPythonInterpreter-pv5.12.so.1(Py_RunMain+0x16)[0x7feeae616236]
[ 3] /mnt/software/paraview/5.12.0_py-3.12.2/bin/../lib64/libvtkPythonInterpreter-pv5.12.so.1(_ZN20vtkPythonInterpreter6PyMainEiPPc+0x2bc)[0x7feeae613dfc]
[ 4] bin/pvpython[0x430a44]
[ 5] /lib64/libc.so.6(+0x3feb0)[0x7feeb06d9eb0]
[ 6] /lib64/libc.so.6(__libc_start_main+0x80)[0x7feeb06d9f60]
[ 7] bin/pvpython[0x4304f5]
*** End of error message ***
Segmentation fault (core dumped)

I could not figure out what the issue was, so I downgraded python to 3.11.8 and otherwise left everything the same and the software works without problem. Do you have any idea where this is coming from? Is this an issue with ParaView and the newest python version?

Any help is very welcome!
Jasmin

Still stuck here, has anyone else been able to replicate this issue? Anyone have a hunch where the problem could be?

I’m afraid not many people must be compiling ParaView with Python 3.12.

@Charles_Gueunet was able to build ParaView with Python 3.12 and it was mostly working except some numpy issue.

I can confirma I was able to Run with Python 3.12, MPI. Only the FindData had issue because of numpy not found, certainly because of a configuration missing on my system.

It’s hard to say without digging more. Possible causes include mismatches in the Python headers and libraries used during the build and at runtime. Python 3.12 could also have changed initialization behaviors, but I would expect VTK to catch that in its testing.