FreeCAD and Raspberry Pi 4

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- »

Humm, my bad sorry it's from apt-get, not from snap.

Code: Select all

sudo apt-get install freecad
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- »

However some errors occur in report view:

Code: Select all

$ freecad
FreeCAD 0.18.4, Libs: 0.18.4R
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

During initialization the error No module named 'PyQt5' occurred in /usr/share/freecad/Mod/Tux/InitGui.py
Please look into the log file for further information
During initialization the error No module named 'PyQt5' occurred in /usr/share/freecad/Mod/Ship/InitGui.py
Please look into the log file for further information
During initialization the error No module named 'PyQt5' occurred in /usr/share/freecad/Mod/Draft/InitGui.py
Please look into the log file for further information
During initialization the error No module named 'PyQt5' occurred in /usr/share/freecad/Mod/Arch/InitGui.py
Please look into the log file for further information
During initialization the error No module named 'PyQt5' occurred in /usr/share/freecad/Mod/Plot/InitGui.py
Please look into the log file for further information

Fixed by installing PyQt5

Code: Select all

sudo apt-get install pyqt5-dev
sudo apt-get install pyqt5-dev-tools 
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- »

still some troubles with FEM WB

Code: Select all

libnglib.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "<string>", line 45, in Initialize

or with Path WB

Code: Select all

libnglib.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "<string>", line 75, in Initialize
  File "/usr/share/freecad/Mod/Path/PathScripts/PathGuiInit.py", line 69, in Startup
    from PathScripts import PathSurfaceGui
  File "/usr/share/freecad/Mod/Path/PathScripts/PathSurfaceGui.py", line 27, in <module>
    import PathScripts.PathSurface as PathSurface
  File "/usr/share/freecad/Mod/Path/PathScripts/PathSurface.py", line 28, in <module>
    import MeshPart

Others WB seem OK :D
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD and Raspberry Pi 4

Post by sgrogan »

-alex- wrote: Tue May 05, 2020 9:45 pm Others WB seem OK
You can also check if Netgen maesher is available from "Create mesh from shape..." in the Mesh design WB.
Do you know if "BUILD_FEM_NETGEN" set in CMake for the build?
If so do you know if your NetGen is linked against the same version of OCC as FreeCAD?
"fight the good fight"
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- »

sgrogan wrote: Tue May 05, 2020 10:04 pm You can also check if Netgen maesher is available from "Create mesh from shape..." in the Mesh design WB.
Netgen is missing

sgrogan wrote: Tue May 05, 2020 10:04 pm Do you know if "BUILD_FEM_NETGEN" set in CMake for the build?
if I see your point (maybe I misunderstand), I would say it's not set:
if I try to compile 0.19 with

Code: Select all

cmake ../freecad-source -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3
I get:

Code: Select all

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

-- Build type:          
-- Compiler:            /usr/bin/c++ (9.3.0)
-- Flags:               -Wall -Wextra -Wno-write-strings 
-- Standard:            Requires C++11
-- Python:              [/usr/bin/python3] [.cpython-38-aarch64-linux-gnu]
-- PCL:                 not enabled
-- pybind11:            not enabled
-- Boost:               1.71.0
-- XercesC:             [/usr/lib/aarch64-linux-gnu/libxerces-c.so] [/usr/include]
-- ZLIB:                1.2.11
-- PyCXX:               [/home/ubuntu/freecad-source/src]
-- OCC:                 7.3.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/lib/aarch64-linux-gnu/libmedC.so] [/usr/include]
--  HDF5:               1.10.4
--  VTK:                7.1.1
-- NETGEN:              not enabled
-- SWIG:                4.0.1
-- Eigen3               3.3.7
-- Qt5Core:             5.12.8
-- Qt5Network:          5.12.8
-- Qt5Xml:              5.12.8
-- Qt5XmlPatterns:      5.12.8
-- Qt5Widgets:          5.12.8
-- Qt5PrintSupport:     5.12.8
-- Qt5OpenGL:           5.12.8
-- Qt5Svg:              5.12.8
-- Qt5UiTools:          5.12.8
-- Qt5Concurrent:       5.12.8
-- Qt5WebKitWidgets:    5.212.0
-- Shiboken2:           5.14.0 [/usr/lib/aarch64-linux-gnu/cmake/Shiboken2-5.14.0] [/usr/include/shiboken2;/usr/include/python3.8]
-- PySide2:             5.14.0 [/usr/lib/../include/PySide2]
-- PySide2Tools:        not found
-- Freetype:            2.10.1
-- OpenGLU:             /usr/lib/aarch64-linux-gnu/libGLU.so [/usr/lib/aarch64-linux-gnu/libGLU.so][/usr/include]
-- Coin3D:              [/usr/lib/aarch64-linux-gnu/libCoin.so] [/usr/include]
-- SPNAV:               [/usr/lib/libspnav.so] [/usr/include]
-- Matplotlib:          3.1.2
-- Rift:                not enabled (BUILD_VR)
-- Doxygen:             not found
=================================================
Now run 'cmake --build /home/ubuntu/freecad-build' to build FreeCAD
=================================================
Netgen seems not enabled by default, however I don't know how 0.18.4 from repository was compiled...
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD and Raspberry Pi 4

Post by sgrogan »

-alex- wrote: Tue May 05, 2020 10:58 pm Netgen seems not enabled by default, however I don't know how 0.18.4 from repository was compiled...
I think its here: https://salsa.debian.org/science-team/f ... /rules#L15
If thats correct you need the netgen and netgen-headers packages https://salsa.debian.org/science-team/f ... rol#L49-50
"fight the good fight"
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- »

sgrogan wrote: Tue May 05, 2020 11:10 pm If thats correct you need the netgen and netgen-headers packages https://salsa.debian.org/science-team/f ... rol#L49-50
after installing:

Code: Select all

sudo apt-get install netgen
sudo apt-get install netgen-headers
Netgen is still missing in Mesh design WB
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- »

vocx wrote: Tue May 05, 2020 8:30 pm Also please try 0.19, as it's obviously much more improved.
I try to compile but no success:

First, when installing dependancies, 2 stuffs were missing:

Code: Select all

ubuntu@ubuntu:~$ sudo apt install cmake cmake-gui libboost-date-time-dev libboost-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-serialization-dev libboost-signals-dev libboost-thread-dev libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libocct-data-exchange-dev libocct-ocaf-dev libocct-visualization-dev libopencv-dev libproj-dev libpyside2-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev libqt5xmlpatterns5-dev libshiboken2-dev libspnav-dev libvtk7-dev libx11-dev libxerces-c-dev libzipios++-dev occt-draw pyside2-tools python3-dev python3-matplotlib python3-pivy python3-ply python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtsvg python3-pyside2.qtwidgets python3-pyside2uic qtbase5-dev qttools5-dev swig
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'cmake-qt-gui' instead of 'cmake-gui'
E: Unable to locate package libboost-signals-dev
E: Unable to locate package python3-pyside2uic
ubuntu@ubuntu:~$ 
Then when I try to compile it faills at 7%, some warnings, one of them is: /bin/sh: 1: PYSIDE2RCCBINARY-NOTFOUND: not found

please see here below the error.log:

Code: Select all

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/ubuntu/freecad-build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_b510b/fast && /usr/bin/make -f CMakeFiles/cmTC_b510b.dir/build.make CMakeFiles/cmTC_b510b.dir/build
make[1]: Entering directory '/home/ubuntu/freecad-build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b510b.dir/src.c.o
/usr/bin/cc   -DCMAKE_HAVE_LIBC_PTHREAD   -o CMakeFiles/cmTC_b510b.dir/src.c.o   -c /home/ubuntu/freecad-build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_b510b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b510b.dir/link.txt --verbose=1
/usr/bin/cc  -DCMAKE_HAVE_LIBC_PTHREAD    -rdynamic CMakeFiles/cmTC_b510b.dir/src.c.o  -o cmTC_b510b 
/usr/bin/ld: CMakeFiles/cmTC_b510b.dir/src.c.o: in function `main':
src.c:(.text+0x48): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x50): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x5c): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_b510b.dir/build.make:87: cmTC_b510b] Error 1
make[1]: Leaving directory '/home/ubuntu/freecad-build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_b510b/fast] Error 2


Source file was:
#include <pthread.h>

void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/ubuntu/freecad-build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_372ae/fast && /usr/bin/make -f CMakeFiles/cmTC_372ae.dir/build.make CMakeFiles/cmTC_372ae.dir/build
make[1]: Entering directory '/home/ubuntu/freecad-build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_372ae.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_372ae.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c
Linking C executable cmTC_372ae
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_372ae.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_372ae.dir/CheckFunctionExists.c.o  -o cmTC_372ae  -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_372ae.dir/build.make:87: cmTC_372ae] Error 1
make[1]: Leaving directory '/home/ubuntu/freecad-build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_372ae/fast] Error 2

Late here, see you next time ;)
Last edited by -alex- on Tue May 05, 2020 11:38 pm, edited 1 time in total.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD and Raspberry Pi 4

Post by sgrogan »

-alex- wrote: Tue May 05, 2020 11:26 pm Netgen is still missing in Mesh design WB
How about FEM and Path?
Netgen is a PITA. What Ubuntu is your system based on?

E: Unable to locate package python3-pyside2uic
There is a pyside2 QT5 clash on some systems. See here: https://forum.freecadweb.org/viewtopic. ... 20#p395462
"fight the good fight"
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: FreeCAD and Raspberry Pi 4

Post by kkremitzki »

libboost-signals-dev is not in Ubuntu 20.04 but it doesn't seem to be needed if you use -DUSE_PYBIND11=ON in your CMake call.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
Post Reply