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

Re: FreeCAD on PI4 and Raspbian Buster.

Sat Aug 24, 2019 12:41 am

I got OpenSCAD to work in Gentoo64.
Under Buster I had similar errors on compiling OpenSCAD as the FreeCAD errors.
Coin3D emerged ok on Gentoo64.

Just wondering if it might be a 32/64bit issue?
Not sure if FreeCAD runs on Gentoo x86 32bit?
Are there any 32bit Linux's around for x86?

No ebuild for Arm8 version, so it must be done the hard way :(
emerge: there are no ebuilds to satisfy "freecad".
Is there a way to test coin3d without FreeCAD?
Google time
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Aug 29, 2019 3:48 pm

Just to keep this thread alive - I've picked the latest from git and compiled it as on https://www.freecadweb.org/wiki/CompileOnUnix and without any errors. Of course it didn't do me any good as it fails in exactly the same way as pre-packaged version...

Any news on finding the winning combination?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6228
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Aug 29, 2019 3:50 pm

Not until this coin3d issue is fixed - https://freecadweb.org/tracker/view.php?id=4083

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

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Aug 30, 2019 1:41 am

I have been getting a "segmentation fault" error on other apps when compiling and running on Gentoo64.
Linux Combat Simulator compiles, runs and then crashes with "seg fault".
What is common? OpenGL?
But there is massive libraries and dependencies in both.

What does "segmentation fault" mean?
google time
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

kkremitzki
Posts: 4
Joined: Wed Aug 07, 2019 9:45 pm
Location: Texas
Contact: Website Twitter

Re: FreeCAD on PI4 and Raspbian Buster.

Sat Oct 12, 2019 12:39 am

Hello all, I just wanted to give an update. I've finally got my Raspberry Pi 4—this thing is amazing! After some further troubleshooting, we've hit a dead end on fixing the segmentation fault problem. However, it looks like it isn't present when FreeCAD is built with the Python 2, Qt 4 configuration. So, my plan is to provide a diff of the debian (packaging) tarball to Raspbian maintainers which will change the build rules and possibly some of the install manifests, and once that is applied and a new package built and uploaded to the archive, then people will for sure be able to start running FreeCAD on RPi4's. Woohoo!

After I get that diff prepared I can continue troubleshooting the Python 3, Qt 5 build.

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

Re: FreeCAD on PI4 and Raspbian Buster.

Sat Oct 12, 2019 5:09 am

we've hit a dead end on fixing the segmentation fault problem.
I have run into seg faults during compiles etc when Pis runs out of memory.
Happens on Pi3's and smaller 4's.
Not sure if it is GPU/CPU memory clash, but that is my theory at the moment.
Need to make it repeatable before I can say that with more confidence.
Buster seems worse than Gentoo64 for seg faults too.

My current Pi4 stress test is Buildroot.

Don't think I have tried making FreeCAD on my new Pi4B4, the older 1 and 2GB ones did not work.
For big compiles the 4GB Pi4 is best or the 2GB one without desktop.
Some stuff will compile on the 1GB 3,4's it I have a 1GB swap file.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

roweder
Posts: 3
Joined: Mon Jun 10, 2019 8:45 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Jan 09, 2020 5:39 pm

Any updates? I have 2 Pi 4B4s, one running raspbian and the other running OctoPi, both running with the latest updates. I recently installed FreeCAD on both Pi 4B4s and I'm having the exact same problem as OP. I installed with just

Code: Select all

sudo apt install freecad

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

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Jan 10, 2020 5:10 am

Have not heard of any progress yet.
I might have to learn how to fix it myself ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Jeepsterjc
Posts: 5
Joined: Sat Jan 25, 2020 2:58 am

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jan 28, 2020 1:57 am

No luck here... So🍿

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

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jan 28, 2020 3:07 am

Time to try again?
Mesa 19.3.2 is out, but I think from memory it was coin3d, qt5 or python issues?

Reading my old posts I don't think I tried compiling on the 4GB Pi4.
"Segfaults" is something I have run into since then, they seemed to be memory related in some cases.
Yikes, those links show a complex set of problems.

Yep pull up a chair , grab the popcorn and let the experts figure it out.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Diablo2_Fan
Posts: 21
Joined: Thu Aug 01, 2019 6:47 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Feb 13, 2020 7:59 pm

kkremitzki wrote:
Sat Oct 12, 2019 12:39 am
Hello all, I just wanted to give an update.
Hello and thank you!
Is the RPI4 maybe incompatible or is the work still in progress?

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

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Feb 14, 2020 1:23 am

Is the RPI4 maybe incompatible or is the work still in progress?
I tried again with newer Mesa 3D driver on the weekend.
Same problem and the forum posts suggest it is a dependency issue.
Python has moved to 3 now and that affects things too.
Investigate Coin3D?

It takes some time to figure this stuff out.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Feb 14, 2020 9:46 am

If you are after it - it is definitively worth reading instructions in this thread and building it on your own.

Diablo2_Fan
Posts: 21
Joined: Thu Aug 01, 2019 6:47 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Feb 14, 2020 1:00 pm

Maybe someone from the raspberry-team has more informations?

kkremitzki wrote he provide a diff tarball to the raspbian maintainers.

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

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Feb 14, 2020 1:14 pm

My fault - I misread which thread I was posting in. There *is* a winning combination - see here:

viewtopic.php?f=63&t=253367&p=1551336#p1551336

Diablo2_Fan
Posts: 21
Joined: Thu Aug 01, 2019 6:47 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Feb 14, 2020 10:28 pm

Many thanks clicky, maybe I will try to compile it now with Py2/Qt4.

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

Re: FreeCAD on PI4 and Raspbian Buster.

Sat Feb 15, 2020 10:43 pm

Can confirm its builds and runs well enough to get started on some simple tutorials.

I used a slightly modified version of MartijnD's method to build 0.18.4. Some of Martijn's paths aren't valid any more on an up-to-date Buster system.

I built this on a Raspberry Pi 4 with 4 GB of RAM. It takes quite a bit of free storage: I wouldn't attempt to build this with less than 4 GB free. make -j4 takes 95 minutes, and even with a fan my Raspberry Pi 4 was at 70°C.

Code: Select all

sudo apt install cmake build-essential libtool lsb-release swig libboost-dev libboost-date-time-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 libopencv-dev libproj-dev libvtk6-dev libx11-dev libxerces-c-dev libzipios++-dev qt4-dev-tools libqt4-dev libqt4-opengl-dev libqtwebkit-dev libshiboken-dev libpyside-dev pyside-tools python-dev python-matplotlib python-pivy python-ply python-pyside libocct*-dev occt-draw libsimage-dev doxygen libcoin-doc dh-exec libspnav-dev

wget https://github.com/FreeCAD/FreeCAD/archive/0.18.4.zip

unzip 0.18.4.zip

rm 0.18.4.zip

mkdir freecad-build

cd freecad-build

cmake -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython2.7.so  -DPYTHON_PACKAGES_PATH=/usr/local/lib/python2.7/dist-packages/  ../FreeCAD-0.18.4/

make -j4
Yes, it's using Python 2.7, but it works. I've got no idea how to make it install properly, but it runs from the freecad-build/bin directory.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

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

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Feb 20, 2020 10:53 am

From the looks of things the packages that are in the Pi repo are non functional. Is that correct?

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

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Feb 20, 2020 2:32 pm

Yes, hence this whole thread. The repo version falls over as soon as you try to create or open a project.

Solvespace in the repos works, but is quite old.

openscad similarly dead in the repos (same QT/3d interaction, I believe) but there's a working Appimage of the current version here: https://github.com/koendv/openscad-raspberrypi
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

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

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Feb 20, 2020 2:42 pm

I should have said 'still not functional". I noted the start date on the opening thread and hoped in the 8(?) months since the problem was found it would have been fixed.

I have only been using a Pi4 since August. I understand that this is out of the Pi devs hands, but is it common for something to be broken for this long?

For me it is not a huge deal. I can just fire up my Xeon, but the power it eats in a week will run the Pi4 for a year.

Thanks

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

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Feb 21, 2020 2:06 am

but is it common for something to be broken for this long?
Not in my limited experience.

But the mainstream is mostly x84_64 these days.
Android is now mostly Aarch64.
Raspbian is Arm6/7/7l.

Raspbian is NOT a common OS outside of the RPi crowd.

Open Source apps that use so many external dependencies are at the mercy of those dependencies.
The VC4 and VC6 are getting better but they have been outside the mainstream too.
Python2/3 issues can cause problems too, especially that "print ()" change.

This year and last year are transition years, we saw a new Pi4 with new hardware.
And the first of good 64bit OS's getting closer to mainstream.

What has surprised me is how much does actually work even old C source code from decades ago.
I had expected a new solution by now, not one that requires rolling back.
The problem is mostly known, a solution must be in the works but like most open source it is probably part timers working on it.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Feb 21, 2020 3:35 am

openscad's basically been non-functional on Raspberry Pi for three or more years. I think it worked on Jessie for a while.

The problem, as I understand it, is that one of the QT 3d libraries expects OpenGL when the Raspberry Pi has OpenGL ES (or vice versa). It's a huge upstream change to fix something that doesn;t affect other platforms, so no-one gets around to it.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

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

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Feb 21, 2020 4:12 am

I guess I should have prefaced my statement that while I am new to Pi's I have been using Linux exclusively since Fedora Core four (FC4) back in 2004(?) and eperimenting before that. Usually in the mainstream any package that is broken for much over a year is just dead, and if it is something that you use very much you hope it gets forked.

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

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Feb 21, 2020 5:43 pm

Forking wouldn't help here. Raspberry Pi hardware doesn't (or didn't) support the heavyweight 3D libraries that desktop software relies upon. It would have needed a complete rewrite just for our hardware. That doesn't explain why it used to (kind of) work - I suspect software emulation, which would have been incredibly slow.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

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

Re: FreeCAD on PI4 and Raspbian Buster.

Sun Feb 23, 2020 3:23 pm

If we have issue of OpenGL vs OpenGL ES - why rebuilding it from source then works?

Return to “Raspberry Pi OS”