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

Re: FreeCAD on PI4 and Raspbian Buster.

Sat Jul 13, 2019 11:10 pm

I didn't try to actually do anything, I just loaded the GUI, I thought that was what at least some people were having trouble with.

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

Re: FreeCAD on PI4 and Raspbian Buster.

Sun Jul 14, 2019 12:32 am

I didn't try to actually do anything, I just loaded the GUI, I thought that was what at least some people were having trouble with.
Nope the GUI is fine now, we can sit and stare at it for ages :D
It is just when you create a new file it crashes and vanishes.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
framboise_314
Posts: 18
Joined: Tue Aug 21, 2012 1:04 pm
Location: Le Creusot - France
Contact: Website

Re: FreeCAD on PI4 and Raspbian Buster.

Sun Jul 14, 2019 3:48 pm

hello
same trouble here
GUI launch ok Click New and oups GUI is gone away
regards
framboise314

thrustpork
Posts: 20
Joined: Sat Jul 06, 2019 12:49 am

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jul 16, 2019 4:27 pm

Any news on this? FreeCAD is the last piece of the puzzle for me after switching my desktop out for a Pi4. I managed to get slic3r working, just need my handy CAD program to get back to 3D printing useless stuff. :)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23709
Joined: Sat Jul 30, 2011 7:41 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jul 16, 2019 5:30 pm

Has this been reported to Freecad? They are probably best placed to figure out what the problem is.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

fruitoftheloom
Posts: 20769
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jul 16, 2019 5:38 pm

jamesh wrote:
Tue Jul 16, 2019 5:30 pm
Has this been reported to Freecad? They are probably best placed to figure out what the problem is.

https://forum.freecadweb.org/viewtopic.php?f=42&t=37458


https://forum.freecadweb.org/viewtopic.php?f=12&t=37314
Retired disgracefully.....

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23709
Joined: Sat Jul 30, 2011 7:41 pm

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jul 16, 2019 5:55 pm

fruitoftheloom wrote:
Tue Jul 16, 2019 5:38 pm
jamesh wrote:
Tue Jul 16, 2019 5:30 pm
Has this been reported to Freecad? They are probably best placed to figure out what the problem is.
https://forum.freecadweb.org/viewtopic.php?f=42&t=37458

https://forum.freecadweb.org/viewtopic.php?f=12&t=37314
Those threads are about as much use as chocolate teapot.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
jbeale
Posts: 3494
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jul 16, 2019 6:43 pm

Is this relevant to the issue?
FreeCAD crashes on creating a new document or opening a file
https://www.freecadweb.org/wiki/FAQ#Fre ... ing_a_file

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

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jul 16, 2019 7:01 pm

jbeale wrote:
Tue Jul 16, 2019 6:43 pm
Is this relevant to the issue?
FreeCAD crashes on creating a new document or opening a file
https://www.freecadweb.org/wiki/FAQ#Fre ... ing_a_file
Doesn't look like it, everything seems to be built against the same version of libCoin.

thrustpork
Posts: 20
Joined: Sat Jul 06, 2019 12:49 am

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Jul 16, 2019 7:04 pm

That looks promising

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

Re: FreeCAD on PI4 and Raspbian Buster.

Wed Jul 17, 2019 2:36 am

Anyone tried building from source?

I had to do a dist-upgrade to fix the Buster release/stable issue and just installed freecad again.
Same issue starts up and then disappears when "creating new"

Got this message, looks like a OpenGL error?

Code: Select all

freecad
FreeCAD 0.18, Libs: 0.18R
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

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) [0xb344d120]
That link had the freecad --write -log info and this is the end of the log file.

Code: Select all

Log: Init: Loading FreeCAD GUI
Log: D-Bus global menu: no
Log: Init: Running FreeCADGuiInit.py start script... done
Log: Init: Activating default workbench StartWorkbench
Log: Loading GUI of Web module... done
Log: Loading GUI of Start module... done
Log: Loading Start module... done
Log: D-Bus system tray: no
Log: Init: Showing main window
Log: Main window restored
Log: Show main window
Log: Toolbars restored
Log: Couldn't connect to spacenav daemon
Log: Init: Entering event loop
Log: Init: Processing command line files
Err: Program received signal SIGSEGV, Segmentation fault.
Err: #0  /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0xb344e120]
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

thrustpork
Posts: 20
Joined: Sat Jul 06, 2019 12:49 am

Re: FreeCAD on PI4 and Raspbian Buster.

Fri Jul 26, 2019 6:47 pm

This seems to still be an issue after the most recent update. Does anyone more technically inclined know who I could poke to get this headed towards a fix? I'm not sure if the problem is with the compile, rpi, opengl, etc.

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

Re: FreeCAD on PI4 and Raspbian Buster.

Sun Jul 28, 2019 8:05 am

Spent most of the day trying to compile the newer versions .18.3 and .19
Dependency hell.
Maybe one day we will get an appimages for arm/arm64.

No big deal yet as I will be moving to Gentoo64 on Pi4 as my development desktop and that could be a month or more away.
Plus I still need to wait for next batch of the 4B4's to make it down under.

There is an alternative 3D modeler.
These tuts I have done in Gentoo64 on a 3B+, they should be doable now on a Pi4 and Buster.
https://projects.raspberrypi.org/en/pro ... 5D=blender

These big 3D modelers have the bells and whistles.
Is there a nice small simple one?
An offline one?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: FreeCAD on PI4 and Raspbian Buster.

Sun Jul 28, 2019 8:23 am

Wings3D just installed and worked :D
Very basic, but probably enough to keep me busy.

It does obj and UV which is enough to make some simple 3D models for OpenGL games.
Not as intuitive as Blender for Artists. It is way smaller :D

Need more time to see if it can replace FreeCAD.
I use FreeCAD for STEP imports into Altium and cnc stuff for machining.
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.

Wed Aug 07, 2019 10:01 pm

Hi all, I'm the maintainer of FreeCAD on Debian. The issue in the first post was likely caused by having freecad-doc installed; the old version of freecad-doc is no longer co-installable with the new package, because it installs files on a path that is now a symlink managed by the alternatives system. (see update-alternatives manpage.) There is a way to prevent this bad apt behavior but I removed it too early (Breaks+Replaces for freecad-doc in the debian/control file.)

The problem with the UI crashing is coming from our dependency Coin3D, which is a scene graph library and baked in pretty deeply into FreeCAD. If, for example, you wanted to try to compile things natively to see if it's a packaging bug or a bug in either the FreeCAD or Coin3D, you'd have to build Coin3D, then SoQt, then Pivy, then FreeCAD.

The other problem is that the Debian 10 freeze and FreeCAD's 0.18 release didn't line up well (see my latest post at kwk.systems/blog) and so the version in Raspbian is a pre-release, while we're already on 0.18.3. Thus, for narrowing down this bug, it would be ideal for someone to test via a Debian Testing arm64 image which has this 0.18.3 package available. I don't have a RPi4 yet or I'd do it myself.

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

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Aug 08, 2019 1:18 am

I don't have a RPi4 yet or I'd do it myself.
Please get one, then we can ask really tricky questions ;)
But in a few months it will probably just work.

The Python3 and QT5 issues has caused me problems, now I know why.

I am waiting for some 4B4's to be available here.
My 4B1 is not the best compiler box.
When I get a 4B4 I will probably be running Gentoo64 on it.
Maybe I should get 2?

I have yet to try Sakaki's new Debian 64bit build, the previous one worked really well.

FreeCAD on Pi will be very interesting, since I have used it since version 12? on PC's.
No other CAD program was as easy to learn, I know I tried them ALL.

The new G-code stuff for CAM got my attention since I have used LinuxCNC and TurboCNC before.
Getting serious CAD tools onto Pi's enables the maker revolution quite a bit.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5969
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 08, 2019 12:58 pm

kkremitzki wrote:
Wed Aug 07, 2019 10:01 pm
Hi all, I'm the maintainer of FreeCAD on Debian. The issue in the first post was likely caused by having freecad-doc installed; the old version of freecad-doc is no longer co-installable with the new package, because it installs files on a path that is now a symlink managed by the alternatives system. (see update-alternatives manpage.) There is a way to prevent this bad apt behavior but I removed it too early (Breaks+Replaces for freecad-doc in the debian/control file.)

The problem with the UI crashing is coming from our dependency Coin3D, which is a scene graph library and baked in pretty deeply into FreeCAD. If, for example, you wanted to try to compile things natively to see if it's a packaging bug or a bug in either the FreeCAD or Coin3D, you'd have to build Coin3D, then SoQt, then Pivy, then FreeCAD.

The other problem is that the Debian 10 freeze and FreeCAD's 0.18 release didn't line up well (see my latest post at kwk.systems/blog) and so the version in Raspbian is a pre-release, while we're already on 0.18.3. Thus, for narrowing down this bug, it would be ideal for someone to test via a Debian Testing arm64 image which has this 0.18.3 package available. I don't have a RPi4 yet or I'd do it myself.
Thank you very much for joining and providing the insights.

Would backporting 0.18.3 to stretch without rebuilding the dependencies be a sensible thing to try or would you expect the issue to still be there? The archive.raspberrypi.org repo is fairly flexible, so if there's anything we can do to fix the issue, I'm happy to try it.

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

Re: FreeCAD on PI4 and Raspbian Buster.

Thu Aug 08, 2019 9:56 pm

ShiftPlusOne wrote:
Thu Aug 08, 2019 12:58 pm
Thank you very much for joining and providing the insights.

Would backporting 0.18.3 to stretch without rebuilding the dependencies be a sensible thing to try or would you expect the issue to still be there? The archive.raspberrypi.org repo is fairly flexible, so if there's anything we can do to fix the issue, I'm happy to try it.
Did you mean to buster? I suspect the Coin3D issue will still be there, but the issue in the first post should be fairly easily resolvable, though it would be nice to have confirmation that it was what I think it was and not something else. Backporting 0.18.3 in general should be pretty much trivial and unlikely to cause issues. The version currently in the repos had been under feature freeze for about 2 months and is missing about a month of bugfixes between it and 0.18 proper, plus the other bugfix releases leading up to 0.18.3.

Do you have any links handy about what the process for doing this backport & fix would be on my end?

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

Re: FreeCAD on PI4 and Raspbian Buster.

Sat Aug 10, 2019 10:34 am

I am compiling and get these message, tried 3 versions of FreeCAD even going back to 16.
QT is too new?

Code: Select all

-- Found unsuitable Qt version "5.11.3" from /usr/bin/qmake
Qt QTOPENGL library not found.
Qt QTSVG library not found.
Qt QTUITOOLS library not found.
Qt QTWEBKIT library not found.
Qt QTGUI library not found.
Qt QTXML library not found.
Qt QTNETWORK library not found.
Qt QTCORE library not found.
CMake Error at CMakeLists.txt:703 (MESSAGE):
  =======================

  Qt libraries not found.

  =======================



-- Configuring incomplete, errors occurred!
See also "/home/pi/FreeCAD-0.16/CMakeFiles/CMakeOutput.log".
See also "/home/pi/FreeCAD-0.16/CMakeFiles/CMakeError.log".
Just tried the staging version, same error except Qt4 not found

Code: Select all

CMake Error at CMakeLists.txt:888 (message):
  ========================

  Qt4 libraries not found.

  ========================
Need to revert QT?
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.

Mon Aug 12, 2019 4:06 pm

The default source build config is Qt 4 + Python 2, but the package is built with Qt 5 and Python 2 + 3, so if you did for example

Code: Select all

sudo apt build-dep freecad
you have the Qt 5 dependencies.

In order to build with Qt 5 you need to include

Code: Select all

-DBUILD_QT5=ON
when you call cmake. For Python 3, you need

Code: Select all

-DPYTHON_EXECUTABLE=/usr/bin/python3
. Currently there is no Qt 4 + Python 3 build support in terms of packages, but it has been requested so it's on my list.

For reference you can also take a look at the debian/rules file which specifies some of the build information about the package, including CMake flags.

https://salsa.debian.org/science-team/f ... bian/rules

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5969
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.

Mon Aug 12, 2019 4:07 pm

I had a build running for a while, but obviously it's a large package, so it won't be done any time soon. Will report back once I get a chance to test it tomorrow.

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

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Aug 13, 2019 12:43 am

Thanks Kurt,

Will try tonight, but I think you might have solved my OpenSCAD compile QT issue too.
QT5 and Python 3, is my preferred option, I have no need for legacy code ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

benbunk
Posts: 1
Joined: Tue Aug 13, 2019 4:56 am

Re: FreeCAD on PI4 and Raspbian Buster.

Tue Aug 13, 2019 5:00 am

I ran the build on my raspberry pi 4 based on the tag on github for 0.18.3 but I didn't have any luck. As soon as I selected an STL file to open it crashed.

Output:
pi@raspberrypi:~/freecad-source $ bin/FreeCAD
FreeCAD 0.18, Libs: 0.18R16093 +38 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##

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) [0xb21f0120]


Build Steps:
#1 Get the Repo
pi@raspberrypi:~/freecad-source $ git fetch --all --tags --prune
Fetching origin
pi@raspberrypi:~/freecad-source $ git checkout tags/0.18.3 -b 0.18.3
Checking out files: 100% (2633/2633), done.
Switched to a new branch '0.18.3'

#2 Compile
sudo apt install cmake cmake-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

mkdir freecad-build
cd freecad-build
cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 ../freecad-source
cd ../freecad-source
make -j4

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5969
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.

Tue Aug 13, 2019 9:35 am

No luck either. I tried a pivy example without using freecad directly and get a segfault as well.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5969
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.

Tue Aug 13, 2019 10:29 am

No luck with the latest version of coin3d and soqt using these instructions either - https://bitbucket.org/Coin3D/coin/wiki/BuildWithCMake

I've tried a few examples that try to use them, but I get the context setup error from cc_glglue_instance and then the segfault.

Edit: Just noticed somebody has already opened the appropriate issue - https://freecadweb.org/tracker/view.php?id=4083 .

Return to “Raspbian”