[Solved] Building fail

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
xXxStYxXx
Posts: 27
Joined: Sat Sep 24, 2022 9:27 pm

[Solved] Building fail

Post by xXxStYxXx »

Hello, I'm trying to make an out-of-source build of FreeCAD. I pulled the latest source code of FreeCAD which is version 0.20, installed all required libraries and packages.
I followed the Compile on Linux guide and faced a problem with building FreeCAD. Firstly I created folders for both source code and future build.
Then I ran CMAKE to configure environment with this command:

Code: Select all

cmake ../freecad-source
Seems like CMAKE did it job, I got this output:

Code: Select all

-- Compiler: GNU, version: 7.5.0
-- prefix: /usr/local
-- bindir: bin
-- datadir: share
-- docdir: share/doc/FreeCAD
-- includedir: include
-- libdir: lib
-- cmake: 3.10.2
-- PyCXX found:
--   Headers:  /home/sapr/freecad-source/src
--   Sources:  /home/sapr/freecad-source/src/CXX
--   Version:  7.1.7
-- -- OpenCASCADE Community Edition has been found.
-- -- Found OCE/OpenCASCADE version: 6.9.1
-- -- OCE/OpenCASCADE include directory: /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory: 
-- 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) ...
-- We guess that libmed was built using hdf5-openmpi version
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   system
--   thread
--   date_time
--   chrono
--   atomic
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pivy'
====================
shiboken2 not found.
====================

==================
PySide2 not found.
==================

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'shiboken2'
=================================
shiboken Python module not found.
=================================

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'PySide2'
================================
PySide2 Python module not found.
================================

-- Found Matplotlib: /usr/lib/python3/dist-packages/matplotlib (found version "2.1.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-gcc7
-- [E57] Building static library
-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1626 (message):
  No header defined for python36; skipping header check
Call Stack (most recent call first):
  src/Mod/Path/libarea/CMakeLists.txt:23 (find_package)


-- Could NOT find Boost
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1626 (message):
  No header defined for python3; skipping header check
Call Stack (most recent call first):
  src/Mod/Path/libarea/CMakeLists.txt:26 (find_package)


-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   python3
-- found Boost: 1_65_1
-- boost-incude dirs are: /usr/include
-- boost-python lib is: 
-- boost_LIBRARY_DIRS is: /usr/lib/x86_64-linux-gnu
-- Boost_LIBRARIES is: /usr/lib/x86_64-linux-gnu/libboost_python3.so
-- 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
-- Note: Doxygen docs will look better with graphviz's dot installed.
-- Coin3D doc is not installed
-- 
==============
Summary report
==============

-- Build type:          
-- Compiler:            /usr/bin/c++ (7.5.0)
-- Flags:               -Wall -Wextra -Wno-write-strings 
-- Standard:            Requires C++17
-- Python:              3.6.9 [/usr/bin/python3] []
-- PCL:                 not enabled
-- pybind11:            not enabled
-- Boost:               106501
-- XercesC:             3.2.0 [/usr/lib/x86_64-linux-gnu/libxerces-c.so] [/usr/include]
-- ZLIB:                1.2.11
-- PyCXX:               7.1.7 [/home/sapr/freecad-source/src]
-- OCC:                 6.9.1 [TKFillet;TKMesh;TKernel;TKG2d;TKG3d;TKMath;TKIGES;TKSTL;TKShHealing;TKXSBase;TKBool;TKBO;TKBRep;TKTopAlgo;TKGeomAlgo;TKGeomBase;TKOffset;TKPrim;TKSTEPBase;TKSTEPAttr;TKSTEP209;TKSTEP;TKHLR;TKFeat] [] [/usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce]
-- SMESH:               7.7.1.0 build internal
-- MEDFile:             3.0.6 [/usr/lib/x86_64-linux-gnu/libmedC.so] [/usr/include]
-- HDF5:                1.8.13
-- VTK:                 7.1.1
-- NETGEN:              not enabled
-- SWIG:                3.0.12
-- Eigen3               3.3.4
-- Qt5Core:             5.9.5
-- Qt5Network:          5.9.5
-- Qt5Xml:              5.9.5
-- Qt5XmlPatterns:      5.9.5
-- Qt5Widgets:          5.9.5
-- Qt5PrintSupport:     5.9.5
-- Qt5OpenGL:           5.9.5
-- Qt5Svg:              5.9.5
-- Qt5UiTools:          5.9.5
-- Qt5Concurrent:       5.9.5
-- Qt5WebKitWidgets:    5.212.0
-- Designer plugin:     not built per user request (BUILD_DESIGNER_PLUGIN)
-- Shiboken2:            [Shiboken2_DIR-NOTFOUND] []
-- PySide2:              []
--  IncludeDir:         Unable to find, python version mismatch?
-- PySide2Tools:        [/usr/bin/pyuic5] [/usr/bin/pyrcc5]
-- Freetype:            2.8.1
-- OpenGL:              /usr/lib/x86_64-linux-gnu/libGL.so
-- OpenGLU:             [/usr/lib/x86_64-linux-gnu/libGLU.so][/usr/include]
-- Coin3D:              4.0.0 [/usr/lib/x86_64-linux-gnu/libCoin.so] [/usr/include]
-- Pivy:                
-- SPNAV:               [/usr/lib/libspnav.so] [/usr/include]
-- Matplotlib:          2.1.1
-- Rift:                not enabled (BUILD_VR)
-- Doxygen:             1.8.13
-- Language:            English
-- Coin3D_DOC:          not found
=================================================
Now run 'cmake --build /home/sapr/freecad-build' to build FreeCAD
=================================================

-- Configuring done
-- Generating done
-- Build files have been written to: /home/sapr/freecad-build
And after that all I had to do is to run this command:

Code: Select all

make -j$(nproc --ignore=2)
But my build instantly fails with this error message:

Code: Select all

[  0%] Linking CXX shared library ../../../lib/libMEFISTO2.so
/usr/bin/ld: cannot find -lTKVCAF
/usr/bin/ld: cannot find -lTKVCAF
collect2: error: ld returned 1 exit status
src/3rdParty/salomesmesh/CMakeFiles/MEFISTO2.dir/build.make:163: recipe for target 'lib/libMEFISTO2.so' failed
make[2]: *** [lib/libMEFISTO2.so] Error 1
CMakeFiles/Makefile2:366: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/MEFISTO2.dir/all' failed
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/MEFISTO2.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
And I can't figure out what this error means. I found kinda the same topic with "cannot find -lTKVCAF" part but it didn't really help me.
So I wanted to know if anyone can explain what seems to be a problem here?

I'm actually new to both FreeCAD and Ubunthu/Linux so if I missed something important, please let me know

I'm using virtual machine with Ubunthu 18.04.6 LTS 64-Bit Oracle
Last edited by xXxStYxXx on Mon May 08, 2023 2:43 pm, edited 1 time in total.
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: Building fail

Post by waebbl »

xXxStYxXx wrote: Sun Sep 25, 2022 9:54 pm Seems like CMAKE did it job, I got this output:
The CMake configuration output contains several errors and IMO shouldn't have succeeded.
  • Pivy, which AFAIK is mandatory is not installed or found:

    Code: Select all

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'pivy'
    
  • Both, shiboken2 and pyside2 are missing or not found:

    Code: Select all

    ====================
    shiboken2 not found.
    ====================
    
    ==================
    PySide2 not found.
    ==================
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'shiboken2'
    =================================
    shiboken Python module not found.
    =================================
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'PySide2'
    ================================
    PySide2 Python module not found.
    ================================
    
    and in the summary report

    Code: Select all

    -- Shiboken2:            [Shiboken2_DIR-NOTFOUND] []
    -- PySide2:              []
    --  IncludeDir:         Unable to find, python version mismatch?
    
The three packages might actually be installed, but not found. Possible reason could be they were built for a different Python version.

So I wanted to know if anyone can explain what seems to be a problem here?
One reason for the compile issue could be you are using the Community Edition of OpenCASCADE:

Code: Select all

-- -- OpenCASCADE Community Edition has been found.
-- -- Found OCE/OpenCASCADE version: 6.9.1
-- -- OCE/OpenCASCADE include directory: /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory: 
Although the option is still in the CMake files current FreeCAD versions don't support OCE very well. The recommendation nowadays is to use the Official Version of OCCT.
xXxStYxXx
Posts: 27
Joined: Sat Sep 24, 2022 9:27 pm

Re: Building fail

Post by xXxStYxXx »

Thanks, I started with fixing all CMake compiling errors. Old errors about pivy, shiboken2 and pyside2 are gone now.
But some new errors appeared and I can't understand why they even appeared
Firstly this:

Code: Select all

-- 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.
I tried to search for vtkRenderingPythonTkWidgets and got this output:

Code: Select all

~$ sudo apt-file search vtkRenderingPythonTkWidgets
python-vtk6: /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.x86_64-linux-gnu.so
So I guess the file kinda exists but under another name. Do I have to somehow specify this file path to CMake?

And I think the same problem with these two:

Code: Select all

-- 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.
And here it's trying to reference a whole folder, output:

Code: Select all

~$ sudo apt-file search /usr/bin/vtk
libvtk6-java: /usr/bin/vtkParseJava-6.3
libvtk6-java: /usr/bin/vtkWrapJava-6.3
libvtk7-java: /usr/bin/vtkParseJava-7.1
libvtk7-java: /usr/bin/vtkWrapJava-7.1
openfoam: /usr/bin/vtkUnstructuredToFoam
paraview-dev: /usr/bin/vtkWrapClientServer
python-vtk6: /usr/bin/vtk6python
python-vtk6: /usr/bin/vtkWrapPython-6.3
python-vtk6: /usr/bin/vtkWrapPythonInit-6.3
python3-vtk7: /usr/bin/vtkWrapPython-7.1
python3-vtk7: /usr/bin/vtkWrapPythonInit-7.1
tcl-vtk6: /usr/bin/vtkWrapTcl-6.3
tcl-vtk6: /usr/bin/vtkWrapTclInit-6.3
tcl-vtk7: /usr/bin/vtkWrapTcl-7.1
tcl-vtk7: /usr/bin/vtkWrapTclInit-7.1
vtk6: /usr/bin/vtk6
vtk6: /usr/bin/vtkEncodeString-6.3
vtk6: /usr/bin/vtkHashSource-6.3
vtk6: /usr/bin/vtkParseOGLExt-6.3
vtk6: /usr/bin/vtkWrapHierarchy-6.3
vtk7: /usr/bin/vtk7
vtk7: /usr/bin/vtkEncodeString-7.1
vtk7: /usr/bin/vtkHashSource-7.1
vtk7: /usr/bin/vtkParseOGLExt-7.1
vtk7: /usr/bin/vtkWrapHierarchy-7.1
Same goes for pvtk:

Code: Select all

-- 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.
But pvtk actually exists:

Code: Select all

~$ sudo apt-file search /usr/bin/pvtk
python-vtk6: /usr/bin/pvtk
python-vtk6: /usr/bin/pvtkpython
And quick question, CMake claiming it can't find Boost library and after that instantly finds Boost:

Code: Select all

-- Could NOT find Boost
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1626 (message):
  No header defined for python3; skipping header check
Call Stack (most recent call first):
  src/Mod/Path/libarea/CMakeLists.txt:26 (find_package)


-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   python3
-- found Boost: 1_65_1
-- boost-incude dirs are: /usr/include
-- boost-python lib is: 
-- boost_LIBRARY_DIRS is: /usr/lib/x86_64-linux-gnu
-- Boost_LIBRARIES is: /usr/lib/x86_64-linux-gnu/libboost_python3.so
-- 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
-- Note: Doxygen docs will look better with graphviz's dot installed.
-- Coin3D doc is not installed
I'm not sure if it's gonna be a problem in future.

And just in case the whole output of CMake:

Code: Select all

cmake ../freecad-source
-- Compiler: GNU, version: 7.5.0
-- prefix: /usr/local
-- bindir: bin
-- datadir: share
-- docdir: share/doc/FreeCAD
-- includedir: include
-- libdir: lib
-- cmake: 3.10.2
-- PyCXX found:
--   Headers:  /home/sapr/freecad-source/src
--   Sources:  /home/sapr/freecad-source/src/CXX
--   Version:  7.1.7
-- -- Found OCE/OpenCASCADE version: 7.5.2
-- -- OCE/OpenCASCADE include directory: /usr/include/opencascade
-- -- OCE/OpenCASCADE shared libraries directory: /usr/lib/x86_64-linux-gnu
-- 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) ...
-- We guess that libmed was built using hdf5-openmpi version
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   system
--   thread
--   date_time
--   chrono
--   atomic
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Shiboken2Config: Using default python: -python2.7.x86_64-linux-gnu
-- libshiboken built for Release
-- PYTHON_CONFIG_SUFFIX: .cpython-36m-x86_64-linux-gnu
-- libshiboken built for Release
-- PySide2 Python module found at /home/sapr/.local/lib/python3.6/site-packages/PySide2.

-- Found Matplotlib: /usr/lib/python3/dist-packages/matplotlib (found version "2.1.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-gcc7
-- [E57] Building static library
-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1626 (message):
  No header defined for python36; skipping header check
Call Stack (most recent call first):
  src/Mod/Path/libarea/CMakeLists.txt:23 (find_package)


-- Could NOT find Boost
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1626 (message):
  No header defined for python3; skipping header check
Call Stack (most recent call first):
  src/Mod/Path/libarea/CMakeLists.txt:26 (find_package)


-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   python3
-- found Boost: 1_65_1
-- boost-incude dirs are: /usr/include
-- boost-python lib is: 
-- boost_LIBRARY_DIRS is: /usr/lib/x86_64-linux-gnu
-- Boost_LIBRARIES is: /usr/lib/x86_64-linux-gnu/libboost_python3.so
-- 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
-- Note: Doxygen docs will look better with graphviz's dot installed.
-- Coin3D doc is not installed
-- 
==============
Summary report
==============

-- Build type:          
-- Compiler:            /usr/bin/c++ (7.5.0)
-- Flags:               -Wall -Wextra -Wno-write-strings 
-- Standard:            Requires C++17
-- Python:              3.6.9 [/usr/bin/python3] [.cpython-36m-x86_64-linux-gnu]
-- PCL:                 not enabled
-- pybind11:            not enabled
-- Boost:               106501
-- XercesC:             3.2.0 [/usr/lib/x86_64-linux-gnu/libxerces-c.so] [/usr/include]
-- ZLIB:                1.2.11
-- PyCXX:               7.1.7 [/home/sapr/freecad-source/src]
-- OCC:                 7.5.2 [TKFillet;TKMesh;TKernel;TKG2d;TKG3d;TKMath;TKIGES;TKSTL;TKShHealing;TKXSBase;TKBool;TKBO;TKBRep;TKTopAlgo;TKGeomAlgo;TKGeomBase;TKOffset;TKPrim;TKSTEPBase;TKSTEPAttr;TKSTEP209;TKSTEP;TKHLR;TKFeat] [/usr/lib/x86_64-linux-gnu] [/usr/include/opencascade]
-- SMESH:               7.7.1.0 build internal
-- MEDFile:             3.0.6 [/usr/lib/x86_64-linux-gnu/libmedC.so] [/usr/include]
-- HDF5:                1.8.13
-- VTK:                 7.1.1
-- NETGEN:              not enabled
-- SWIG:                3.0.12
-- Eigen3               3.3.4
-- Qt5Core:             5.9.5
-- Qt5Network:          5.9.5
-- Qt5Xml:              5.9.5
-- Qt5XmlPatterns:      5.9.5
-- Qt5Widgets:          5.9.5
-- Qt5PrintSupport:     5.9.5
-- Qt5OpenGL:           5.9.5
-- Qt5Svg:              5.9.5
-- Qt5UiTools:          5.9.5
-- Qt5Concurrent:       5.9.5
-- Qt5WebEngineWidgets: 5.9.5
-- Designer plugin:     not built per user request (BUILD_DESIGNER_PLUGIN)
-- Shiboken2:           5.11.2 [/usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.11.2] [/usr/include/shiboken2]
-- PySide2:             5.11.2 [/usr/include/PySide2]
-- PySide2Tools:        [/usr/bin/pyuic5] [/usr/bin/pyrcc5]
-- Freetype:            2.8.1
-- OpenGL:              /usr/lib/x86_64-linux-gnu/libGL.so
-- OpenGLU:             [/usr/lib/x86_64-linux-gnu/libGLU.so][/usr/include]
-- Coin3D:              4.0.0 [/usr/lib/x86_64-linux-gnu/libCoin.so] [/usr/include]
-- Pivy:                0.6.5a0
-- SPNAV:               [/usr/lib/libspnav.so] [/usr/include]
-- Matplotlib:          2.1.1
-- Rift:                not enabled (BUILD_VR)
-- Doxygen:             1.8.13
-- Language:            English
-- Coin3D_DOC:          not found
=================================================
Now run 'cmake --build /home/sapr/freecad-build' to build FreeCAD
=================================================

-- Configuring done
-- Generating done
-- Build files have been written to: /home/sapr/freecad-build
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building fail

Post by wmayer »

I have XUbuntu 18.04 and I get the exact same messages about vtk. So, you can completely ignore them.

If you run CMake Configure and the last message is "Configuring done" then all CMake checks have passed. The error you posted in your first post was
/usr/bin/ld: cannot find -lTKVCAF
and here lies the problem. Apparently you use the official liboce packages which are deprecated and we haven't tested them any more for a long time. Because none of the liboce packages provide the file libTKVCAF.so you run into this linker error.

As a test you can edit the file FindOCC.cmake and remove TKVCAF in line 155. Repeat the build process and in case it succeeds run the self-tests with ./bin/FreeCADCmd -t 0

If this all works without problems we could prepare a fix for FindOCC.cmake. In case you run into more problems you should replace OCE with the unofficial OCCT packages. In order to do so follow the instructions at https://launchpad.net/~freecad-maintain ... ecad-daily

After adding the PPA

Code: Select all

deb https://ppa.launchpadcontent.net/freecad-maintainers/freecad-daily/ubuntu bionic main
and refreshing the cache you should be able to install libocct-data-exchange-7.3, libocct-data-exchange-dev, libocct-draw-dev, libocct-foundation-dev, libocct-modeling-algorithms-dev, libocct-modeling-data-dev, libocct-ocaf-dev and libocct-visualization-dev.

You probably have to uninstall all liboce*-dev packages beforehand.
xXxStYxXx
Posts: 27
Joined: Sat Sep 24, 2022 9:27 pm

Re: Building fail

Post by xXxStYxXx »

Yeah, so it built successfully, honestly I didn't even try anything you suggested besides probably replacing OCE with OCCT because I did that before I left the first replay and didn't even try to build again. Now I think it was causing the problem.
Later I will start from the scratch and clarify how I fixed it, because I also built a ton of workbenches I won't use.

Thanks a lot in any case
xXxStYxXx
Posts: 27
Joined: Sat Sep 24, 2022 9:27 pm

Re: Building fail

Post by xXxStYxXx »

So, I moved from Ubuntu 18.04 to 22.04 because I think 18.04 version has a lack of required packages and manually installing them led me to editing source.list which caused system errors (most likely my fault). And 22.04 version works perfectly, all you have to do is run this command

Code: Select all

sudo apt build-dep freecad
from the Compiling on Linux tutorial and all will be done for you. The only thing you would probably want to do is additionally install python3-pyside2.qtnetwork, python3-pyside2.qtwebengine*, python3-pyside2.qtwebchannel because FreeCAD will warn you about those packages, at least it did for me.
Post Reply