[SOLVED] Build error: FreeCAD does not build any more (new missing dependencies)

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ArunGiridhar
Posts: 38
Joined: Sun Mar 29, 2015 10:02 pm

[SOLVED] Build error: FreeCAD does not build any more (new missing dependencies)

Post by ArunGiridhar »

This failure occurs with https://github.com/FreeCAD/FreeCAD/comm ... 5952b0dfd4 but is likely older:

Build error about linking salomesmesh:

Code: Select all

[  1%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/SMDS.dir/src/SMDS/duplicate.cpp.o
[  1%] Linking CXX shared library ../../../lib/libSMDS.so
/usr/bin/ld: cannot find -lVerdict::verdict: No such file or directory
/usr/bin/ld: cannot find -lnlohmann_json::nlohmann_json: No such file or directory
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/3rdParty/salomesmesh/CMakeFiles/SMDS.dir/build.make:814: lib/libSMDS.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:2230: src/3rdParty/salomesmesh/CMakeFiles/SMDS.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Config warnings and errors:

Code: Select all

-- Found OpenGL: /usr/lib/libOpenGL.so   
-- Found OpenGLU: /usr/lib/libGLU.so
CMake Deprecation Warning at /usr/lib/cmake/vtk/vtk-config.cmake:75 (message):
  The new name for the 'vtkCommonCore' component is 'CommonCore'
Call Stack (most recent call first):
  cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake:29 (find_package)
  CMakeLists.txt:60 (SetupSalomeSMESH)

Code: Select all

-- Found JsonCpp: /usr/lib/libjsoncpp.so (found suitable version "1.9.5", minimum required is "0.7.0") 
-- Found HDF5: /usr/lib/libhdf5.so;/usr/lib/libsz.so;/usr/lib/libz.so;/usr/lib/libdl.a;/usr/lib/libm.so (found version "1.14.0") found components: C HL 
CMake Warning at /usr/lib/cmake/vtk/VTK-vtk-module-find-packages.cmake:1966 (find_package):
  By not providing "Findnlohmann_json.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "nlohmann_json", but CMake did not find one.

  Could not find a package configuration file provided by "nlohmann_json"
  with any of the following names:

    nlohmann_jsonConfig.cmake
    nlohmann_json-config.cmake

  Add the installation prefix of "nlohmann_json" to CMAKE_PREFIX_PATH or set
  "nlohmann_json_DIR" to a directory containing one of the above files.  If
  "nlohmann_json" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /usr/lib/cmake/vtk/vtk-config.cmake:152 (include)
  cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake:53 (find_package)
  CMakeLists.txt:60 (SetupSalomeSMESH)


CMake Warning at /usr/lib/cmake/vtk/VTK-vtk-module-find-packages.cmake:2013 (find_package):
  By not providing "FindVerdict.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Verdict", but
  CMake did not find one.

  Could not find a package configuration file provided by "Verdict"
  (requested version 1.4.0) with any of the following names:

    VerdictConfig.cmake
    verdict-config.cmake

  Add the installation prefix of "Verdict" to CMAKE_PREFIX_PATH or set
  "Verdict_DIR" to a directory containing one of the above files.  If
  "Verdict" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  /usr/lib/cmake/vtk/vtk-config.cmake:152 (include)
  cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake:53 (find_package)
  CMakeLists.txt:60 (SetupSalomeSMESH)

Code: Select all

-- Configuring done (15.1s)
CMake Error in src/3rdParty/salomesmesh/CMakeLists.txt:
  Imported target "VTK::hdf5" includes non-existent path

    "/build/hdf5-openmpi/src/hdf5-1.14.0/src/H5FDsubfiling"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error at /usr/lib/cmake/vtk/VTK-targets.cmake:555 (set_target_properties):
  The link interface of target "VTK::nlohmannjson" contains:

    nlohmann_json::nlohmann_json

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /usr/lib/cmake/vtk/vtk-config.cmake:138 (include)
  cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake:29 (find_package)
  CMakeLists.txt:60 (SetupSalomeSMESH)


CMake Error at /usr/lib/cmake/vtk/VTK-targets.cmake:1943 (set_target_properties):
  The link interface of target "VTK::verdict" contains:

    Verdict::verdict

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /usr/lib/cmake/vtk/vtk-config.cmake:138 (include)
  cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake:29 (find_package)
  CMakeLists.txt:60 (SetupSalomeSMESH)


-- Generating done (0.4s)
CMake Generate step failed.  Build files cannot be regenerated correctly.

Config summary:

Code: Select all

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

-- bindir:                      bin
-- BLAS:                        -undefined-
-- CMAKE_VERSION:               3.26.1
-- Compiler:                    /usr/bin/clang++ (15.0.7)
-- datadir:                     share
-- docdir:                      share/doc/FreeCAD
-- includedir:                  include
-- libdir:                      lib
-- prefix:                      /usr/local
-- Python:                      3.10.10 [/usr/bin/python3] 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:            Release
-- CMAKE_CXX_FLAGS:             -Wall -Wextra -Wpedantic -Wno-write-strings -O2 -march=native -pipe -Wno-undefined-var-template
-- CMAKE_CXX_STANDARD:          17
-- CMAKE_INSTALL_PREFIX:        /usr/local
-- CMAKE_PREFIX_PATH:           OFF 
-- 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
-- PYTHON_LIBRARY:              /usr/lib/libpython3.10.so
-- USE_CUDA:                    -undefined-
-- USE_OPENCV:                  -undefined-

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

-- Boost:                       1.81.0
-- Coin3D:                      4.0.1 [/usr/lib/libCoin.so] [/usr/include]
-- Coin3D_DOC:                  not found
-- DesignerPlugin:              not built (BUILD_DESIGNER_PLUGIN is OFF)
-- Doxygen:                     1.9.6 Language: English
-- Eigen3:                      3.4.0
-- fmt:                         9.1.0
-- Freetype:                    2.13.0
-- HDF5:                        1.14.0
-- Matplotlib:                  3.7.1 PathDirs: /usr/lib/python3.10/site-packages/matplotlib
-- MEDFile:                     4.1.1 [/usr/lib/libmedC.so;/usr/lib/libmed.so] [/usr/include]
-- NETGEN:                      not enabled
-- OCC:                         7.6.3 [/usr/lib] [/usr/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/libGL.so]
-- OpenGLU_Incl:                [/usr/include]
-- OpenGLU_Lib:                 [/usr/lib/libGLU.so]
-- pivy:                        0.6.8
-- pybind11:                    not enabled
-- PYCXX:                       7.1.7 Incl: ...FreeCAD/src Src:.../FreeCAD/src/CXX
-- PySide:                      5.15.8 [/usr/include/PySide2]
-- PySideTools:                 v: 2  uic: [/usr/bin/uic]  rcc: [/usr/bin/rcc]
-- QtConcurrent:                5.15.8
-- QtCore:                      5.15.8
-- QtNetwork:                   5.15.8
-- QtOpenGL:                    5.15.8
-- QtPrintSupport:              5.15.8
-- QtSvg:                       5.15.8
-- QtUiTools:                   5.15.8
-- QtWebEngineWidgets:          5.15.13
-- QtWidgets:                   5.15.8
-- QtXml:                       5.15.8
-- Rift:                        not enabled (BUILD_VR)
-- Shiboken:                    5.15.8 [/usr/include/shiboken2;/usr/include/python3.10]
-- SMESH:                       7.7.1.0 build internal
-- SPNAV:                       not found
-- SWIG:                        4.1.1
-- VTK:                         9.2.6
-- XercesC:                     3.2.4 [/usr/lib/libxerces-c.so] [/usr/include]
-- ZLIB:                        1.2.13
Last edited by ArunGiridhar on Sun Apr 02, 2023 12:38 pm, edited 2 times in total.
ArunGiridhar
Posts: 38
Joined: Sun Mar 29, 2015 10:02 pm

Re: Build error: salomesmesh does not build any more

Post by ArunGiridhar »

Does this need a new "nlohmann::json" external library, or is that supposed to be included from FreeCAD's packaging itself?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Build error: FreeCAD does not build any more (new missing dependency?)

Post by adrianinsaval »

I think you are using arch (this is something you should say). The failure is not related to any change in freecad or smesh, these are due to update of vtk and a bug in hdf5 update.

run a system upgrade to get the fixed hdf5 package and install verdict and nlohmann-json packages that appear to be dependencies of vtk
ArunGiridhar
Posts: 38
Joined: Sun Mar 29, 2015 10:02 pm

Re: Build error: FreeCAD does not build any more (new missing dependency?)

Post by ArunGiridhar »

Thank you @adrianinsaval. It turns out the HDF5 libraries on my distro are installed as a dependency of a different unrelated package and I cannot upgrade it unilaterally, but I could install the vertict and nlohmann-json packages independently to get it building again. Will mark this as solved.
Post Reply