Raspberry Pi 3B+ compile attempt appears to hang

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
-alex-
Veteran
Posts: 1849
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Raspberry Pi 3B+ compile attempt appears to hang

Post by -alex- »

Sorry if 32B/64B buster was quite ambiguous.
RPIOS 32B Buster is the official distro supported by the Raspberry PI Fundation (RPF).
However there is also a RPIOS 64B (beta test) Buster distro.
On RPI4, FC crashes with RPIOS32B, but works with RPIOS64B. Don't ask me why.
The same with the very last RPIOS bullseye.
Your RPI3B+ is an ARMV8-A (32/64B) device, it is suitable with 32B or 64B OS, similar to RPI4.
But RPI3B+ has a different GPU, so maybe it will not crash the same way with RPIOS32B Buster. You have to try. Lagacy driver should be ok has I told you, but with fake or full KMS driver I don't know.
Dakidd
Posts: 23
Joined: Wed Jul 21, 2021 11:01 pm

Re: Raspberry Pi 3B+ compile attempt appears to hang

Post by Dakidd »

-alex- wrote: Sun Nov 28, 2021 11:07 pm
Dakidd wrote: Sun Nov 28, 2021 7:01 pm The reading I've been doing since yesterday *SUGGESTS* that Buster IS 64 bit, but nothing explicitly comes out and says it is - only hints in that direction. Which I find odd.
More information about FC compiling and RPI4 here and here issue #4083
ATM Buster 64B gives the best results to compile FC with Py3/Qt5 without segfault issue.
That said it is also possible to compile successfully FC with Py2/Qt4 on RPIOS 32B Buster, or Py3/Qt4 as a workaround.
RPI3 seems to crash the same way, but I'm notre sure. Waiting for your report.
With info picked up since my last update, I've figured out that RPi 3B+ (the 1.3 revision I've got, anyway - YMMV for earlier revisions) is indeed running a 64bit processor, but the current (official) Raspberry Pi OS is 32bit only, so it operates the hardware (and reports it) as if it were pure 32bit.

Py2 and Qt4 are both deprecated tech, so I'd REALLY prefer to avoid them, if at all possible.

FWIW, I got the Realthunder branch of FC to compile. That's the good news. The bad news is that it crashes exactly like the 0.20 branch - sigsegv in the same place (coin3d) when trying to create a new document.

I've got a debug build of 0.20 in progress (49% completed as I type this), and I'll be trying to walk through it with GDB once it completes, hopefully pinning down EXACTLY where the crash happens. My first bet would be that the root of the problem is that the coin package was written explicitly 64bit, so on a 32bit system, only half of the pointer's address is getting properly set up (By coin3d? Or something else that later calls it? Yet to be determined, and likely to be important to creating a fix/workaround), leading to a crash when there's an attempt to use the pointer in 64bit mode - It would make sense that trying to use a pointer with an address that's only "half set" is a great way to cause a crash, since there's no telling where the "not set up" bits might be pointing - Into the heart of the kernel? Smack in the middle of the program's executable code? The dark side of the moon? Lois Lane's bikini? All are equally likely, and all are likely to cause problems.

Further updates as warranted...
User avatar
-alex-
Veteran
Posts: 1849
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Raspberry Pi 3B+ compile attempt appears to hang

Post by -alex- »

Dakidd wrote: Wed Dec 01, 2021 5:57 pm My first bet would be that the root of the problem is that the coin package was written explicitly 64bit, so on a 32bit system, only half of the pointer's address is getting properly set up (By coin3d? Or something else that later calls it? Yet to be determined, and likely to be important to creating a fix/workaround),
Would be great to get a clue for sure. Good luck!
JFYI here is the FC debug mode backtrace on RPI4 with RPIOS32B Buster: https://forum.freecadweb.org/viewtopic. ... 68#p456568
cobannie
Posts: 1
Joined: Thu Dec 30, 2021 4:38 pm

Re: Raspberry Pi 3B+ compile attempt appears to hang

Post by cobannie »

-alex- wrote: Wed Dec 01, 2021 6:40 pm Info...
Hello,

I'm rather new to Raspberry Pi computers and Linux.

Are there any clear download / compiling instructions for beginners to install FreeCAD on a Raspberry Pi 3?

I travel a lot for work, and often play with sensors / stepper motors and physical computing projects in hotels after work. So I often travel with a Pi 3.

I do a fair bit of 3d printing / tinkering when I'm back at home as well. I would like to be able to do 3D designs while in hotels with my Pi 3 if it's possible.

Any advice on how to go about attempting to install FreeCAD on this Rpi 3?

Thank you!
User avatar
-alex-
Veteran
Posts: 1849
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Raspberry Pi 3B+ compile attempt appears to hang

Post by -alex- »

cobannie wrote: Thu Dec 30, 2021 4:53 pm Any advice on how to go about attempting to install FreeCAD on this Rpi 3?
Hi Cobannie, for now no news from @dakidd about compiling of recent FC release.
IIRC you can:

Code: Select all

sudo apt install freecad
on Raspbian Stretch, then enable FKMS graphical driver in raspi-config settings.
Then get FC 0.14.
But I don't remember if it worked, because 3 years ago I was using micrometer cnc distribution to use FC with RPI3B+. This distro is fine tuned to run FC. That's why I'm not so sure it worked with legacy Raspbian.
See here: https://forum.freecadweb.org/viewtopic. ... 10#p288006
About security with this distro, you're on your own.
Nowadays, with RPIOS Buster or Bullseye and RPI3B+ I don't know, you have to install it then try. Please report.
If I have time I'll give it a try as well, but now I'm focusing on RPI4 witch is definitely more suitable with FC.
RPI3 has 1GB of RAM, it's very limited to use FC on Raspbian/RPIOS.
Post Reply