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...)
grayarea56
Posts: 14
Joined: Sat Oct 12, 2019 5:08 pm

Raspberry Pi 4 and Segmentation Fault

Post by grayarea56 »

Hi all,
I'm new to FreeCad, and I'm starting to love it!
I'm using it on my Desktop (windows) and it works perfect.
At night, I sometimes like to work from my Raspberry Pi 4.
I installed FreeCad version 0.18R
I'm using Raspbian.
I can run it, then if I click the "New" button I get the Segmentaion Fauilt.
I've searched the forum, many others have had this problem with the PI4.

I was wondering if there is a solution out there?

Dan Gray
Last edited by Kunda1 on Sat Oct 12, 2019 9:42 pm, edited 1 time in total.
Reason: Merged thread in to larger topic
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Raspberry Pi 4 and Segmentation Fault

Post by wmayer »

https://forum.freecadweb.org/viewtopic. ... 60#p339874

At the moment the combination of Py2/Qt4 and presumably Py3/Qt4 works but Py3/Qt5 causes problems. I have no idea if this is something we can manage to get it working.
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- »

easyw-fc wrote: Fri Oct 11, 2019 3:22 pm
vocx wrote: Wed Oct 09, 2019 10:59 pm Unfortunately, Python 2 is going to become unsupported very soon
An option could be to build for Qt4 & Py3.
I have compiled Freecad Py3:Qt4 build, and that works, I mean I can create a new file and some body in Part design for eg.
But I get some warning messages about Pyside and so on.
I have remove old freecad-build directory, then created a new one. Then:

Code: Select all

pi@raspberrypi:~/freecad-build $ cmake  -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Debug ../freecad-source
pi@raspberrypi:~/freecad-build $ make -j4
For exemple, while running Freecad, then creating a body (see picture below), thern closing Freecad, I got this messages in terminal:

Code: Select all

pi@raspberrypi:~/freecad-build/bin $ ./FreeCAD
FreeCAD 0.19, Libs: 0.19R18504 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

During initialization the error "No module named 'PySide'" occurred in /home/pi/freecad-build/Mod/Tux/InitGui.py
Please look into the log file for further information
During initialization the error "No module named 'PySide'" occurred in /home/pi/freecad-build/Mod/Arch/InitGui.py
Please look into the log file for further information
During initialization the error "No module named 'PySide'" occurred in /home/pi/freecad-build/Mod/AddonManager/InitGui.py
Please look into the log file for further information
During initialization the error "No module named 'PySide'" occurred in /home/pi/freecad-build/Mod/Draft/InitGui.py
Please look into the log file for further information
CommandManager::addTo() try to add an unknown command (Std_AddonMgr) to a widget!
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/home/pi/freecad-build/Mod/Start/StartPage/StartPage.py", line 29, in <module>
    from . import TranslationTexts
  File "/home/pi/freecad-build/Mod/Start/StartPage/TranslationTexts.py", line 24, in <module>
    from PySide import QtGui
<class 'ModuleNotFoundError'>: No module named 'PySide'
No module named 'PySide'
connect failed: No such file or directory
CommandManager::addTo() try to add an unknown command (Std_AddonMgr) to a widget!
CommandManager::addTo() try to add an unknown command (PartDesign_InvoluteGear) to a widget!
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 31 (X_GrabKeyboard)
  Resource id:  0x0
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 31 (X_GrabKeyboard)
  Resource id:  0x0
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 31 (X_GrabKeyboard)
  Resource id:  0x0
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 31 (X_GrabKeyboard)
  Resource id:  0x0
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 31 (X_GrabKeyboard)
  Resource id:  0x0
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 31 (X_GrabKeyboard)
  Resource id:  0x0
pi@raspberrypi:~/freecad-build/bin $ 
2019-10-13-163355_1920x1080_scrot.png
2019-10-13-163355_1920x1080_scrot.png (204.25 KiB) Viewed 4303 times
OS: Raspbian GNU/Linux 10 (buster) (LXDE/LXDE-pi)
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.19.18504 (Git)
Build type: Debug
Branch: master
Hash: f66023a646db4b2502bb3637897443b3525ca3c7
Python version: 3.7.3
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Last edited by -alex- on Sun Oct 13, 2019 2:54 pm, edited 1 time in total.
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FreeCAD and Raspberry Pi 4

Post by -alex- »

vocx wrote: Sat Oct 12, 2019 3:33 pm Yes, it's fine to compile against 0.18, however, 0.19 is in active development and it brings so many new features over 0.18, that it would be great to make it work as well. Right now a 0.18 version is great to have, but in a few months, when 0.19 is ready to become the next stable version, it would be good to offer it as well in Raspbian, even in a Py2/Qt4 combination, but preferably with Py3/Qt5.
I agree 100%. Maybe we could even offer a Py3:Qt4 in Raspbian, if no warnings messages (see my previous post above, maybe I did something wrong or some libs are still missing, or ...?).

vocx wrote: Sat Oct 12, 2019 3:33 pm If I were to test things, I would probably only enable Part and Start.
There are other modules like Tux, Import, and AddonManager. These aren't proper workbenches, but rather they provide internal support for certain options of FreeCAD, such as the mouse navigation, and the import system. I would leave these enabled as well. That is, I would only disable those that are accessible through the workbench selector.
Thanks for informations, I will try again.
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD and Raspberry Pi 4

Post by wmayer »

if no warnings messages (see my previous post above, maybe I did something wrong or some libs are still missing, or ...?).
For Qt4 there should be a PySide and shiboken package that offer Python modules that can be imported at runtime. When installing them the warning should go away.
Without these modules the Tux wb doesn't load and the Path and FEM wb don't work 100% either.
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD and Raspberry Pi 4

Post by wmayer »

The whole issue is it possible that's about OpenGL vs. OpenGL ES?
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: FreeCAD and Raspberry Pi 4

Post by kkremitzki »

wmayer wrote: Sun Oct 13, 2019 4:06 pm The whole issue is it possible that's about OpenGL vs. OpenGL ES?
That's one thing I have been suspecting, yes.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
clicky
Posts: 4
Joined: Fri Sep 27, 2019 4:02 pm

Re: FreeCAD and Raspberry Pi 4

Post by clicky »

-alex- wrote: Sun Oct 13, 2019 2:35 pm I have compiled Freecad Py3:Qt4 build, and that works, I mean I can create a new file and some body in Part design for eg.
But I get some warning messages about Pyside and so on.
:) Brilliant. Thank you for all your effort. It is working now for me, too. I did what you said (and got to the same state with PySide errors, etc).

Funny thing was that by running KDE with some 'dark colour theme' I had problem with fonts not showing (well - faint on very right) - but that's completely different problem and not that important.
grayarea56
Posts: 14
Joined: Sat Oct 12, 2019 5:08 pm

Re: FreeCAD and Raspberry Pi 4

Post by grayarea56 »

MartijnD wrote: Fri Oct 11, 2019 4:49 am Hello All,

Hereby I can confirm a successful build on the Pi4. I used the source of 0.18.3. As far as I can see everything is working.

........

Hope it helps someone.
\\est regards and keep up the good work!
Martijn
It helped me! I was able to make the 0.18.3, and it works on my PI 4!!!!

Thanks everyone!

Dan Gray
clicky
Posts: 4
Joined: Fri Sep 27, 2019 4:02 pm

Re: FreeCAD and Raspberry Pi 4

Post by clicky »

Oh, well - top of the master (as of yesterday) in this combination has an issue with loading files saved by itself. I can easily load files saved by version I have on my Mac, but trying to load version of FCStd file I've saved yesterday results with SIGSEGV :(

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0xb02d9120]
I'll give it a go with some older version...
Post Reply