Cmake fails - picking up OCCT inside PrusaSlicer?

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by BDL42 »

chennes wrote: Sun Mar 12, 2023 3:13 am You can try deleting your CMakeCache.txt file and running the command again, to see if your local cache is messing things up. You can also try (again deleting your cache first) setting CMAKE_IGNORE_PATH, e.g.

Code: Select all

cmake ../freecad-source -DCMAKE_IGNORE_PATH=/home/xxx/Apps/PrusaSlicer/
Can one presume that the CMakeCache.txt we are talking about is in /home/xxx/Apps/freecad-build? Inside the file, using cmake-gui, it clearly shows that OpenCascade_DIR is wrong.
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by BDL42 »

adrianinsaval wrote: Sun Mar 12, 2023 4:51 am what OS are you running? is there a package something like occt-dev available in your package manager that would provide the cmake config file?
Pop!OS, an Ubuntu variant. There is no package of that name.

However, all of the libocct*-dev packages are installed. Only occt related files that are not installed are occt-misc and libocct-doc. occt-misc is said to contain resource files.
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by BDL42 »

Does FreeCAD support vtk9? My package manager is showing some vtk9 now. I have mostly vtk7 installed.
Strangely I notice that libocct-visualization is 7.5.1, but the rest of the libvtk7 is 7.1.1
User avatar
chennes
Veteran
Posts: 3909
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by chennes »

BDL42 wrote: Sun Mar 12, 2023 3:01 pm Can one presume that the CMakeCache.txt we are talking about is in /home/xxx/Apps/freecad-build? Inside the file, using cmake-gui, it clearly shows that OpenCascade_DIR is wrong.
Most of the time that variable is unset, and unused. Our cMake scripts re: OpenCASCADE are... "goofy." They don't consistently use the correct package name, and that makes things confusing. For example, on my system that variable is unset, but the two I cited above are set (and obviously it compiles fine).

At any rate, yes, that's the file you should delete to clear the cache. Since you had it working before, all that we should need to do is get cMake to ignore that Prusa directory, which is the purpose of the CMAKE_IGNORE_PATH directive.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by BDL42 »

BDL42 wrote: Sun Mar 12, 2023 3:01 pm
chennes wrote: Sun Mar 12, 2023 3:13 am You can try deleting your CMakeCache.txt file and running the command again, to see if your local cache is messing things up. You can also try (again deleting your cache first) setting CMAKE_IGNORE_PATH, e.g.

Code: Select all

cmake ../freecad-source -DCMAKE_IGNORE_PATH=/home/xxx/Apps/PrusaSlicer/
Can one presume that the CMakeCache.txt we are talking about is in /home/xxx/Apps/freecad-build? Inside the file, using cmake-gui, it clearly shows that OpenCascade_DIR is wrong.
Even after deleting the CMakeCache.txt file AND then using the above ignore path cmake is still burrowing into PrusaSlicer!

Code: Select all

$ cmake ../freecad-source -DCMAKE_IGNORE_PATH=/home/xxx/Apps/PrusaSlicer/
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- 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
-- Compiler: GNU, version: 11.3.0
-- Looking for GL/gl.h
-- Looking for GL/gl.h - found
-- Looking for C++ include istream
-- Looking for C++ include istream - found
-- Looking for C++ include ostream
-- Looking for C++ include ostream - found
-- Looking for C++ include fstream
-- Looking for C++ include fstream - found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - found
-- Looking for C++ include ios
-- Looking for C++ include ios - found
-- Looking for C++ include iostream
-- Looking for C++ include iostream - found
-- Looking for C++ include iomanip
-- Looking for C++ include iomanip - found
-- Looking for C++ include iostream
-- Looking for C++ include iostream - found
-- Check for STD namespace
-- Check for STD namespace - found
-- prefix: /usr/local
-- bindir: bin
-- datadir: share
-- docdir: share/doc/FreeCAD
-- includedir: include
-- libdir: lib
-- cmake: 3.22.1
-- Compiling with Qt 5
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.1") found components: doxygen dot 
-- Checking for connection to GitHub...
-- GitHub connection established for FetchContent
-- Module support is disabled.
-- Version: 9.1.0
-- Build type: 
-- CXX_STANDARD: 17
-- Performing Test has_std_17_flag
-- Performing Test has_std_17_flag - Success
-- Performing Test has_std_1z_flag
-- Performing Test has_std_1z_flag - Success
-- Required features: cxx_variadic_templates
-- fmt was downloaded using FetchContent into /home/xxx/Apps/freecad-build/_deps/fmt-src
-- Found Python3: /usr/bin/python3.10 (found version "3.10.6") found components: Interpreter Development Development.Module Development.Embed 
-- Found XercesC: /usr/lib/x86_64-linux-gnu/libxerces-c.so (found version "3.2.3") 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- PyCXX found:
--   Headers:  /home/xxx/Apps/freecad-source/src
--   Sources:  /home/xxx/Apps/freecad-source/src/CXX
--   Version:  7.1.7
CMake Error at /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEConfig.cmake:95 (include):
  include could not find requested file:

    /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEFoundationClassesTargets.cmake
Call Stack (most recent call first):
  cMake/FindOCC.cmake:39 (find_package)
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEConfig.cmake:95 (include):
  include could not find requested file:

    /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEModelingDataTargets.cmake
Call Stack (most recent call first):
  cMake/FindOCC.cmake:39 (find_package)
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEConfig.cmake:95 (include):
  include could not find requested file:

    /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEModelingAlgorithmsTargets.cmake
Call Stack (most recent call first):
  cMake/FindOCC.cmake:39 (find_package)
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEConfig.cmake:95 (include):
  include could not find requested file:

    /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEVisualizationTargets.cmake
Call Stack (most recent call first):
  cMake/FindOCC.cmake:39 (find_package)
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEConfig.cmake:95 (include):
  include could not find requested file:

    /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEApplicationFrameworkTargets.cmake
Call Stack (most recent call first):
  cMake/FindOCC.cmake:39 (find_package)
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEConfig.cmake:95 (include):
  include could not find requested file:

    /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/dep_OCCT-build/OpenCASCADEDataExchangeTargets.cmake
Call Stack (most recent call first):
  cMake/FindOCC.cmake:39 (find_package)
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at cMake/FindOCC.cmake:101 (file):
  file STRINGS file
  "/home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/include/opencascade/Standard_Version.hxx"
  cannot be read.
Call Stack (most recent call first):
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at cMake/FindOCC.cmake:104 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at cMake/FindOCC.cmake:105 (file):
  file STRINGS file
  "/home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/include/opencascade/Standard_Version.hxx"
  cannot be read.
Call Stack (most recent call first):
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at cMake/FindOCC.cmake:108 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at cMake/FindOCC.cmake:109 (file):
  file STRINGS file
  "/home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/include/opencascade/Standard_Version.hxx"
  cannot be read.
Call Stack (most recent call first):
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


CMake Error at cMake/FindOCC.cmake:112 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  cMake/FreeCAD_Helpers/SetupOpenCasCade.cmake:4 (find_package)
  CMakeLists.txt:53 (SetupOpenCasCade)


-- Found OCC: /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/include/opencascade (found version "..") 
-- -- Found OCE/OpenCASCADE version: ..
-- -- OCE/OpenCASCADE include directory: /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/include/opencascade
-- -- OCE/OpenCASCADE shared libraries directory: /home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/lib
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found OpenGLU: /usr/lib/x86_64-linux-gnu/libGLU.so
-- The imported target "vtkParseOGLExt" references the file
   "/usr/bin/vtkParseOGLExt-7.1"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- The imported target "pvtk" references the file
   "/usr/bin/pvtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- VTK components: vtkCommonCore;vtkCommonDataModel;vtkFiltersVerdict;vtkIOXML;vtkFiltersCore;vtkFiltersGeneral;vtkIOLegacy;vtkFiltersExtraction;vtkFiltersSources;vtkFiltersGeometry;vtkIOMPIParallel;vtkParallelMPI;vtkhdf5;vtkFiltersParallelDIY2;vtkRenderingCore;vtkInteractionStyle;vtkRenderingFreeType;vtkRenderingOpenGL2
-- Check for medfile (libmed and libmedc) ...
-- Found MEDFile: /usr/include  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- We guess that libmed was built using hdf5-openmpi version
-- Checking for one of the modules 'hdf5-openmpi'
-- Checking for one of the modules 'ompi-cxx'
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.65") found components: filesystem program_options regex system thread date_time 
-- Found SWIG: /usr/bin/swig4.0 (found version "4.0.2")  
-- Found Eigen3: /usr/include/eigen3 (found suitable version "3.4.0", minimum required is "2.91.0") 
-- Found Threads: TRUE  
-- Set up to compile with Qt 5.15.3
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.11.1") 
-- Found Coin3D: /usr/lib/x86_64-linux-gnu/libCoin.so  
-- Found Spnav: /usr/lib/libspnav.so  
-- Shiboken2Config: Using default python: .cpython-310-x86_64-linux-gnu
-- Found PythonInterp: /usr/bin/python3.10 (found suitable version "3.10.6", minimum required is "3") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.10.so (found suitable version "3.10.6", minimum required is "3") 
-- SHIBOKEN_PYTHON_INCLUDE_DIRS computed to value: '/usr/include/python3.10'
-- SHIBOKEN_PYTHON_LIBRARIES computed to value: ''
-- libshiboken built for RelWithDebInfo
-- PYTHON_CONFIG_SUFFIX: .cpython-310-x86_64-linux-gnu
-- libshiboken built for RelWithDebInfo
-- PySide 5.15.2 Python module found at /usr/lib/python3/dist-packages/PySide2.

-- Found Matplotlib: /usr/lib/python3/dist-packages/matplotlib (found version "3.5.1")
-- Platform is 64-bit, set -D_OCC64
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- [E57] Revison ID: E57Format-2.2.1-x86_64-linux-gcc11
-- [E57] Building static library
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: python310 
-- found Boost: 1_74
-- boost-incude dirs are: /usr/include
-- boost-python lib is: 
-- boost_LIBRARY_DIRS is: /usr/lib/x86_64-linux-gnu
-- Boost_LIBRARIES is: Boost::python
-- area module (for Path Workbench) will be installed to: lib
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
-- Coin3D doc is not installed
-- Found Python: /usr/bin/python3.10 (found version "3.10.6") found components: Interpreter 

   ==============
     System
   ==============

-- bindir:                      bin
-- BLAS:                        -undefined-
-- CMAKE_VERSION:               3.22.1
-- Compiler:                    /usr/bin/c++ (11.3.0)
-- datadir:                     share
-- docdir:                      share/doc/FreeCAD
-- includedir:                  include
-- libdir:                      lib
-- prefix:                      /usr/local
-- Python:                      3.10.6 [/usr/bin/python3.10] Suffix: [.cpython-310-x86_64-linux-gnu]

   ==============
     Config
   ==============

-- BUILD_FEM:                   ON
-- BUILD_GUI:                   ON
-- BUILD_SMESH:                 ON
-- BUILD_START:                 ON
-- BUILD_TECHDRAW:              ON
-- BUILD_TEST:                  ON
-- BUILD_VR:                    OFF 
-- BUILD_WEB:                   ON
-- CMAKE_BUILD_TYPE:            OFF 
-- CMAKE_CXX_FLAGS:             -Wall -Wextra -Wno-write-strings 
-- CMAKE_CXX_STANDARD:          17
-- CMAKE_INSTALL_PREFIX:        /usr/local
-- CMAKE_PREFIX_PATH:           -undefined-
-- FREECAD_CREATE_MAC_APP:      -undefined-
-- FREECAD_LIBPACK_USE:         OFF 
-- FREECAD_QT_VERSION:          Auto
-- FREECAD_USE_EXTERNAL_KDL:    OFF 
-- FREECAD_USE_EXTERNAL_SMESH:  OFF 
-- FREECAD_USE_FREETYPE:        ON
-- FREECAD_USE_PYBIND11:        OFF 
-- PYTHON_EXECUTABLE:           /usr/bin/python3.10
-- PYTHON_LIBRARY:              /usr/lib/x86_64-linux-gnu/libpython3.10.so
-- USE_CUDA:                    -undefined-
-- USE_OPENCV:                  -undefined-

   ==============
     Libraries
   ==============

-- Boost:                       1.74.0
-- Coin3D:                      4.0.0 [/usr/lib/x86_64-linux-gnu/libCoin.so] [/usr/include]
-- Coin3D_DOC:                  not found
-- DesignerPlugin:              not built (BUILD_DESIGNER_PLUGIN is OFF)
-- Doxygen:                     1.9.1 Language: English
-- Eigen3:                      3.4.0
-- fmt:                         Sources downloaded to /home/xxx/Apps/freecad-build/_deps/fmt-src
-- Freetype:                    2.11.1
-- HDF5:                        1.10.7
-- Matplotlib:                  3.5.1 PathDirs: /usr/lib/python3/dist-packages/matplotlib
-- MEDFile:                     4.1.0 [/usr/lib/x86_64-linux-gnu/libmedC.so] [/usr/include]
-- NETGEN:                      not enabled
-- OCC:                         .. [/home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/lib] [/home/xxx/Apps/PrusaSlicer/deps/build/dep_OCCT-prefix/src/include/opencascade]
-- OCC_Libs:                    [TKFillet;TKMesh;TKernel;TKG2d;TKG3d;TKMath;TKIGES;TKSTL;TKShHealing;TKXSBase;TKBool;TKBO;TKBRep;TKTopAlgo;TKGeomAlgo;TKGeomBase;TKOffset;TKPrim;TKSTEPBase;TKSTEPAttr;TKSTEP209;TKSTEP;TKHLR;TKFeat]
-- OpenGL_Lib:                  [/usr/lib/x86_64-linux-gnu/libGL.so]
-- OpenGLU_Incl:                [/usr/include]
-- OpenGLU_Lib:                 [/usr/lib/x86_64-linux-gnu/libGLU.so]
-- pivy:                        0.6.5
-- pybind11:                    not enabled
-- PYCXX:                       7.1.7 Incl: /home/xxx/Apps/freecad-source/src Src:/home/xxx/Apps/freecad-source/src/CXX
-- PySide:                      5.15.2 [/usr/lib/../include/PySide2]
-- PySideTools:                 v: 2  uic: [/usr/lib/qt5/bin/uic]  rcc: [/usr/lib/qt5/bin/rcc]
-- QtConcurrent:                5.15.3
-- QtCore:                      5.15.3
-- QtNetwork:                   5.15.3
-- QtOpenGL:                    5.15.3
-- QtPrintSupport:              5.15.3
-- QtSvg:                       5.15.3
-- QtUiTools:                   5.15.3
-- QtWebEngineWidgets:          5.15.9
-- QtWidgets:                   5.15.3
-- QtXml:                       5.15.3
-- Rift:                        not enabled (BUILD_VR)
-- Shiboken:                    5.15.2 [/usr/lib/../include/shiboken2;/usr/include/python3.10]
-- SMESH:                       7.7.1.0 build internal
-- SPNAV:                       [/usr/lib/libspnav.so] [/usr/include]
-- SWIG:                        4.0.2
-- VTK:                         7.1.1
-- XercesC:                     3.2.3 [/usr/lib/x86_64-linux-gnu/libxerces-c.so] [/usr/include]
-- ZLIB:                        1.2.11

=================================================
Now run 'cmake --build /home/xxx/Apps/freecad-build' to build FreeCAD
=================================================

-- Configuring incomplete, errors occurred!
See also "/home/xxx/Apps/freecad-build/CMakeFiles/CMakeOutput.log".
The file /usr/bin/vtk7 does exist, what the heck is going on?
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by adrianinsaval »

vtk is something else I don't think it's related, try installing occt-misc, looking on the internet it seems it contains the cmake files you need
if it doesn't detect this by default then add -DOpenCASCADE_DIR=/usr/lib/cmake/opencascade/ when running cmake
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by BDL42 »

Code: Select all

$ ls /usr/bin | grep vtk
tvtk_doc
vtk7
vtkEncodeString-7.1
vtkHashSource-7.1
vtkParseJava-7.1
vtkWrapHierarchy-7.1
vtkWrapJava-7.1
vtkWrapPython-7.1
vtkWrapPythonInit-7.1
vtkWrapTcl-7.1
vtkWrapTclInit-7.1
I do not have a file by the name of pvtk anywhere in my system, closest I have is PVTKDemo.tcl in /usr/share/doc/vtk7-examples/examples/Examples/ParallelProcessing/MPI/Tcl

Cmake is being fooled by a sandboxed build which generated static libs for PrusaSlicer. It descended into /Apps/PrusaSlicer despite being told not to. Perhaps the ignore command is not quite correct? I had to build static libs for PrusaSlicer dependencies, but all those static libs are in /Apps/PrusaSlicer/deps/build/destdir/usr/local/lib Libs like libTKBin.a, and libTKernel.a. What is going on with Cmake?
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by BDL42 »

adrianinsaval wrote: Sun Mar 12, 2023 4:09 pm vtk is something else I don't think it's related, try installing occt-misc, looking on the internet it seems it contains the cmake files you need
if it doesn't detect this by default then add -DOpenCASCADE_DIR=/usr/lib/cmake/opencascade/ when running cmake
Thanks, I will try that. I presume I need to delete the CMakeCache.txt file again?

This seemed to fix the problem. I deleted the cache file, installed occt-misc end executed the above. Cmake went to completion with no errors. My goodness, seems it's pretty easy to mess up cmake... Building the code now.
Last edited by BDL42 on Sun Mar 12, 2023 4:38 pm, edited 1 time in total.
User avatar
chennes
Veteran
Posts: 3909
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by chennes »

BDL42 wrote: Sun Mar 12, 2023 4:27 pm Perhaps the ignore command is not quite correct?
Yeah, it turns out it's not recursive (and the recursive version, CMAKE_IGNORE_PREFIX_PATH, is not available yet in your version of cMake). So you will need to give it the full path it is discovering for OCC, not just the start of it.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Cmake fails - picking up OCCT inside PrusaSlicer?

Post by BDL42 »

chennes wrote: Sun Mar 12, 2023 4:32 pm
BDL42 wrote: Sun Mar 12, 2023 4:27 pm Perhaps the ignore command is not quite correct?
Yeah, it turns out it's not recursive (and the recursive version, CMAKE_IGNORE_PREFIX_PATH, is not available yet in your version of cMake). So you will need to give it the full path it is discovering for OCC, not just the start of it.
Kind of lame, to have to burrow into a rat hole of a build of static libs. I'm surprised that cmake is so easily lead astray. One off beat alpha build and it screws up its configuration.

On the bright side, a direct command of telling cmake where the real OCCT libs are seemed to help. 89% built so far.
Post Reply