missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Discussion about building and installing Elmer
draena
Posts: 6
Joined: 18 May 2021, 12:34
Antispam: Yes

missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by draena »

Greetings, I'm trying to build elmerGUI wiht OCCT and VTK support to operate with step files and such on a Void GNU/Linux with a ppc64le architecture and cmake complains about not being able to find python3:

Code: Select all

❯ cmake -DWITH_OpenMP:BOOL=TRUE -DWITH_MPI:BOOL=TRUE -DWITH_QT5:BOOL=TRUE -DWITH_PARAVIEW:BOOL=TRUE -WITH_QWT:BOOL=TRUE -DWITH_VTK:BOOL=TRUE -DWITH_LUA:BOOL=TRUE -DWITH_MATC:BOOL=TRUE -DWITH_OCC=TRUE -DOCE_DIR=/usr/lib/cmake/opencascade -DWITH_ELMERGUI:BOOL=TRUE -DCMAKE_INSTALL_PREFIX=../install ../elmerfem
-- The Fortran compiler identification is GNU 10.2.1
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 - yes
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether GFortran version >= 4.8 -- yes
CMake Deprecation Warning at contrib/lua-5.1.5/CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP Fortran flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp  
-- Checking whether /usr/bin/gfortran supports OpenMP 4.0
-- Checking whether /usr/bin/gfortran supports OpenMP 4.0 -- yes
-- Checking whether /usr/bin/gfortran supports OpenMP 4.5
-- Checking whether /usr/bin/gfortran supports OpenMP 4.5 -- yes
-- Found MPI_C: /usr/lib64/libmpi.so  
-- Found MPI_CXX: /usr/lib64/libmpi.so  
-- Found MPI_Fortran: /usr/lib64/libmpi_usempif08.so;/usr/lib64/libmpi_usempi_ignore_tkr.so;/usr/lib64/libmpi_mpifh.so;/usr/lib64/libmpi.so  
CMake Deprecation Warning at cmake/Modules/FindMKL.cmake:2 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  CMakeLists.txt:302 (FIND_PACKAGE)


-- ------------------------------------------------
-- Mesh adaptation 2D/3D looking for [Mmg] tools 
CMake Deprecation Warning at cmake/Modules/FindMMG.cmake:14 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  CMakeLists.txt:367 (FIND_PACKAGE)


--   Library not found: >MMG_FOUND< 
--     Missing: >MMG_INCLUDE_DIR< , >MMG_LIBRARY<, to compile MMG3DSolver
-- ------------------------------------------------
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Found BLAS: /usr/lib/libblas.so  
-- Looking for Fortran cheev
-- Looking for Fortran cheev - not found
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- Found LAPACK: /usr/lib/liblapack.so;/usr/lib/libblas.so  
-- Checking whether /usr/bin/gfortran supports PROCEDURE POINTER
-- Checking whether /usr/bin/gfortran supports PROCEDURE POINTER -- yes
-- Checking whether /usr/bin/gfortran supports CONTIGUOUS
-- Checking whether /usr/bin/gfortran supports CONTIGUOUS -- yes
-- Checking whether /usr/bin/gfortran supports EXECUTE_COMMAND_LINE
-- Checking whether /usr/bin/gfortran supports EXECUTE_COMMAND_LINE -- yes
CMake Warning (dev) at /usr/share/cmake-3.20/Modules/CheckIncludeFiles.cmake:122 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    /usr/lib/libblas.so;/usr/lib/liblapack.so;/usr/lib/libblas.so

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  matc/CMakeLists.txt:4 (CHECK_INCLUDE_FILES)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for sys/types.h
CMake Warning (dev) at /usr/share/cmake-3.20/Modules/CheckIncludeFile.cmake:82 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    /usr/lib/libblas.so;/usr/lib/liblapack.so;/usr/lib/libblas.so

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  /usr/share/cmake-3.20/Modules/CheckTypeSize.cmake:249 (check_include_file)
  fem/CMakeLists.txt:47 (CHECK_TYPE_SIZE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long
-- Check size of long - done
-- Found 125 modules from /home/yamira/elmer/elmerfem/fem/src/modules
--  ELMERSOLVER_RPATH_STRING_MOD $ORIGIN/../lib/elmersolver
--  ELMERLIB_RPATH_STRING $ORIGIN/
CMake Deprecation Warning at fem/tests/CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Skipping test PoissonDG with 16 procs
-- Skipping test WinkelPoissonMetisKwayDual with 16 procs
-- Skipping test WinkelPoissonMetisKwayNodal with 16 procs
-- Found 700 tests
CMake Deprecation Warning at elmergrid/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at elmergrid/src/metis-5.1.0/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Looking for execinfo.h
CMake Warning (dev) at /usr/share/cmake-3.20/Modules/CheckIncludeFile.cmake:82 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    /usr/lib/libblas.so;/usr/lib/liblapack.so;/usr/lib/libblas.so

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  elmergrid/src/metis-5.1.0/GKlib/GKlibSystem.cmake:97 (check_include_file)
  elmergrid/src/metis-5.1.0/CMakeLists.txt:21 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for execinfo.h - found
-- Looking for getline
-- Looking for getline - found
-- checking for thread-local storage - found
--   Building ElmerGUI
-- ------------------------------------------------
CMake Deprecation Warning at ElmerGUI/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- ------------------------------------------------
-- Qt5 non-Windows packaging
--   [ElmerGUI] Qt5:               
--   [ElmerGUI] Qt5 Libraries: Qt5::OpenGL Qt5::Xml Qt5::Script Qt5::Gui Qt5::Core
-- ------------------------------------------------
CMake Warning (dev) at /usr/share/cmake-3.20/Modules/FindOpenGL.cmake:315 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  ElmerGUI/cmake/Modules/FindQwt.cmake:10 (INCLUDE)
  ElmerGUI/CMakeLists.txt:56 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (OpenGL)
  does not match the name of the calling package (Qwt).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/cmake-3.20/Modules/FindOpenGL.cmake:443 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  ElmerGUI/cmake/Modules/FindQwt.cmake:10 (INCLUDE)
  ElmerGUI/CMakeLists.txt:56 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/libOpenGL.so   
CMake Warning (dev) at /usr/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (Qt3) does
  not match the name of the calling package (Qwt).  This can lead to problems
  in calling code that expects `find_package` result variables (e.g.,
  `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/cmake-3.20/Modules/FindQt3.cmake:213 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /usr/share/cmake-3.20/Modules/FindQt.cmake:160 (include)
  ElmerGUI/cmake/Modules/FindQwt.cmake:11 (INCLUDE)
  ElmerGUI/CMakeLists.txt:56 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Qt3 (missing: QT_QT_LIBRARY QT_INCLUDE_DIR) 
CMake was unable to find desired Qt version: 3. Set advanced values QT_QMAKE_EXECUTABLE and QT3_QGLOBAL_H_FILE.
--   [ElmerGUI] Qwt:             TRUE
--   [ElmerGUI] QWT_LIBRARY:     /usr/lib/libqwt.so
--   [ElmerGUI] QWT_INCLUDE_DIR: /usr/include/qwt
-- ------------------------------------------------
--   [ElmerGUI] OCE:               1
--   [ElmerGUI] OCE_VERSION:       
--   [ElmerGUI] OCE_INCLUDE_DIRS:  
--   [ElmerGUI] ELMER_OCC_LIBS:    TKernel;TKMath;TKG3d;TKG2d;TKBRep;TKSTEP;TKMesh;TKIGES;TKG2d;TKGeomBase;TKBool;TKBO;TKGeomAlgo;TKPrim;TKShHealing;TKSTEP209;TKSTEPAttr;TKSTEPBase;TKTopAlgo;TKXSBase
-- ------------------------------------------------
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found GLEW: /usr/lib/libGLEW.so  
-- Found OpenGL: /usr/lib/libOpenGL.so  found components:  OpenGL GLX 
CMake Error at /usr/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS
  Interpreter Development.Module) (Required is at least version "3.9")
Call Stack (most recent call first):
  /usr/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.20/Modules/FindPython/Support.cmake:3165 (find_package_handle_standard_args)
  /usr/share/cmake-3.20/Modules/FindPython3.cmake:485 (include)
  /usr/lib64/cmake/vtk-9.0/VTK-vtk-module-find-packages.cmake:303 (find_package)
  /usr/lib64/cmake/vtk-9.0/vtk-config.cmake:131 (include)
  ElmerGUI/CMakeLists.txt:93 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "/home/yamira/elmer/build/CMakeFiles/CMakeOutput.log".
See also "/home/yamira/elmer/build/CMakeFiles/CMakeError.log".
I have python3 and python3 devel installed:

Code: Select all

$ xbpq-query -Rs python3
[*] python3-devel
[*] python3

Thank you in advance.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by kevinarden »

If you type python3 from the terminal does it start?
draena
Posts: 6
Joined: 18 May 2021, 12:34
Antispam: Yes

Re: missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by draena »

kevinarden wrote: 18 May 2021, 13:21 If you type python3 from the terminal does it start?
Yes it does, I can run python3 apps with no issue at the moment
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by kevinarden »

It does say
(Required is at least version "3.9"

when you type python3 what version does it report back
draena
Posts: 6
Joined: 18 May 2021, 12:34
Antispam: Yes

Re: missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by draena »

kevinarden wrote: 18 May 2021, 19:59 It does say
(Required is at least version "3.9"

when you type python3 what version does it report back

Code: Select all

Python 3.9.5 (default, May  6 2021, 02:51:12) 
[GCC 10.2.1 20201203] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by kevinarden »

That looks right which makes the error more confusing
draena
Posts: 6
Joined: 18 May 2021, 12:34
Antispam: Yes

Re: missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by draena »

kevinarden wrote: 18 May 2021, 22:40 That looks right which makes the error more confusing
:(
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by kevinarden »

It may be looking for a library, and on unix platforms cmake assumes they are located in certain directory names. I am not familiar with Void GNU/Linux with a ppc64le architecture.

what does this command report
find /usr -name "libpython*"
draena
Posts: 6
Joined: 18 May 2021, 12:34
Antispam: Yes

Re: missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by draena »

kevinarden wrote: 19 May 2021, 13:13 It may be looking for a library, and on unix platforms cmake assumes they are located in certain directory names. I am not familiar with Void GNU/Linux with a ppc64le architecture.

what does this command report
find /usr -name "libpython*"
Greetings, here you have it:

Code: Select all

❯ sudo find /usr -name "libpython*"
/usr/lib/libreoffice/program/libpythonloaderlo.so
/usr/lib/libpython3.9.so
/usr/lib/libpython2.7.so
/usr/lib/libpython3.9.so.1.0
/usr/lib/libpython3.so
/usr/lib/libpeas-1.0/loaders/libpython3loader.so
/usr/lib/libpython2.7.so.1.0
/usr/lib/libpython3.9.a
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS When building with OCCT and VTK

Post by kevinarden »

Looks OK. I don't have any more ideas.
Post Reply