SoloJan
Posts: 1
Joined: Wed Feb 26, 2020 1:35 am

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Feb 27, 2020 12:00 am

Good Morning

I’ve tried Yesterday Scruss’s solution to build from Github repo and work’s perfectly, so far Freecad runs smoothly on the pi4!

I guess some more development will make installable just via terminal in the future

one hint for users in case they’ve already done some trials is to remove first all previously installed Freecad packages by add-remove programs

does anyone knows how to add a Freecad launcher on the bar or to Desktop instead of launching it via bin all the time?

Thank you, and happy 3D modelling

Muniac
Posts: 3
Joined: Sun Oct 22, 2017 7:41 pm
Location: Colorado
Contact: Website

Re: FreeCAD on PI4 and Raspbian Buster.

Sat Mar 07, 2020 10:34 pm

Hi - I'll throw my hat into the ring on this. I have a pi4 (4GB) being used to run PrusaSlicer and FreeCAD (Old Python & QT). PrusaSlicer now has a prebuilt binary for the pi4. It installs and runs fine. As for building FreeCAD from source against Python3 and QT5, no dice yet. Please see below:

Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
Program received signal SIGSEGV, Segmentation fault.
#0 /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0xb194b120]


Still having issues with selecting NEW. Would be really nice to get this problem solved! FreeCAD makes a nice companion to PrusaSlicer for modeling and printing. I'd be happy to help with building and testing to move this along. Need someone with good graphics library knowledge to guide me a bit. Any updates on this? Many thanks.
Best - Muniac (aka Scott)

Brad Q
Posts: 105
Joined: Mon Aug 12, 2019 12:10 am

Re: FreeCAD on PI4 and Raspbian Buster.

Sat Mar 07, 2020 11:31 pm

There is a version of Cura for Pis too. The select face to put on print bed button is the only thing that I noticed missing.

Brad Q
Posts: 105
Joined: Mon Aug 12, 2019 12:10 am

Re: FreeCAD on PI4 and Raspbian Buster.

Mon Mar 16, 2020 10:28 pm

I got a working compile following the instructions from here:

https://scruss.com/blog/2020/02/16/free ... erry-pi-4/


A few things I would change:

1. make j-8 (towards the bottom, sets max # of threads, more=faster)

2. make install (after you have tested it to make sure it runs ok)

3. alias freecad='FreeCAD' (after you got it working, add it to your .bashrc to make it pernament)

4. instead of downloading the zip, clone it, but I do not know exactly how that is set up.

5. IF you are going to be keeping current(rebuilding often) then look at ccache it speeds things up.

It is a good 90 minutes of compile time and it with heat you by to the Max. The good news is that my passively cooled Pi4 only hit 52C in a 72F room. Not sure what the coin things does, but so far my version runs fine without it.

Edit: j-8 errored out at around 35%, but it was screaming up to that point. Maybe j-6

For the .19 version(currently):
git clone https://github.com/FreeCAD/FreeCAD.git

pigong
Posts: 2
Joined: Fri Apr 17, 2020 9:20 am

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Apr 17, 2020 9:30 am

Another thumbs up for Scruss’s build: it works fine for me (certainly the crash on file open/new disappears) and his/her build instructions are to the point. I've opened all example files and played around with them a bit.

Setting up the build environment took me 10mins using copy paste!

Pi4-4 with passive cooling, fake openGL driver. Build time 95 mins. Although the little beast constantly ran at 100% cpu activity the temperature remained below 65ºC, so cpu speed remained at 1,5MHz.

This means lot's of python2 and Qt4 libraries on the system, but hei, it's great to have FreeCAD running for now...

Thanks!
Last edited by pigong on Fri Apr 24, 2020 11:35 pm, edited 2 times in total.

User avatar
scruss
Posts: 3832
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Apr 17, 2020 3:05 pm

I'm glad this is till working out for people.I don't really use FreeCAD too much, as OpenSCAD is how I think. (Sad, isn't it?)

A couple of responses to Brad Q's suggestions, which I do appreciate, but:
Brad Q wrote:
Mon Mar 16, 2020 10:28 pm
1. make j-8 (towards the bottom, sets max # of threads, more=faster)

Edit: j-8 errored out at around 35%, but it was screaming up to that point. Maybe j-6
It would be -j8, but -j4 works and doesn't crash.
4. instead of downloading the zip, clone it, but I do not know exactly how that is set up.

For the .19 version(currently):
git clone https://github.com/FreeCAD/FreeCAD.git
By downloading the zip, you're getting a known release: 0.18.4. By doing a clone, you get 0.19-pre-whatever. Known releases tend to be more stable, and I know that — at one point in time, at least — this version of the code compiled under Raspbian. If someone knows they need a version newer than 0.18.4, then they're on their own for building it. No amount of following my guide will help them.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

-alex-
Posts: 8
Joined: Mon Apr 13, 2020 12:50 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Tue May 05, 2020 8:35 pm

Hi there,

JFYI Freecad 18.4 PY3/Qt5 works on RPI4 with Ubuntu 20.04LTS: https://forum.freecadweb.org/viewtopic. ... 14#p395614
Now ones could compare libs between Ubuntu 20.04LTS and Raspbian Buster to locate maybe the origine of the segfault issue with Raspbian.
As I am concerned I would prefer to use FreeCAD with Raspbian, any help still appreciated to track the bug or find a fix by updating some libs maybe ;)

User avatar
scruss
Posts: 3832
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: FreeCAD on PI4 and Raspbian Buster.

Tue May 05, 2020 9:04 pm

The build I linked to is Python 2, so there's your difference right there. The rest of the build differences would be too much work to consider, especially since the 2→3 change is monumental.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

-alex-
Posts: 8
Joined: Mon Apr 13, 2020 12:50 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Tue May 05, 2020 9:21 pm

I'm not sure to see your point, AFAIK on RPI4 with Raspbian FreeCAD works with PY2or3/Qt4, and crashes with PY2or3/Qt5.
But it work with PY3/Qt5 with Ubuntu. So, maybe this statement is a way to locate the issue with Raspbian don't you think?

User avatar
scruss
Posts: 3832
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: FreeCAD on PI4 and Raspbian Buster.

Wed May 06, 2020 2:10 am

Someone else — not me — can do this
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

-alex-
Posts: 8
Joined: Mon Apr 13, 2020 12:50 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Fri May 08, 2020 8:47 pm

Hi there, JFYI FreeCAD 0.19 compiled with Py3/Qt5 works on RPI4 with Ubuntu 20.04LTS.
See here https://forum.freecadweb.org/viewtopic. ... 60#p396635
I hope someday that will be ok with Raspbian too, with no segfault issue....
Enjoy FreeCAD 0.19 on RPI4 :D

User avatar
Gavinmc42
Posts: 5157
Joined: Wed Aug 28, 2013 3:31 am

Re: FreeCAD on PI4 and Raspbian Buster.

Mon May 11, 2020 6:54 am

Cools, thanks for the guides.
I will try this on Gentoo64 as well.

What version Mesa are these using?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

-alex-
Posts: 8
Joined: Mon Apr 13, 2020 12:50 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Tue May 12, 2020 10:31 am

Gavinmc42 wrote:
Mon May 11, 2020 6:54 am
What version Mesa are these using?

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:
hmmm, "llvmpipe" rendering :| , so... graphics are CPU accelerated on (X)Ubuntu 20.04? If I'm right I assume that why the frame rate is lower compare with renderings on Raspbian Lxde.
That's maybe also why there is not segfault issue with FreeCAD Py3/Qt5 on Ubuntu 20.04?

plugwash
Forum Moderator
Forum Moderator
Posts: 3737
Joined: Wed Dec 28, 2011 11:45 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Tue May 12, 2020 4:01 pm

I wonder if it's possible to switch to llvmpipe on raspbian and if-so what impact that has on freecad.

User avatar
Gavinmc42
Posts: 5157
Joined: Wed Aug 28, 2013 3:31 am

Re: FreeCAD on PI4 and Raspbian Buster.

Tue May 12, 2020 10:55 pm

Is llvmpipe software rendering?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

-alex-
Posts: 8
Joined: Mon Apr 13, 2020 12:50 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Thu May 14, 2020 4:15 pm

Gavinmc42 wrote:
Tue May 12, 2020 10:55 pm
Is llvmpipe software rendering?
AFAIK yes it is. To continue topic about FreeCAD on Ubuntu 20.04 see here viewtopic.php?f=131&t=274059&p=1660615& ... d#p1659911

User avatar
Gavinmc42
Posts: 5157
Joined: Wed Aug 28, 2013 3:31 am

Re: FreeCAD on PI4 and Raspbian Buster.

Sun May 31, 2020 5:05 am

Code: Select all

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
FreeCAD 0.18 is working in the new 64bit Raspberry Pi OS.
sudo apt-get install freecad

The fun begins now, only used 16 and 17, 18 is new to me.
Lots of interesting plugins I never noticed before.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
clicky
Posts: 515
Joined: Thu Oct 25, 2012 7:34 am

Re: FreeCAD on PI4 and Raspbian Buster.

Sun May 31, 2020 8:13 am

Pi4 8GB + SSD (and USB3 case) ordered - all in preparation (and anticipation) of switching to 64bit Raspbian! :D

Thanks for letting us know. I was just thinking of needing to recompile it again as I did it for regular (32bit) Raspbian.

User avatar
Gavinmc42
Posts: 5157
Joined: Wed Aug 28, 2013 3:31 am

Re: FreeCAD on PI4 and Raspbian Buster.

Sun May 31, 2020 11:05 am

Thanks for letting us know. I was just thinking of needing to recompile it again as I did it for regular (32bit) Raspbian.
Yep I came here to find the link for compiling, then I thought I would try an install.

I noticed Blender was pre-installed, maybe???
OpenSCAD, Wings3D, Inkscape... yep all working.

Bonus, is it is now booting and running from a 256GB SSD, but USB2 only, USB3 has issues with my USB to SATA chips.

Anyway 0.18 has a sheet metal plugin, model Cybertrucks?
I was looking for a CAD program to try making Cyberbots.
Got some stainless, cutters and bender in the basement.

Going to be fun as lockdown is at least till late August.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
clicky
Posts: 515
Joined: Thu Oct 25, 2012 7:34 am

Re: FreeCAD on PI4 and Raspbian Buster.

Sun May 31, 2020 1:17 pm

Gavinmc42 wrote:Yep I came here to find the link for compiling, then I thought I would try an install.

I noticed Blender was pre-installed, maybe???
OpenSCAD, Wings3D, Inkscape... yep all working.
That's great! Blender? Wow - I never got to learn how to use it - but did use to occasionally to convert 3d objects from one format to another (lately for LibGDX WebGL/OpenGL project for Raspberry Pi! :D) or to adjust model's sizes... That's really great knowing!
Gavinmc42 wrote:Bonus, is it is now booting and running from a 256GB SSD, but USB2 only, USB3 has issues with my USB to SATA chips.
That's not really that important to me: I can always spare some not quite working but /boot partition is OK SD card to boot up things. I wouldn't switch from this RPi (I am typing this on) from 3-4Gbit/s SSD to 480Mbit/s again. It makes quite a difference when system is so responsive (due to fast I/O).
Gavinmc42 wrote: Anyway 0.18 has a sheet metal plugin, model Cybertrucks?
I was looking for a CAD program to try making Cyberbots.
Got some stainless, cutters and bender in the basement.
Hm. What size? Scale or not? :D I would like to see it!
Gavinmc42 wrote: Going to be fun as lockdown is at least till late August.
I know what yo mean :) LOL BTW I am not going to anyone's office nor sending kids to school until our parliament is back in full swing or we are (positively) tested for anti-bodies. I wish Pi4 with 16GB is due out sooner... but 8GB is going to do just nicely! I'm in it for a long run.

Back to FreeCAD - oddly enough, FreeCAD works (my compiled version on ordinary Raspbian and Pi4) better than on my MBP.

User avatar
Gavinmc42
Posts: 5157
Joined: Wed Aug 28, 2013 3:31 am

Re: FreeCAD on PI4 and Raspbian Buster.

Mon Jun 01, 2020 1:54 am

Blender for Artists has an easier to use interface.
viewtopic.php?f=54&t=249831
Will try it on this new Raspberry OS, now have plenty of SSD space.

Once Vulkan is working we can upgrade to the newest Vulkan Blender?

I have been spending lots of time trying to see how well a Pi4 can be used for enabling the Fourth Industrial revolution.
Looking pretty good now, 3D metal printers now need to make it to the desktop.

Inkscape has G-code output. wounder if there is a CAM plugin for FreeCAD?
Edit yep CAM stuff for FreeCAD.
Watching a tutorial on Freetube.
https://freetubeapp.io/#download

Don't think lockdown will go on long enough to learn everything on FreeCAD now, maybe that second wave can extend it?
What machines do I need to use/get to replace everything made in China?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

leggazoid
Posts: 42
Joined: Sun Apr 07, 2013 6:58 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Sat Jun 06, 2020 8:20 pm

Just for fun I tried to compile FreeCAD version 0.19 from git on the beta software Raspi OS 64-bit based on Debian.

Code: Select all

sudo apt install build-essential libtool lsb-release cmake cmake-gui cmake-curses-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 libsimage-dev doxygen libcoin-doc libspnav-dev
These dependencies were from the install instructions.

Code: Select all

git clone https://github.com/FreeCAD/FreeCAD.git freecad-source
This will install the latest source code from Github.

Code: Select all

cd freecad-source

Code: Select all

mkdir build

Code: Select all

cd build

Code: Select all

cmake .. -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3
Look for summary report at the end, It will say...
-- Configuring done
-- Generating done
or an error.
If error scroll up and find whats wrong.

Code: Select all

make -j$(nproc)
This step takes an hour or two. It will give you a percentage of complete while it scrolls.
I aimed an external fan at the raspberry pi because the temperature warning came on.

Code: Select all

cd bin

Code: Select all

./FreeCAD
It worked for me. Now how do you make an Appimage for Aarch64?

Code: Select all

OS: Debian GNU/Linux 10 (buster) (LXDE/LXDE-pi)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21506 (Git)
Build type: Unknown
Branch: master
Hash: ac4196fb66a34cc4f246afa3c5858e6d4b821875
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Cheers
Last edited by leggazoid on Sun Jun 07, 2020 1:07 pm, edited 1 time in total.

User avatar
Gavinmc42
Posts: 5157
Joined: Wed Aug 28, 2013 3:31 am

Re: FreeCAD on PI4 and Raspbian Buster.

Sun Jun 07, 2020 2:45 am

Code: Select all

Sheet Metal workbench loaded
During initialization the error "inconsistent use of tabs and spaces in indentation (<string>, line 52)" occurred in /home/pi/.FreeCAD/Mod/cura_engine/InitGui.py
Please look into the log file for further information
connect failed: No such file or directory
Thanks, it works, some bugs but at least it can make a new file and start part designs.
Now have two versions 0.18 and 0.19 :D

Might give your instructions a go in Gentoo64 once it is using kernel 5.x.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

-alex-
Posts: 8
Joined: Mon Apr 13, 2020 12:50 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jun 09, 2020 8:48 pm

Gavinmc42 wrote:
Sun Jun 07, 2020 2:45 am
Thanks, it works, some bugs but...
Humm, guys you say FreeCAD works when compiling with Qt5 and PY3 on 64B OS, no more segfault issue? Right? Interesting!
Thank you guys for the information, I'm going to install 64B OS and compile FC.
@Gavinmc42: IMHO the error you get with Cura workbench is due to PY3, I guess Cura workbench is still PY2.

homeless101
Posts: 1
Joined: Thu Nov 19, 2020 1:32 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Nov 19, 2020 1:38 pm

please help i get the following error..

Program received signal SIGSEGV, Segmentation fault.
#0 /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0xb179e120]

how do i fix it?

Return to “Raspberry Pi OS”