Page 1 of 3

FreeCAD on PI4 and Raspbian Buster.

Posted: Sun Jun 30, 2019 8:54 am
by BatteriesIncluded
Hi Guys,

I thought my shiny new PI4 might be able to run FreeCAD, especially as I don't need the GUI, I just need freecadcmd.

Currently installation errors out as below.

root@pi4:~# apt install freecad
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
freecad : Depends: freecad-python2 but it is not installable or
freecad-python3 but it is not installable
Recommends: calculix-ccx but it is not going to be installed
Recommends: graphviz but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@pi4:~#


In the hope of a more meaningful error message I tried installing freecad-python3

root@pi4:~# apt install freecad-python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package freecad-python3 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'freecad-python3' has no installation candidate
root@pi4:~#


Which kind of suggests it's not there at all.
Anyone else been able to install FreeCAD on Raspbian Buster?

Jeremy.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sun Jun 30, 2019 9:16 am
by fruitoftheloom
BatteriesIncluded wrote:
Sun Jun 30, 2019 8:54 am
Hi Guys,

I thought my shiny new PI4 might be able to run FreeCAD, especially as I don't need the GUI, I just need freecadcmd.

Currently installation errors out as below.

root@pi4:~# apt install freecad
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
freecad : Depends: freecad-python2 but it is not installable or
freecad-python3 but it is not installable
Recommends: calculix-ccx but it is not going to be installed
Recommends: graphviz but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@pi4:~#


In the hope of a more meaningful error message I tried installing freecad-python3

root@pi4:~# apt install freecad-python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package freecad-python3 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'freecad-python3' has no installation candidate
root@pi4:~#


Which kind of suggests it's not there at all.
Anyone else been able to install FreeCAD on Raspbian Buster?

Jeremy.

Did you fully update Raspbian Buster ?

Code: Select all

sudo apt update
sudo apt full-upgrade
sudo reboot

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sun Jun 30, 2019 9:44 am
by BatteriesIncluded
Thanks for the reply. I had only done an update, not seen full-update before. But tried your exact sequence now and nothing has changed as far as installing FreeCAD goes.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sun Jun 30, 2019 9:50 am
by fruitoftheloom
BatteriesIncluded wrote:
Sun Jun 30, 2019 9:44 am
Thanks for the reply. I had only done an update, not seen full-update before. But tried your exact sequence now and nothing has changed as far as installing FreeCAD goes.

FYI APT

http://manpages.ubuntu.com/manpages/xen ... apt.8.html

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sun Jun 30, 2019 1:09 pm
by fruitoftheloom
BatteriesIncluded wrote:
Sun Jun 30, 2019 9:44 am
Thanks for the reply. I had only done an update, not seen full-update before. But tried your exact sequence now and nothing has changed as far as installing FreeCAD goes.

The other package is freecad-common, though it all does seem to be broken due to CPU Architecture mismatch of dependencies.


The other option is to start afresh and build from Source Code ?????

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sun Jun 30, 2019 2:14 pm
by plugwash
Looking at this.

Freecad 0.16 was in Debian and raspbian stretch.

It seems freecad 0.16 was removed from Debian buster back in 2017 and was probablly removed from raspbian buster around the same time. I have not researched exactly why but I would guess it was broken in some way.

0.17 made it's way back into Debian buster, but was not built for Debian armel or armhf or for raspbian due to issues with opengl es builds of qt.

0.18~pre1 reintroduced support for arm architectures, unfortunately the build is failing in raspbian with
/usr/bin/ld: ../../../../lib/libDriverDAT.so: invalid string offset 3801 >= 2505 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverDAT.so: invalid string offset 3786 >= 2505 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverDAT.so: invalid string offset 3774 >= 2505 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverDAT.so: invalid string offset 3820 >= 2505 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverDAT.so: invalid string offset 3812 >= 2505 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverDAT.so: invalid string offset 3767 >= 2505 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverDAT.so: invalid string offset 3800 >= 2505 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverUNV.so: invalid string offset 10232 >= 9957 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverUNV.so: invalid string offset 10220 >= 9957 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverUNV.so: invalid string offset 10206 >= 9957 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverUNV.so: invalid string offset 10187 >= 9957 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverUNV.so: invalid string offset 10240 >= 9957 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverUNV.so: invalid string offset 10221 >= 9957 for section `.strtab'
/usr/bin/ld: ../../../../lib/libDriverUNV.so: invalid string offset 10194 >= 9957 for section `.strtab'
I notice there has been a binutils update since the last attempt at buliding it, so i've scheduled a retry, will see what happens.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sun Jun 30, 2019 7:13 pm
by BatteriesIncluded
Thanks for looking into it.
Fingers crossed for a successful build.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sun Jun 30, 2019 11:25 pm
by plugwash
It failed but in a different way :/

Code: Select all

/<<BUILDDIR>>/freecad-0.18~pre1+dfsg1/src/Gui/SoFCOffscreenRenderer.cpp:602:34: error: 'GL_RGB32F_ARB' was not declared in this scope
     fmt.setInternalTextureFormat(GL_RGB32F_ARB);

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Mon Jul 01, 2019 7:14 am
by BatteriesIncluded
Thanks for trying. At least we know why there is no Raspbian package for FreeCAD.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Mon Jul 01, 2019 7:20 pm
by icarePetiles
Hi,
Is the freeCAD package in Raspbian packages planned?
Thank you

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Thu Jul 04, 2019 5:24 am
by plugwash
depends if I can get it to build or not.

I think the linker stuff was a red herring, it only seems to be a warning, not an actual error. I think I have a fix for the opengl related error. Lets see if it fails in some other way.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Thu Jul 04, 2019 10:39 pm
by plugwash
Ok, got it to build, it should be in the repos soon.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 6:50 am
by BatteriesIncluded
Brillant, thank you! It's installing now.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 8:11 am
by BatteriesIncluded
The command line interface (freecadcmd) works like a charm, so I can run my rendering scripts. Surprisingly fast too. Its running freecadcmd scripts at nearly 30% of the speed of the best machine I have access too, a brute of a box with 8 Xeon cores and 128G of ram! Thats insane.

Now that's not a strict like for like speed test because the Xeon is running FreeCAD Version 0.16 and the PI Version 0.18. So there are two possibilities, either the PI punching well above its weight, or FreeCAD got a lot more efficient over the last couple of releases. Its worth me working out which it is as we run a lot of these scripts.

For others reading this thread, note that the GUI is broken, it crashes out with a segmentation fault as soon as you click Create New Document.

But if all you want is command line access to FreeCAD this is an exciting result.

Thank you again plugwash.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 8:38 am
by icarePetiles
Hi,
Grateful in front of work of plugwash.
BatteriesIncluded wrote:
Fri Jul 05, 2019 8:11 am
For others reading this thread, note that the GUI is broken, it crashes out with a segmentation fault as soon as you click Create New Document.
I have the following message:
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) [0xb3258120]

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 8:45 am
by Gavinmc42
Instructions on how to install please.
FreeCAD is my favourite CAD program.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 8:50 am
by BatteriesIncluded
Install FreeCAD with this command

sudo apt install freecad

If the package isn't found (which is likely as its brand new) do
apt update
apt upgrade

Then try again.

Once its installed you can run your scripts with
freecadcmd scrip_name.py

As previously mentioned the GUI is not currently operational.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 8:51 am
by icarePetiles
Hi,
Gavinmc42 wrote:
Fri Jul 05, 2019 8:45 am
Instructions on how to install please.
FreeCAD is my favourite CAD program.

Code: Select all

sudo apt update
sudo apt install freecad-python3
or

Code: Select all

sudo apt update
sudo apt install freecad-python2
;)

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 10:04 am
by Gavinmc42
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) [0xb32d1120]

Nearly, runs but as soon as I make a new file it closes down.
Only got the 4B1 version, does it need more than 1GB?

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 10:26 am
by icarePetiles
Hi,
Gavinmc42 wrote:
Fri Jul 05, 2019 10:04 am
Only got the 4B1 version, does it need more than 1GB?
Same problem with 2 GB
Apparently an openGL problem

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 12:09 pm
by Gavinmc42
Apparently an openGL problem
That will probably get fixed soon.
FreeCAD is one of my main PC programs, once that is working it is one more app ticked off my list.
Then Pi4 does become closer to a replacement desktop for me.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Fri Jul 05, 2019 12:57 pm
by BatteriesIncluded
To follow up on my earlier post regarding performance. I just compared the execution of the command line version of FreeCAD 0.16 and 0.18 on the same platform, and find them about the same.

So the Raspberry Pi4 really is running these scripts at a very impressive speed. Specifically about 30% of a Xeon Platinum 8175M CPU @ 2.50GHz!

Watch out Intel.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sat Jul 13, 2019 1:19 pm
by plugwash
Can people who have had trouble with the freecad GUI try updating their systems and trying again. I just tried it on a fully updated buster and it seems to run. I think it may have been fixed by a recent LLVM fix I uploaded.

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sat Jul 13, 2019 3:36 pm
by icare19
Hi,
I installed the new version of Buster and freecad. Freecad starts and crashes when opening a file or a new document.
With the error:
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) [0xb3258120]
What did you do for your test to make it work?
Thanks!

Re: FreeCAD on PI4 and Raspbian Buster.

Posted: Sat Jul 13, 2019 8:37 pm
by thrustpork
Yeah, mine crashes when trying to create or load a file. I've been updating every day hoping it will get fixed :)