FreeCAD / FreeCAD-snap

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

OpenSCAD snap version throws error "libQt5Gamepad.so.5: cannot open shared object file" on import, works with AppImage version #51

Open 46cv8 opened 1 year ago

46cv8 commented 1 year ago

I'm running Ubuntu 20.04 and I just installed the latest version of FreeCAD via snap. When I attempt to import a simple scad file containing only a cube I get the following error.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/snap/freecad/161/usr/Mod/OpenSCAD/importCSG.py", line 124, in open
    tmpfile = callopenscad(filename)
  File "/snap/freecad/161/usr/Mod/OpenSCAD/OpenSCADUtils.py", line 212, in callopenscad
    check_output2([osfilename, '-o', outputfilename, inputfilename])
  File "/snap/freecad/161/usr/Mod/OpenSCAD/OpenSCADUtils.py", line 182, in check_output2
    raise OpenSCADError('%s %s\n' % (stdoutd.strip(),stderrd.strip()))
<class 'OpenSCADUtils.OpenSCADError'>: ' /snap/freecad/161/usr/bin/openscad: error while loading shared libraries: libQt5Gamepad.so.5: cannot open shared object file: No such file or directory\n'

This is working on the AppImage version (albeit it was getting a different error until I applied the patch mentioned in https://github.com/FreeCAD/FreeCAD-Bundle/issues/107) I mentioned the snap version seemed broken with a different error and they asked I open an issue here.

ppd commented 1 year ago

Thank you. I'll look into it.

ppd commented 1 year ago

libqt5gamepad5 is not available any more in the neon archives for 5.15.3. We'll have to wait for the extension to update to Qt 5.15.5.

46cv8 commented 1 year ago

@ppd thanks for looking into it, feel free to close the issue or do whatever you want with this, I am happily using the AppImage version for now.

sophana commented 1 year ago

Hi, I'm still seeing libQt5Gamepad.so.5 not found error when using openscad with snap from 2022-12-31

luzpaz commented 1 year ago

Full About info please

sophana commented 1 year ago
/snap/freecad/517/usr/bin/openscad: error while loading shared libraries: libQt5Gamepad.so.5: cannot open shared object file: No such file or directory
OS: Ubuntu Core 20 (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.2.29177 +426 (Git) Snap 517
Build type: Release
Branch: tag: 0.20.2
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.8.10, Qt 5.15.5, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)

I tried using appImage, it is not better. Where to report?

Traceback (most recent call last):
  File "/tmp/.mount_FreeCAfhL3In/usr/Mod/OpenSCAD/OpenSCADCommands.py", line 423, in loadelement
    filename, filter = QtGui.QFileDialog.getOpenFileName(parent=self.form, caption='Open file', dir='.', filter='OpenSCAD Files (*.scad)',selectedFilter='',option=0)
AttributeError: PySide2.QtWidgets.QFileDialog.getOpenFileName(): unsupported keyword 'option'
OS: Ubuntu 20.04.6 LTS (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.2.29603 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
luzpaz commented 1 year ago

@sophana AppImage reports go to https://github.com/FreeCAD/FreeCAD-Bundle/issues

luzpaz commented 11 months ago

@sophana can you check the latest v0.21 Snap ?

LinuxMaster393 commented 7 months ago

I just encountered this error myself when running v0.21.1 on Ubuntu 22.04 installed from Snap. However, OpenSCAD installed from either Snap or apt doesn't have this error.

lifeisafractal commented 5 months ago

I have this issue running v0.21.2 installed via snap on Ubuntu 23.10.

(edit) add version about info

OS: Ubuntu Core 20 (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.2.33771 (Git) Snap 908
Build type: Release
Branch: tag: 0.21.2
Hash: b9bfa5c5507506e4515816414cd27f4851d00489
Python 3.8.10, Qt 5.15.7, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)
dc740 commented 1 month ago

Ubuntu 22.04: Snap can't access openscad The included openscad throws the error from this report.

I tried to compile freecad from source, since most dependencies were available, but there is ONE exception, which is VTK. You need version 7. Version 9 is available but not installable (broken -dev dependencies) and finally, version 7 does not compile, even after installing all the dependencies: https://discourse.vtk.org/t/vtk-7-1-1-cant-build-from-ubuntu-22-04-1-lts-aarch64/10381/3

so... long story short: you can't do things that require openscad.

luzpaz commented 2 days ago

I tried to compile freecad from source, since most dependencies were available, but there is ONE exception, which is VTK. You need version 7. Version 9 is available but not installable (broken -dev dependencies) and finally, version 7 does not compile, even after installing all the dependencies: https://discourse.vtk.org/t/vtk-7-1-1-cant-build-from-ubuntu-22-04-1-lts-aarch64/10381/3

Re: VTK related ticket #26