Any tips for installing on gentoo

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
frankpacker
Posts: 1
Joined: Sun Aug 23, 2020 9:06 am

Any tips for installing on gentoo

Post by frankpacker »

I have tried a few things and overlays and I am not even getting close.
clytle374
Posts: 172
Joined: Wed Nov 06, 2013 3:58 am

Re: Any tips for installing on gentoo

Post by clytle374 »

I can try to help out here. I have a messed up work schedule. So don't give up if I can't answer for a while. I build freecad from git source so I probably can't be much help with other methods, but it goes pretty smoothly after the first success.

You need to install opencascade, it's in gentoo now. Freecad probably won't find it properly, look at my cmake output at the bottom.

You need add the raiagent overlay and install pyside2 pyside2-tools shiboken2

from this page in the getting the source part
https://wiki.freecadweb.org/Compile_on_Linux
You need to clone the git folder with this.
git clone https://github.com/FreeCAD/FreeCAD.git freecad-source

Then you want to follow the part for "out of source build", probably omit the python part of the one line.
mkdir freecad-build
cd freecad-build
cmake ../freecad-source -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3
make -j$(nproc --ignore=2)

This is where the dependencies start to get you. After you get them resolved you should be able to just run "cmake ." and not the rest of the options. I use "cmake-gui ." at first sign of trouble as it's way easier for me as I don't know the build system and never know the options to use.

I'm attaching my cmake output, let me know what dependencies you are missing and I'll try to figure out where they come from. Also once built freecad will run from its build directory without issues.

Cory

Code: Select all

Compiler: GNU, version: 9.2.0
prefix: /usr/local
bindir: bin
datadir: data
docdir: doc
includedir: include
libdir: lib
cmake: 3.16.5
Found PythonInterp: /usr/bin/python3.7m (found version "3.7.8") 
Found PythonLibs: /usr/lib64/libpython3.7m.so (found suitable exact version "3.7.8") 
Found Boost: /usr/include (found suitable version "1.72.0", minimum required is "1.48") found components: filesystem program_options regex system thread chrono date_time atomic 
Found Xerces-C: /usr/lib64/libxerces-c.so
PyCXX found:
  Headers:  /home/cory/sources/freecad-code/src
  Sources:  /home/cory/sources/freecad-code/src/CXX
  Version:  6.2.8
-- Found OCE/OpenCASCADE version: 7.4.0
-- OCE/OpenCASCADE include directory: /usr/lib64/opencascade-7.4.0/ros/include/opencascade
-- OCE/OpenCASCADE shared libraries directory: /usr/lib64/opencascade-7.4.0/ros/lib64
VTK components: vtkCommonCore;vtkCommonDataModel;vtkFiltersVerdict;vtkIOXML;vtkFiltersCore;vtkFiltersGeneral;vtkIOLegacy;vtkFiltersExtraction;vtkFiltersSources;vtkFiltersGeometry;vtkhdf5;vtkRenderingCore;vtkInteractionStyle;vtkRenderingFreeType;vtkRenderingOpenGL2
Check for medfile (libmed and libmedc) ...
We guess that libmed was built using hdf5-openmpi version
Checking for one of the modules 'hdf5-openmpi'
Unable to determine HDF5 C flags from HDF5 wrapper.
Unable to determine HDF5 C version from HDF5 wrapper.
CMake Warning at /usr/share/cmake/Modules/FindHDF5.cmake:711 (message):
  HDF5 found for language C is not parallel but previously found language is
  parallel.
Call Stack (most recent call first):
  cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake:83 (find_package)
  CMakeLists.txt:53 (SetupSalomeSMESH)


Performing Test _flag_found
Performing Test _flag_found - Success
Checking for module 'Coin'
  Found Coin, version 4.0.0
Coin3D libraries found
Shiboken2Config: Using default python: -python3.7
Found PythonInterp: /usr/bin/python3.7m (found suitable version "3.7.8", minimum required is "3") 
Found PythonLibs: /usr/lib64/libpython3.7m.so (found suitable version "3.7.8", minimum required is "3") 
SHIBOKEN_PYTHON_INCLUDE_DIRS computed to value: '/usr/include/python3.7m'
SHIBOKEN_PYTHON_LIBRARIES computed to value: ''
libshiboken built for Gentoo
===============================================
PySide2 Python module found at /usr/lib/python3.7/site-packages/PySide2.
===============================================

-- matplotlib-3.2.2 has been found.
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
Performing Test _flag_found
Performing Test _flag_found - Success
setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
Found Boost: /usr/include (found version "1.72.0") found components: python37 
found Boost: 1_72
boost-incude dirs are: /usr/include
boost-python lib is: 
boost_LIBRARY_DIRS is: /usr/lib64
Boost_LIBRARIES is: /usr/lib64/libboost_python37-mt.so
area module (for Path Workbench) will be installed to: lib
Note: Doxygen docs will look better with graphviz's dot installed.
Coin3D doc is not installed

==============
Summary report
==============

Build type:          Release
Compiler:            /usr/bin/c++ (9.2.0)
Flags:               -Wall -Wextra -Wno-write-strings 
Standard:            Requires C++11
Python:              [/usr/bin/python3.7m] [-python3.7]
PCL:                 not enabled
pybind11:            not enabled
Boost:               107200
XercesC:             [/usr/lib64/libxerces-c.so] [/usr/include]
ZLIB:                1.2.11
PyCXX:               [/home/cory/sources/freecad-code/src]
OCC:                 7.4.0 [TKFillet;TKMesh;TKernel;TKG2d;TKG3d;TKMath;TKIGES;TKSTL;TKShHealing;TKXSBase;TKBin;TKBool;TKBO;TKCDF;TKBRep;TKTopAlgo;TKGeomAlgo;TKGeomBase;TKOffset;TKPrim;TKSTEP;TKSTEPBase;TKSTEPAttr;TKHLR;TKFeat]
SMESH:               build internal
 MEDFile:            [/usr/lib64/libmedC.so;/usr/lib64/libmed.so] [/usr/include]
 HDF5:               1.10.5
 VTK:                8.1.0
NETGEN:              not enabled
SWIG:                3.0.12
Eigen3               3.3.7
Qt5Core:             5.14.2
Qt5Network:          5.14.2
Qt5Xml:              5.14.2
Qt5XmlPatterns:      5.14.2
Qt5Widgets:          5.14.2
Qt5PrintSupport:     5.14.2
Qt5OpenGL:           5.14.2
Qt5Svg:              5.14.2
Qt5UiTools:          5.14.2
Qt5Concurrent:       5.14.2
Qt5WebKitWidgets:    5.212.0
Shiboken2:           5.14.2 [/usr/lib64/cmake/Shiboken2-5.14.2] [/usr/include/shiboken2;/usr/include/python3.7m]
PySide2:             5.14.2 [/usr/include/PySide2]
PySide2Tools:        [/usr/bin/uic] [/usr/bin/rcc]
Freetype:            2.10.2
OpenGLU:             /usr/lib64/libGLU.so [/usr/lib64/libGLU.so][/usr/include]
Coin3D:              [Coin] [/usr/include/Coin4]
SPNAV:               [/usr/lib64/libspnav.so] [/usr/include]
Matplotlib:          3.2.2
Rift:                not enabled (BUILD_VR)
Doxygen:             1.8.17
 Language:           English
 Coin3D_DOC:         not found
=================================================
Now run 'cmake --build /home/cory/freecad2' to build FreeCAD
=================================================

Configuring done
Generating done
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Any tips for installing on gentoo

Post by vocx »

clytle374 wrote: Sun Aug 23, 2020 10:27 am ...
from this page in the getting the source part
https://wiki.freecadweb.org/Compile_on_Linux
...
This is where the dependencies start to get you.
The dependencies are described in the Debian/Ubuntu section in Compile on Linux. You should try to get the same dependencies in Gentoo. If you can update the wiki that'd be ideal, because most FreeCAD users seemingly use a Debian/Ubuntu distribution, so the information for Fedora, Gentoo, or Suse may not be up to date.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
clytle374
Posts: 172
Joined: Wed Nov 06, 2013 3:58 am

Re: Any tips for installing on gentoo

Post by clytle374 »

vocx wrote: Sun Aug 23, 2020 3:30 pm

The dependencies are described in the Debian/Ubuntu section in Compile on Linux. You should try to get the same dependencies in Gentoo. If you can update the wiki that'd be ideal, because most FreeCAD users seemingly use a Debian/Ubuntu distribution, so the information for Fedora, Gentoo, or Suse may not be up to date.
Years ago the naming in the wiki left me a lot of confusion on dependencies. When I've added freecad to a new machine since then I have always compared to an old machine and found what package was required that way. I regret not taking notes. Hopefully we can sort that out some here. The Ubuntu dependencies are also confusing as many are required for building on Ubuntu whereas Gentoo will have a working toolchain by default.

I tried a while back to install to a USB to get a fresh install to see what is required, but had issues there and gave up on the process. Looks like many dependencies have been added into gentoo and the overlays may not as needed as before.

Cory
clytle374
Posts: 172
Joined: Wed Nov 06, 2013 3:58 am

Re: Any tips for installing on gentoo

Post by clytle374 »

Been digging through my system trying to get a good start on what is needed. You'll need both raiagent and waebbl overlays.

Package.accept_keywords should look something like this

Code: Select all

=media-gfx/openvdb-5.2.0-r1 ~amd64
=dev-python/pyside2-tools-5.14.2::raiagent ~amd64
=dev-python/pyside2-5.14.2-r1::raiagent ~amd64
=dev-python/shiboken2-5.14.2::raiagent ~amd64
=sci-libs/opencascade-7.4.0-r2::gentoo ~amd64
=dev-python/pivy-0.6.5::waebbl ~amd64
=media-libs/coin-4.0.0::waebbl ~amd64
=sci-libs/vtk-8.2.0 ~amd64

package.use I think should be

Code: Select all

dev-python/pyside2 gui network
So I am pretty sure you'll need to emerge dev-python/pyside2-tools dev-python/pyside2 dev-python/shiboken2 sci-libs/opencascade dev-python/pivy media-libs/coin sci-libs/vtk

Let me know where that gets you. When you get something is missing I can see what package it comes from in Gentoo pretty easily.
Cory
etnull
Posts: 5
Joined: Wed Sep 16, 2020 12:21 pm

Re: Any tips for installing on gentoo

Post by etnull »

In fact waebbl overlay already has freecad included, but you still need raiagent overlay for some dependencies.
Here is what I did:
added raiagent and waebbl overlays, synced them.
I'm on ~amd64 unstable, so I skipped the accept_keywords part,
and for my package.use I have these:

Code: Select all

# required by media-gfx/freecad-0.18.4-r1::waebbl
>=sci-libs/med-4.0.0-r2 python
>=dev-libs/boost-1.74.0 python
>=media-libs/coin-4.0.0 -man
>=sci-libs/vtk-8.2.0 qt5 python rendering boost
>=sci-libs/hdf5-1.10.5-r1 fortran hl -threads -cxx
>=dev-python/pyside2-5.14.2-r1 gui svg widgets
>=x11-drivers/nvidia-drivers-450.66 static-libs
>=sys-devel/gcc-10.2.0-r1 fortran
=dev-cpp/eigen-3.3.7 c++11
These are my specific use flags based on those I have enabled/disabled in make.conf, if you have different configuration you can have different blockages, better to try emerging freecad and solve your own particular blockages. During the emerge I had issue emerging openscad and vtk from the waebbl overlay, so I had to explicitly install them from ::gentoo, then everything else went fine. I now have freecad installed, though it only shows 0.18 for version number without the 4.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Any tips for installing on gentoo

Post by jmaustpc »

welcome to FreeCAD. :)
etnull wrote: Thu Sep 17, 2020 8:32 am 0.18 for version number
I can't really see the point in compiling the now rather old 0.18, if you are going to compile I would just follow master, currently the dev version is 0.19 and is a great improvement over 0.18, many bug fixes and new features. Personally I only ever use 0.19 now.
etnull
Posts: 5
Joined: Wed Sep 16, 2020 12:21 pm

Re: Any tips for installing on gentoo

Post by etnull »

jmaustpc wrote: Thu Sep 17, 2020 8:55 am welcome to FreeCAD. :)
thanks.
jmaustpc wrote: Thu Sep 17, 2020 8:55 am I can't really see the point in compiling the now rather old 0.18, if you are going to compile I would just follow master, currently the dev version is 0.19 and is a great improvement over 0.18, many bug fixes and new features. Personally I only ever use 0.19 now.
The point was not to seek dependencies myself, if there are an ebuild in some overlay already you just do "emerge freecad" and relax for an hour, well most of the time, it's gentoo so it can explode... FreeCAD is not my main tool, I'm using it for casual 3d printing and exploring/learning. I would prefer for it to be managed by the package manager, installed and forgot kind of deal.
clytle374
Posts: 172
Joined: Wed Nov 06, 2013 3:58 am

Re: Any tips for installing on gentoo

Post by clytle374 »

I get all the dependencies with overlays and build from git. But I don't 'install' it, it runs in place just fine

Cory
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Any tips for installing on gentoo

Post by vocx »

etnull wrote: Thu Sep 17, 2020 8:32 am ...
Here is what I did:
...
Feel free to edit Compile on Linux with the appropriate information, so that future Gentoo users know what to do.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Post Reply