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-
Posts: 622
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- » Tue May 19, 2020 6:46 am

RustyM wrote:
Fri May 15, 2020 5:21 pm
Thanks again, alex, for giving me hope. Fingers crossed.
Hi RustyM, sorry for late reply. Kkremitzki told you better than I could, I'm just an end user who had compiled FreeCAD with great help from Freecadian mates ;)
I added some commands which were missing in my post above, please have a look at it. Hope it helps a bit. RPI4 is a single board computer, you and me we have the same hardware, only gnome desktop is diffrent compare with my installation. I hope you will success, please report here ;)
User avatar
RustyM
Posts: 7
Joined: Tue Aug 13, 2019 12:27 am

Re: FreeCAD and Raspberry Pi 4

Post by RustyM » Thu May 21, 2020 1:08 pm

Very pleased to report a successful build!

Pi4 4G with Ubuntu 20.04 LTS 64-bit (installed via Raspberry Pi Imager) and the gnome minimal desktop. Not sure how long it took, but it was definitely more than 4 hours. The Pi did not seem to heat up much, but I have it in a Canakit case with fan.

Many thanks to @kkremitzki and to @Alex and all the giants on whose shoulders he claims to have stood.

Notes for other newbs like me: I may have done three or four complete installs of Ubuntu before I felt confident. It always seemed to get a little weird after installing a GUI. ubuntu-desktop-minimal felt solid immediately, and has plenty of features.

Also, in my previous efforts to install the dependencies I would swear that it installed all the modules listed on the command line, reporting back about the ones it couldn't find. This time, however, if there were any modules that apt couldn't find, it simply aborted the process, reporting on the unfound modules, but NOT installing the others. I ended up taking apart @Alex's excellent dependency list, and installing it four or five modules at a time, carefully avoiding the ones that couldn't be found.

Performance is somewhat sluggish compared to my 2014 Powerbook. I haven't tried anything very complex yet, but it's remarkable to have this kind of capability from a Pi. Many thanks to the FreeCAD team!
User avatar
-alex-
Posts: 622
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- » Thu Jun 11, 2020 5:29 pm

RustyM wrote:
Thu May 21, 2020 1:08 pm
Performance is somewhat sluggish compared to my 2014 Powerbook. I haven't tried anything very complex yet, but it's remarkable to have this kind of capability from a Pi.
Glad you can enjoy FreeCAD on RPI4 :D
About performance, yes it's quite sluggish on Ubuntu, because graphics are not GPU accelerated with this OS:

Code: Select all

ubuntu@ubuntu:~$ glxinfo | grep rendering
direct rendering: Yes
ubuntu@ubuntu:~$ glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 9.0.1, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.0.4
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 20.0.4
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
AFAIK "OpenGL renderer string: llvmpipe" means graphical computation by CPU :|
Anyway, FreeCAD with Ubuntu 20.04LTS is pretty cool :)
That say, there is good news about FreeCAD and Raspbian, see next post :arrow:
User avatar
-alex-
Posts: 622
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- » Thu Jun 11, 2020 6:38 pm

That's it, FreeCAD compiled with QT5 and PY3 works on RPI4 with Raspberry OS64B (beta test version) :!:
Many thanks to user @leggazoid for this information: https://www.raspberrypi.org/forums/view ... d#p1674736
I confirm, FreeCAD works like a charme, with GPU acceleration.
So, RPI4 is ready to welcome FreeCAD 0.19 QT5/PY3 with great features and direct rendering:

Code: Select all

pi@raspberrypi:~ $ glxinfo | grep rendering
direct rendering: Yes
pi@raspberrypi:~ $ glxinfo | grep OpenGL
OpenGL vendor string: Broadcom
OpenGL renderer string: V3D 4.2
OpenGL version string: 2.1 Mesa 19.3.2
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 19.3.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
As a result, it is possible to rotate the 27K cubes model at about 6FPS and 1920x1080 resolution:
Cube_27K_RPI4_OS64B.gif
Cube_27K_RPI4_OS64B.gif (891.45 KiB) Viewed 1213 times
(shaking is due to gif capture)
When loading this model made of 27K cubes:
Just RPI OS64B, no any software launched: RAM = 160Mo
Run FreeCAD: RAM = 252Mo
27K cubes loaded (needs about 1 or 2mn to load): RAM = 3.1Go
No more to say about this pretty huge test model.
If you increase too much angular deflection (2°) and deviation (0.2) with a spherical or toroidal model, crash may occur with segfault issue.
Anyway, if you load an usual model, it rotates at 20 or 30 fps, very smouthly, no problem.
Some troubles with File icons, that's not a big deal. Maybe you can load the Icon addon to solve that. Have to try...
If you want to compile it, just follow the Compile_on_Linux Debian instructions.
If you want to mesh FEM models with gmsh you should install it:

Code: Select all

sudo apt install gmsh
Enjoy FreeCAD on RPI4 with Raspberry OS64Bit :D

Edit:
OS: Debian GNU/Linux 10 (buster) (LXDE/LXDE-pi)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21562 (Git)
Build type: Unknown
Branch: master
Hash: 11a2b948ea55b19efe7515f730035027a7822e06
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Last edited by -alex- on Fri Jun 12, 2020 11:32 pm, edited 3 times in total.
User avatar
papy
Posts: 160
Joined: Sun Sep 09, 2018 10:00 am
Location: Moselle

Re: FreeCAD and Raspberry Pi 4

Post by papy » Thu Jun 11, 2020 7:14 pm

Hi
For once, I will use French:
Merci Alex
kwahoo
Posts: 333
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: FreeCAD and Raspberry Pi 4

Post by kwahoo » Sat Oct 24, 2020 1:10 am

Since Ubuntu 20.10 just got official release for RPI, I did small test on the 4GiB variant. FreeCAD compiles fine using info directly from the wiki. It took exactly 3,5 h.
Perfomance seems ok. For stress test I use extremely detailed Mars Rover model from Nasa.
There are no noticeable bugs/artifacts.

Raspberry was able to render it at 0,8-1 fps. Screenshot. For comparison my desktop PC (Ryzen 1700, Radeon 5700XT) does 20 fps (or over 75 fps if realthunder's branch was used).

OS: Ubuntu 20.10 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22836 (Git)
Build type: Unknown
Branch: master
Hash: 73ba3061692d826635853055cf43835aec949d97
Python version: 3.8.6
Qt version: 5.14.2
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Polish/Poland (pl_PL)


Edit: realthunder's branch fails with

Code: Select all

/home/adi/FreeCAD-LinkStage3/src/Base/Base64.cpp:65:5: error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ [-Wnarrowing]
User avatar
-alex-
Posts: 622
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- » Sat Oct 24, 2020 10:22 pm

kwahoo wrote:
Sat Oct 24, 2020 1:10 am
Since Ubuntu 20.10 just got official release for RPI, I did small test on the 4GiB variant. FreeCAD compiles fine using info directly from the wiki. It took exactly 3,5 h.
Thanks for informations !
Edit: realthunder's branch fails with

Code: Select all

/home/adi/FreeCAD-LinkStage3/src/Base/Base64.cpp:65:5: error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ [-Wnarrowing]
Few months ago I've got some troubles to compile his branch with Raspberry OS as well. I have to investigate about that, I would really like to test LinkStage3 branch on RPI4. But no time to try before couple of weeks.
User avatar
Kunda1
Posts: 8690
Joined: Thu Jan 05, 2017 9:03 pm

Re: FreeCAD and Raspberry Pi 4

Post by Kunda1 » Sun Oct 25, 2020 12:26 pm

Perhaps realthunder will fix, has anyone asked?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
-alex-
Posts: 622
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- » Tue Oct 27, 2020 6:04 am

Kunda1 wrote:
Sun Oct 25, 2020 12:26 pm
Perhaps realthunder will fix, has anyone asked?
Not yet, I will ask him for sure. But before to bother him I have to try again more seriously by folowing his compilation instructions with more attention.
AFAIR I succed to compile his branch few months ago on a X86 system. Btw if I try to compile it on RPI4 I will open a new topic because it does not concern the master branch.

Edit 2020-11-05: for ones who are interested in compiling FreeCAD Linkstage 3 branch on RPI4, now that's work :D
Please do not hijack this thread since it is related to the compiling of the FreeCAD master branch, see the following thread: https://forum.freecadweb.org/viewtopic.php?f=4&t=51831
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest