FreeCAD / FreeCAD-snap

The official Snap package of the FreeCAD project
https://snapcraft.io/freecad
9 stars 10 forks source link

Trying to use luxcoreui in the render workbench leads to an error #104

Open Willy2406 opened 1 year ago

Willy2406 commented 1 year ago

I'm using the beta branch

Trying to use luxcoreui, when using the "render" button :

04:09:59  Starting rendering...
/home/matt/3DPrinting/00_Softs/LuxCore/luxcoreui  -o "/home/matt/snap/freecad/common/temp/FreeCAD_Doc_2e5a33bc-019b-4730-ab36-592e9cbddc99_56189e_256387/Project001.cfg" -f "/home/matt/snap/freecad/common/temp/FreeCAD_Doc_2e5a33bc-019b-4730-ab36-592e9cbddc99_56189e_256387/Project001.scn"
04:09:59  /home/matt/3DPrinting/00_Softs/LuxCore/luxcoreui: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory
04:09:59  Exiting rendering - Return code: 127

BTW, same type of error with povray : 04:17:32 Starting rendering... /usr/bin/povray +P +A +W800 +H600 +D +O"/home/matt/snap/freecad/common/temp/FreeCAD_Doc_2e5a33bc-019b-4730-ab36-592e9cbddc99_56189e_256387/Project002_output.png" "/home/matt/snap/freecad/common/temp/FreeCAD_Doc_2e5a33bc-019b-4730-ab36-592e9cbddc99_56189e_256387/Project002.pov" 04:17:32 FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/povray' 04:17:32 Aborting rendering...

Thank you for any help !

rostskadat commented 11 months ago

Hello,

Same problem here with FreeCAD v0.21.1 and LuxCoreRender SDK v2.4, v2.5 & v2.6.

Finding out the dependencies of luxcoreui, it seems that it is ultimately requiring the following additional libraries (that I tried to copy from the host system:

/lib/x86_64-linux-gnu/libXinerama.so.1
/lib/x86_64-linux-gnu/libgtk-3.so.0
/lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libgdk-3.so.0
/lib/x86_64-linux-gnu/libatk-1.0.so.0
/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0
/lib/x86_64-linux-gnu/libatspi.so.0

The version of libc.so.6 present in the snap is 2.31 (libc-2.31.so). However my host system (Ubuntu 22.04) is providing a more recent version:

./luxcoreui: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.33' not found (required by LuxCore-sdk-2.6/bin/libgtk-3.so.0)
./luxcoreui: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.34' not found (required by LuxCore-sdk-2.6/bin/libgdk-3.so.0)

I'll try to rebuild the snap, but I would welcome any input on how to solve the problem (i.e. maybe by using the gnome-extension )

rostskadat commented 10 months ago

I'm now trying to build a snap for LuxCore instead. There is a draft version available at rostskadat/LuxCore-snap. Once running, I wonder whether it would be as simple as pointing to /snap/luxcore/current/bin/luxcoreui

rostskadat commented 10 months ago

I have a working LuxCore snap base on core22 (https://github.com/rostskadat/LuxCore-snap). However the problem I'm facing now is that when setting the path to /snap/bin/luxcore.luxcoreconsole and /snap/bin/luxcore.luxcoreui in the preferences for the Render workbench, it fails with a permission denied as the underlying executable is /usr/bin/snap which is outside of the package confinement.

I'll try to compile it within the freecad-deps-core22 snap

rostskadat commented 10 months ago

There is a simple workaround to get LuxCoreRender working in batch mode: https://github.com/FreeCAD/FreeCAD-snap/pull/108#issuecomment-1881727633

Willy2406 commented 8 months ago

Thanks a lot, i'm sorry i did not logged in earlier, i'll try that ASAP.

EDIT : it's working for me, thanks a lot !