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...)
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD and Raspberry Pi 4

Post by wmayer »

ToniGil wrote: Sat Dec 14, 2019 7:08 am Yes, it's "ON"

Feel free to ask whatever you need to know about this question. I attach CMakeOutput.log as it could help.

Thanks and regards,
Toni Gil.
The CMakeOutput.log file is not very helpful in this context because it only contains some self-tests to see what C++ features the compiler supports. Instead you should attach the file CMakeCache.txt
ToniGil
Posts: 11
Joined: Wed Dec 11, 2019 8:36 am

Re: FreeCAD and Raspberry Pi 4

Post by ToniGil »

-alex- wrote: Sat Dec 14, 2019 11:55 pm @ ToniGil, maybe it's not relevant, but....what about your RPI4 model? 1Gb? 2Gb? 4Gb?
The make -j4 command involves more than 2Gb of RAM consumption sometimes while compiling.
So, if you have a 1 or 2Gb model you maybe should compile with make -j2 or make -j3 to avoid potential compiling errors?...
Do you remember some warning messages during compiling ?
I used make -j4 in combination with raspberry pi 4 2Gb and it took more than two hours so I wasn't looking all the time and I couldn't see any warning message :(
ToniGil
Posts: 11
Joined: Wed Dec 11, 2019 8:36 am

Re: FreeCAD and Raspberry Pi 4

Post by ToniGil »

wmayer wrote: Sun Dec 15, 2019 10:31 am The CMakeOutput.log file is not very helpful in this context because it only contains some self-tests to see what C++ features the compiler supports. Instead you should attach the file CMakeCache.txt
Here we go.
Attachments
CMakeCache.txt
(118.33 KiB) Downloaded 69 times
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD and Raspberry Pi 4

Post by wmayer »

The important parts of the cache file:

Code: Select all

//Build FreeCAD Gui. Otherwise you have only the command line and
// the Python import module.
BUILD_GUI:BOOL=ON
and

Code: Select all

//Build the FreeCAD part design module
BUILD_PART_DESIGN:BOOL=ON
So, there is no reason why the file PartDesignGui.so shouldn't be built.

As suggested a few posts above open a terminal window and enter

Code: Select all

cd /home/pi/freecad-build
make PartDesignGui
Does it succeed to build the file or does it abort with an error message?
ToniGil
Posts: 11
Joined: Wed Dec 11, 2019 8:36 am

Re: FreeCAD and Raspberry Pi 4

Post by ToniGil »

wmayer wrote: Mon Dec 16, 2019 10:28 am The important parts of the cache file:

Code: Select all

//Build FreeCAD Gui. Otherwise you have only the command line and
// the Python import module.
BUILD_GUI:BOOL=ON
and

Code: Select all

//Build the FreeCAD part design module
BUILD_PART_DESIGN:BOOL=ON
So, there is no reason why the file PartDesignGui.so shouldn't be built.

As suggested a few posts above open a terminal window and enter

Code: Select all

cd /home/pi/freecad-build
make PartDesignGui
Does it succeed to build the file or does it abort with an error message?
I tell the complete history step by step:

1.- The first time I made all with "make -j4", it finished and Freecad worked well.
2.- Then i found Part Design didn't work and you asked if I could find "PartDesignGui.so" or "_PartDesign.so". "PartDesignGui.so" wasn't there but I found _PartDesign.so. I made PartDesignGui as your instructions.
3.- I had no error this time and I could import PartDesign into Python Console on FreeCAD. It works.
4.- BUILD_PART_DESIGN:BOOL=ON --> it's OK
5.- BUILD_GUI:BOOL=ON --> It's OK
6.- If I build it again, it works.
7.- All this on Raspberry pi4 2GB.

Thanks and regards,
Toni Gil.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD and Raspberry Pi 4

Post by wmayer »

ToniGil wrote: Tue Dec 17, 2019 6:30 am 1.- The first time I made all with "make -j4", it finished and Freecad worked well.
As mentioned above the problem could have been using the option "-j4" because the system then runs several compiler instances at the same time. But each of them may require a huge amount of memory and thus may exceed the available 2GB. The build may have been aborted, then.
User avatar
Muniac
Posts: 10
Joined: Thu Dec 26, 2019 5:05 pm
Location: SW Colorado
Contact:

Re: FreeCAD and Raspberry Pi 4

Post by Muniac »

Hi - Used asps946701's short install list successfully on my pi4 workstation to get FreeCAD running. My build ended up being 0.19 It seems to run well so far for my simple learning to model exercises. I need FreeCAD to model parts for a Prusa3D printer due in here in January. I've exported STL files to PrusaSlicer and that seems to work fine. I did need to fiddle around with the desktop icon to get that working. It works fine from the software menu. But using the Add to Desktop didn't yield a working icon.

I've got the 4Gb version of the pi4 running buster. Build time is in and around 4 hours.

A couple of observations perhaps relevant or not for this thread:

If I start FreeCAD from the command line I get what's below:

FreeCAD 0.19, Libs: 0.19RUnknown (comes out immediately after launch)

I gather the Unknown is something relating to not detecting the ARM7hf architecture properly?? Doesn't affect running the program.

connect failed: No such file or directory (after FreeCAD is ended)
This one I solved by installing spacenavd. Provides access to required daemon near as I can tell.

corrupted size vs. prev_size while consolidating
Aborted


I think the above deals with some sort of malloc situation in Python. If I let the program begin with the Start Page then end it, this message goes away. Again I don't think this affects operation. The pi4 build instructions were much appreciated. So here's another user able to run FreeCAD on the pi4. It makes a reasonably nice work station. As for HP, I'm not working with complex models, recalc times are fine so far. Many thanks again.
Best - Scott :D
An analog man in a digital world.
mun2
Posts: 2
Joined: Thu Sep 05, 2019 7:41 pm

Re: FreeCAD and Raspberry Pi 4

Post by mun2 »

When I compiled FreeCAD an a Raspberry Pi 4 (4gb ram) the part design workbench also failed, however for a different reason. It seems that the non ascii character ä in Jan Rheinländer's name is the source for this problem. I know the problem can be solved by adding

Code: Select all

# coding=utf-8
to the top of all the python files in freecad-build/Mod/PartDesign/WizardShaft, but instead of that is there some sort of code I can ask freecad to run when it starts so that I do not have to change all these files.
thanks
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD and Raspberry Pi 4

Post by wmayer »

but instead of that is there some sort of code I can ask freecad to run when it starts so that I do not have to change all these files.
I don't think so. But I guess there aren't that many files you need to change.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: FreeCAD and Raspberry Pi 4

Post by vocx »

mun2 wrote: Wed Jan 01, 2020 10:56 am ... but instead of that is there some sort of code I can ask freecad to run when it starts so that I do not have to change all these files.
If I'm not mistaken the issue manifests itself because you are compiling with Python 2 and Qt4. The solution would be to compile with Python 3 and Qt5, but this is currently not working for unknown reasons.

See the pull request 2848 for more details of the recent change in the source code.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Post Reply