Just as the title says, I’m trying to build ElmerFEM-GUI, but I’m unable to make it through the configuration process because it seems that a VTK cmake script is failing to find the installed python package. The issue is that I have Python 3.10.6 installed. This was verified with python3 --version.
The output of cmake for the issue relating to Python is below.
Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so found components: OpenGL GLX
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Python3 (missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS
Interpreter Development.Module) (Required is at least version "3.10")
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindPython/Support.cmake:3180 (find_package_handle_standard_args)
/usr/share/cmake-3.22/Modules/FindPython3.cmake:490 (include)
/usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/VTK-vtk-module-find-packages.cmake:350 (find_package)
/usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtk-config.cmake:150 (include)
ElmerGUI/CMakeLists.txt:106 (FIND_PACKAGE)
Configuring incomplete, errors occurred!
See also "/zfs_pool/Engineering/elmerfem/build/CMakeFiles/CMakeOutput.log".
See also "/zfs_pool/Engineering/elmerfem/build/CMakeFiles/CMakeError.log".
the (missing: Python3_INCLUDE_DIRS message is your clue that you need the development package for python3 - so not just the interpreter, but sudo apt install python3-dev as well. You can look at the vtk build doc for more information about dependencies.
So, I ran into many issues since your message. I ultimately reinstalled Ubuntu 20.04 as opposed the 22.04 I was previously using, but I’m back at the same point just with out the (missing: Python3_INCLUDE_DIRS) message. Unlike previously, I do have python3.9-dev installed.
The error output is listed below. Please note that line 3226 should be 3222, but I have added message lines to “*/FindPython/Support.cmake” in an attempt to perform a bit of debugging. The code I added is further down.
Update: I was able to make it just a touch further. I had to change the maximum allowable cmake version to be 3.17 by modifying line 3210. I have 3.16.3 installed, so it was killing the compile. However, I now have the error messages shown below.
PREFIX: Python3
required_vars: Python3_EXECUTABLE;Python3_INCLUDE_DIRS
version_var:
reason_failure:
CMake Error at cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find Python3 (missing: Development.Module) (found suitable
version "3.9.5", minimum required is "3.9")
Call Stack (most recent call first):
cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
/usr/local/lib/cmake/vtk-9.2/patches/3.23/FindPython/Support.cmake:3226 (find_package_handle_standard_args)
/usr/local/lib/cmake/vtk-9.2/patches/3.23/FindPython3.cmake:490 (include)
/usr/local/lib/cmake/vtk-9.2/VTK-vtk-module-find-packages.cmake:303 (find_package)
/usr/local/lib/cmake/vtk-9.2/vtk-config.cmake:152 (include)
ElmerGUI/CMakeLists.txt:106 (FIND_PACKAGE)