Compile freecad

Trying to compile freecad rc1 from source. Don’t like appimages.
When running cmake from downloaded source getting hdf5 problem I am not sure what zypper is saying. Is problem that HDF5_HL_LIBRARIES is not found or that leap version of 1.14.6 is not recent enough? Thanks for any insights. Note: my gentoo vm compiles freecad rc1.

(base) tom@mydesktop: ~/freecad_src/build $ cmake ..
-- Using ccache found at: /usr/bin/ccache
-- Compiler: GNU, version: 7.5.0
-- prefix: /usr/local
-- bindir: bin
-- datadir: share
-- docdir: share/doc/FreeCAD
-- includedir: include
-- libdir: lib64
-- cmake: 3.28.3
-- Compiling with Qt 5
-- find_package() was used to locate fmt version 11.1.4
-- PyCXX found:
--   Headers:  /home/tom/freecad_src/src
--   Sources:  /home/tom/freecad_src/src/CXX
--   Version:  7.1.9
-- -- OpenCASCADE Community Edition has been found.
-- -- Found OCE/OpenCASCADE version: 6.9.1
-- -- OCE/OpenCASCADE include directory: /usr/share/oce/../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory: 
-- VTK components: CommonCore;CommonDataModel;FiltersVerdict;IOXML;FiltersCore;FiltersGeneral;IOLegacy;FiltersExtraction;FiltersSources;FiltersGeometry;hdf5;RenderingCore;InteractionStyle;RenderingFreeType;RenderingOpenGL2
-- Found Threads: TRUE  
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/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 nlohmann_json: /usr/lib64/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.11.2") 
-- Found HDF5: hdf5-shared (found version "1.14.6") found components: C HL 
-- Found utf8cpp: /usr/include/utf8cpp  
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.40") 
-- Found Eigen3: /usr/include/eigen3 (found version "3.4.1") 
-- Found EXPAT: /usr/lib64/libexpat.so (found version "2.7.2") 
-- Found LZ4: /usr/lib64/liblz4.so (found version "1.9.4") 
-- Found LZMA: /usr/lib64/liblzma.so (found version "5.4.1") 
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62") 
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.7.1")  
-- Could NOT find freetype (missing: freetype_DIR)
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.10.4") 
-- Found double-conversion: /usr/lib64/libdouble-conversion.so  
-- Check for medfile (libmed and libmedc) ...
-- Found MEDFile: /usr/include/med  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- We guess that libmed was built using hdf5-serial version
-- Checking for one of the modules 'hdf5-serial'
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find HDF5 (missing: HDF5_HL_LIBRARIES) (found version "1.14.6")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindHDF5.cmake:1025 (find_package_handle_standard_args)
  cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake:100 (find_package)
  CMakeLists.txt:73 (SetupSalomeSMESH)


-- Configuring incomplete, errors occurred!
(base) tom@mydesktop:

@tckosvic I suspect everything is too old… It builds for Tumbleweed fine…
https://build.opensuse.org/package/show/science/FreeCAD

Use distrobox, install Tumbleweed there and install instead…

PS: you should use distrobox for compiling as well, can keep the host system clean and free of lots of updates…

Time to bite the bullet and convert from leap to tumbleweed. I am always struggling to compile newer science software and seem to be running into old version problems very frequently on leap. Looking at wiki conversion from leap to tumbleweed seems simple. But need to examine nvidia nouveau vs proprietary drivers and also xorg vs wayland issues.

thanks, tom kosvic

@tckosvic I would suggest to get some new storage media and install fresh… Or test in a virtual machine first…

Distrobox should suffice though?

I have tumbleweed vm for a year or so. It is inconvenient to run a few things in a vm and many others on main OS.

I will look into distrobox.

Me neither because it’s not as flawless to update as native packages or flatpaks. I use the flatpak version of freecad from flathub. Works quite well, if that is an option for you.
I have used the native one previously but I switched to flatpak because of some dependencies. I believe it was some qt stuff and I am on Tumbleweed Xfce.

You can stand with Leap : “FreeCAD by The FreeCAD Team” is available at Flathub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.