Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSCAD broken with AppImage #107

Open
FreeCAD-Bug-Importer opened this issue Feb 7, 2022 · 11 comments
Open

OpenSCAD broken with AppImage #107

FreeCAD-Bug-Importer opened this issue Feb 7, 2022 · 11 comments
Assignees

Comments

@FreeCAD-Bug-Importer
Copy link

Issue imported from https://tracker.freecad.org/view.php?id=4343

  • Reporter: denns
  • Date submitted: 5/14/2020
  • FreeCAD version: 0.18
  • Category: Bug
  • Status: assigned
  • Tags: #lowhangingfruit, appimage, OpenSCAD, packaging

Original report text

Attempting to use OpenSCAD features results in the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/denns/tmp/freecadapp/squashfs-root/usr/Mod/OpenSCAD/importCSG.py", line 105, in insert
    tmpfile=callopenscad(filename)
  File "/home/denns/tmp/freecadapp/squashfs-root/usr/Mod/OpenSCAD/OpenSCADUtils.py", line 179, in callopenscad
    check_output2([osfilename,'-o',outputfilename, inputfilename])
  File "/home/denns/tmp/freecadapp/squashfs-root/usr/Mod/OpenSCAD/OpenSCADUtils.py", line 158, in check_output2
    raise OpenSCADError('%s %s\n' % (stdoutd.strip(),stderrd.strip()))
<class 'OpenSCADUtils.OpenSCADError'>: " /usr/bin/openscad: /home/denns/tmp/freecadapp/squashfs-root/usr/lib/libQt5Core.so.5: version `Qt_5.14' not found (required by /usr/bin/openscad)\n/usr/bin/openscad: /home/denns/tmp/freecadapp/squashfs-root/usr/lib/libQt5Core.so.5: version `Qt_5.13' not found (required by /usr/lib/libqscintilla2_qt5.so.15)\n"

This is caused by a mismatch between the version of QT in the AppImage and the version used by OpenSCAD (outside of the AppImage). It can be fixed by unsetting LD_LIBRARY_PATH in prior to calling OpenSCAD.

Additional information

Forum discussion: https://forum.freecadweb.org/viewtopic.php?t=40848

Patch for 0.18 (tested working for me):

148c148,153
<         kwargs.update({'stdout':subprocess.PIPE,'stderr':subprocess.PIPE})
---
>         env = os.environ.copy()
>         try:
>             env.pop('LD_LIBRARY_PATH')
>         except KeyError:
>             None
>         kwargs.update({'stdout':subprocess.PIPE,'stderr':subprocess.PIPE,'env':env})

Patch for git master:

157c157,162
<         kwargs.update({'stdout':subprocess.PIPE,'stderr':subprocess.PIPE})
---
>         env = os.environ.copy()
>         try:
>             env.pop('LD_LIBRARY_PATH')
>         except KeyError:
>             None
>         kwargs.update({'stdout':subprocess.PIPE,'stderr':subprocess.PIPE,'env':env})

Steps to reproduce

Import an OpenSCAD file with the AppImage release of OpenSCAD. Tested on Arch linux with 0.18.

Other bug information

  • Priority: normal
  • Severity: minor
  • Category: Bug
  • Updated: 12/16/2021

Discussion from Mantis ticket

Comment by Kunda1 2021-02-25 19:40

denns sorry about neglecting this. Not sure what happened is this still an issue that requires this patch?


Comment by Kunda1 2021-02-25 19:51

opened ticket on #56


Comment by Kunda1 2021-03-13 17:55

What's blocking is a missing openscad package on conda. Anyone willing to create one?

@luzpaz luzpaz transferred this issue from FreeCAD/FreeCAD Apr 12, 2022
@luzpaz
Copy link
Collaborator

luzpaz commented Apr 13, 2022

is there an openscad conda feedstock?

@looooo
Copy link
Contributor

looooo commented Apr 14, 2022

@luzpaz no I don't think so.

@luzpaz
Copy link
Collaborator

luzpaz commented Apr 16, 2022

@looooo If there was an OpenSCAD feedstock...would we be able to use it from a License point of view? (SInce AFAIU OpenSCAD is GPLv3)

Edit: https://github.com/openscad/openscad/blob/master/COPYING

@looooo
Copy link
Contributor

looooo commented Apr 16, 2022

We already have gpl3 packages bundled. So why not.

@chennes chennes self-assigned this Jul 11, 2022
@chennes
Copy link
Member

chennes commented Jul 11, 2022

Forums user "lamikr" has submitted a patch to address this: https://forum.freecadweb.org/viewtopic.php?p=609157#p609157

I'm attaching the patch here: I'll turn it into a PR shortly.
freecad_appimage_020_openscad_qt5_15_launch_fix.txt

@luzpaz
Copy link
Collaborator

luzpaz commented Jul 11, 2022

Thanks chennes! JFYI, can you keep an eye open for Snap package users who are having issues with OpenSCAD too? Thanks!

@46cv8
Copy link

46cv8 commented Aug 6, 2022

Hey Guys,

SOLVED: The fix suggested by lamkr at https://forum.freecadweb.org/viewtopic.php?p=609157 worked for my issue too.

I appologize if this is the wrong place to be posting this. But I'm trying to use the FreeCAD AppImage (FreeCAD-0.20.0-Linux-x86_64.AppImage Revision 29177 (GIT)) in conjunction with the OpenSCAD AppImage (OpenSCAD-2022.05.15.ai11886-x86_64.AppImage) on an Ubuntu 20.04 system with neither app install natively.
The dependency error I am getting is.

<class 'OpenSCADUtils.OpenSCADError'>: ' /usr/bin/AppImageLauncher: /tmp/.mount_FreeCAAP5tZQ/usr/lib/libcurl.so.4: no version information available (required by /usr/bin/../lib/x86_64-linux-gnu/appimagelauncher/libappimageupdate.so)\nqt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""\nThis application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.\n'

I think I have all the related xcb packages installed on my base system, and the OpenSCAD AppImage executes fine by itself.

ii  libxcb-dri2-0:amd64                        1.14-2                                            amd64        X C Binding, dri2 extension
ii  libxcb-dri3-0:amd64                        1.14-2                                            amd64        X C Binding, dri3 extension
ii  libxcb-glx0:amd64                          1.14-2                                            amd64        X C Binding, glx extension
ii  libxcb-icccm4:amd64                        0.4.1-1.1                                         amd64        utility libraries for X C Binding -- icccm
ii  libxcb-image0:amd64                        0.4.0-1build1                                     amd64        utility libraries for X C Binding -- image
ii  libxcb-keysyms1:amd64                      0.4.0-1build1                                     amd64        utility libraries for X C Binding -- keysyms
ii  libxcb-present0:amd64                      1.14-2                                            amd64        X C Binding, present extension
ii  libxcb-randr0:amd64                        1.14-2                                            amd64        X C Binding, randr extension
ii  libxcb-render-util0:amd64                  0.3.9-1build1                                     amd64        utility libraries for X C Binding -- render-util
ii  libxcb-render0:amd64                       1.14-2                                            amd64        X C Binding, render extension
ii  libxcb-render0-dev:amd64                   1.14-2                                            amd64        X C Binding, render extension, development files
ii  libxcb-res0:amd64                          1.14-2                                            amd64        X C Binding, res extension
ii  libxcb-shape0:amd64                        1.14-2                                            amd64        X C Binding, shape extension
ii  libxcb-shm0:amd64                          1.14-2                                            amd64        X C Binding, shm extension
ii  libxcb-shm0-dev:amd64                      1.14-2                                            amd64        X C Binding, shm extension, development files
ii  libxcb-sync1:amd64                         1.14-2                                            amd64        X C Binding, sync extension
ii  libxcb-util1:amd64                         0.4.0-0ubuntu3                                    amd64        utility libraries for X C Binding -- atom, aux and event
ii  libxcb-xfixes0:amd64                       1.14-2                                            amd64        X C Binding, xfixes extension
ii  libxcb-xinerama0:amd64                     1.14-2                                            amd64        X C Binding, xinerama extension
ii  libxcb-xinput0:amd64                       1.14-2                                            amd64        X C Binding, xinput extension
ii  libxcb-xkb1:amd64                          1.14-2                                            amd64        X C Binding, XKEYBOARD extension
ii  libxcb-xv0:amd64                           1.14-2                                            amd64        X C Binding, xv extension
ii  libxcb1:amd64                              1.14-2                                            amd64        X C Binding
ii  libxcb1-dev:amd64                          1.14-2                                            amd64        X C Binding, development files

I'm not sure if this is related to the fix you discuss here or not. Any suggestions would be appreciated, also it's unclear to me if the patch you mention above is available in some kind of nightly build of the FreeCAD AppImage or not. I will try to test some more things and report back here if I find any workaround.

For the record I tried the snap packages too and got a different error about "libQt5Gamepad.so.5" missing and installing the dependency to my root install didn't help.

UPDATE:
Looking at the error above more closely it seems to be saying libcurl.so.4 is missing.
But confirmed I have that installed on my base install too (perhaps it needs to be in the FreeCAD AppImage? or maybe its the LD_LIBRARY_PATH thing mentioned above.)

ii  libcurl3-gnutls:amd64                      7.68.0-1ubuntu2.12                                amd64        easy-to-use client-side URL transfer library (GnuTLS flavour)

@luzpaz
Copy link
Collaborator

luzpaz commented Aug 7, 2022

For the record I tried the snap packages too and got a different error about "libQt5Gamepad.so.5" missing and installing the dependency to my root install didn't help.

Do you mind opening a ticket on https://github.com/FreeCAD/FreeCAD-snap/ to report this? TIA!

@46cv8
Copy link

46cv8 commented Aug 7, 2022

For the record I tried the snap packages too and got a different error about "libQt5Gamepad.so.5" missing and installing the dependency to my root install didn't help.

Do you mind opening a ticket on https://github.com/FreeCAD/FreeCAD-snap/ to report this? TIA!

Yup I can do, I'll try to get to add it in the next week or so.

@maxwxyz
Copy link
Collaborator

maxwxyz commented Mar 19, 2024

Can I close this in favor of FreeCAD/FreeCAD#8239 / FreeCAD/FreeCAD#7182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants