FreeCAD flatpak

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FreeCAD flatpak

Post by PrzemoF »

Tests doesn't run well on flatpak build - some /tmp directory problem.

Code: Select all

$ flatpak-builder --run test-build org.freecadweb.FreeCAD.yaml FreeCAD --run-test 0
FreeCAD 0.18, Libs: 0.18R14555 (Git shallow)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
[..]
testSpace (TestArch.ArchTest) ... ok
testStairs (TestArch.ArchTest) ... ok
testStructure (TestArch.ArchTest) ... ok
testWall (TestArch.ArchTest) ... ok
testWindow (TestArch.ArchTest) ... ok

======================================================================
ERROR: test_solver_framework (femtest.testsolverframework.SolverFrameWorkTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/app/freecad/Mod/Fem/femtest/testsolverframework.py", line 164, in test_solver_framework
    ret = testtools.compare_files(test_file_dir_elmer + 'ELMERSOLVER_STARTINFO', solverframework_analysis_dir + 'ELMERSOLVER_STARTINFO')
  File "/app/freecad/Mod/Fem/femtest/testtools.py", line 103, in compare_files
    file2 = open(file_name2, 'r')
IOError: [Errno 2] No such file or directory: '/tmp/FEM_unittests/FEM_solverframework/ELMERSOLVER_STARTINFO'

----------------------------------------------------------------------
Ran 361 tests in 51.881s

FAILED (errors=1)
System exit
mdhill
Posts: 85
Joined: Mon Apr 24, 2017 7:37 pm

Re: FreeCAD flatpak

Post by mdhill »

Here's what I got:

Code: Select all

----------------------------------------------------------------------
Ran 361 tests in 74.840s

OK
System exit
Have you seen flatpak 1.0.5? Maybe it's fixed:
https://lists.freedesktop.org/archives/ ... 01362.html

Available here:
https://koji.fedoraproject.org/koji/bui ... ID=1163448
mdhill
Posts: 85
Joined: Mon Apr 24, 2017 7:37 pm

Re: FreeCAD flatpak

Post by mdhill »

So I took the build folder that I use to run FreeCAD, and per the docs page, ran:

Code: Select all

flatpak-builder --repo (etc)
flatpak build-bundle (etc)
It took some trial and error to supply the expected paths, and instead of generating a signature, I used the Stable signature. When it was finished I had a roughly 500M file that I installed on another machine where it works!
mdhill
Posts: 85
Joined: Mon Apr 24, 2017 7:37 pm

Re: FreeCAD flatpak

Post by mdhill »

mdhill
Posts: 85
Joined: Mon Apr 24, 2017 7:37 pm

Re: FreeCAD flatpak

Post by mdhill »

PrzemoF, would this work with one of your nightly RPMs?

https://blog.fishsoup.net/2018/12/04/fl ... -now-live/
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FreeCAD flatpak

Post by PrzemoF »

I don't know, but I'll try to find out - thanks for the info!

Edit: COPR doesn't seem to be an option according to IRC #fedora-devel, but converting rpm (produced by COPR) to flatpak seems to be possible. A quick test yielded plenty of "magic" errors :shock:
mdhill
Posts: 85
Joined: Mon Apr 24, 2017 7:37 pm

Re: FreeCAD flatpak

Post by mdhill »

Flathub is now accepting beta repos:

https://blogs.gnome.org/alexl/2019/02/1 ... thub-land/
eszlari
Posts: 6
Joined: Mon Mar 25, 2019 9:46 pm

Re: FreeCAD flatpak

Post by eszlari »

I updated the flatpak on Flathub to 0.18:

https://flathub.org/builds/#/builders/32/builds/1725
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FreeCAD flatpak

Post by NormandC »

Hi,

I just installed flatpak and FreeCAD and tested it quickly on Ubuntu 18.04. It does not comply to the desktop theme (which I suspect is a common issue with flatpak), but at least it's not as butt ugly as the snap package! This is a nice alternative to AppImage, and I think we should mention it on the Downloads page on the wiki and the website.

There is one tiny issue, the revision number is wrong:

OS: Linux 4.15.0-46-generic
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14555 (Git shallow)
Build type: Release
Branch: (HEAD detached at 8ece48c)
Hash: 8ece48c70bb7438112aa0cccb892c2109ae53082
Python version: 2.7.15
Qt version: 5.12.2
Coin version: 4.0.0a
OCC version: 7.3.0

The correct revision number is 16093, I don't know if it's possible to fix that.

I followed the Ubuntu instructions on flatpak.org, after a reboot I was able to install the FreeCAD flatpak package from the Ubuntu Software Centre. Can't be much simpler than that.

FYI, the flatpak build uses the ~/.FreeCAD/Mod folder for the addons, but it does not seem to use it for the config files system.cfg and user.cfg, not sure where they are saved and a search found nothing. Quite puzzling! I'm interested in this because we often have to tell users to delete them to fix some odd issues.

Thanks eszlari!
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FreeCAD flatpak

Post by PrzemoF »

I had the same problem (shallow git copy) when building on fedora COPR. My solution is here:
https://github.com/FreeCAD/FreeCAD/blob ... pkg.macros
Post Reply