FreeCAD / FreeCAD-Bundle

Stand-alone repo to Build and Deploy installable FreeCAD images. Do not open general FreeCAD issues here.
https://freecad.org
GNU Lesser General Public License v2.1
291 stars 63 forks source link

FreeCAD_weekly-builds-29485-2022-07-24-conda-Linux-x86_64-py310: libQt5Core.so.5: version `Qt_5.15' not found #127

Open gneiss15 opened 2 years ago

gneiss15 commented 2 years ago

As indicated by the Title, the lib is missing inside the appimage. The version of libQt5Core that is includes is 5.12.

Steps to reproduce:

adrianinsaval commented 2 years ago

the library is most likely not missing but it is not the one openscad was compiled against, openscad needs your system libraries but it can't find when launched from the appimage, have you looked at the preference page suggested in the report view?

gneiss15 commented 2 years ago

It's missing, because it is not in the path of the AppImage. Inside my system (Ubuntu 18.04) there is although only the Version 5.12 and I am able to launch and work with OpenScad (direct not from FreeCad). So my installed version of OpenScad didn't need version Qt_5.15, it must be one of the python scripts that request this special version.

gneiss15 commented 2 years ago

After some more investigations I found: I tried using the portable version of OpenScad, that produce the shown error. If I use the local installed one it works (even that the solid imported is not exactly the same as the one generated by the standalone version). So the problem seams to be, that when OpenScad (the AppImage version) was called via OpenSCADUtils.py the lib-path wasn't set to the one of the AppImage! Currently I have no idea how to do this.

adrianinsaval commented 2 years ago

It's missing, because it is not in the path of the AppImage

yes but it has no reason to be there, it most definitively has some version of qtcore or FreeCAD wouldn't work

So the problem seams to be, that when OpenScad (the AppImage version) was called via OpenSCADUtils.py the lib-path wasn't set to the one of the AppImage! Currently I have no idea how to do this.

me neither, what is your setup to launch the appimage version of openscad? Does it work if you use FreeCAD from a regular package or flatpak/snap? If not then this is probably something that can't be fixed in the appimage but needs special code to handle this case in the openscad workbench itself.

gneiss15 commented 2 years ago

I (currently) don't have a regular package or flatpak/snap version of Freecad. The OpenScad Appimage is working if used from outside of FreeCad. I believe the problem is similar to the one described in Issue 107 https://github.com/FreeCAD/FreeCAD-Bundle/issues/107.

May the AppImage of OpenScad didn't set the LD_LIBRARY_PATH if it was already set. So maybe the patch provided there will fix this issue too.

Sorry, missed to answer:

what is your setup to launch the appimage version of openscad? I simply set the path to the Appimage inside Preferences of OpenScad

adrianinsaval commented 2 years ago

I (currently) don't have a regular package or flatpak/snap version of Freecad.

Could you install one and test? I'm trying to understand if this needs fixing here in the bundle or in FreeCAD itself

gneiss15 commented 2 years ago

OK, I have installed the "normal" version, which is (due to Ubuntu 18.04) Version 0.16. In this version there is no problem using either version of OpenScad. So the problem seams to be the AppImage version of FreeCad. It may be although a problem of the different FreeCad-versions, but I don't know how to install a newer version.

I don't use flatpak and/or snap (I even don't have the necessary basses installed), so that's no option for me.

Just to clarify my findings:

FreeCad 0.16 locally installed will work with both versions of OpenScad. FreeCad 0.21 AppImage will only work with a locally installed OpenScad.

Both versions of FreeCad didn't import one of my test-scad file correctly, but FreeCad 0.21 does a nearly perfect job. There are two problems with the attached scad-file:

CR2032.zip

gneiss15 commented 2 years ago

More findings: I wrote a small (.sh-)wrapper for the OpenScad-AppImage (see atached file FreeCadOpenSCAD.zip). When using this wrapper there is no more error when opening a scad file in FreeCad!

In principal the wrapper simply does a "unset LD_LIBRARY_PATH" before exec'ing the AppImage. So my above believe (same problem as issue 107) seams to be thru.

On the other hand the imported geometry (of the file CR2032.scad) produces some errors, the importer of FreeCad can handle the output of this version of OpenScad not correct.

The AppImage of OpenScad I use is: version 2022.02.25.ai11146 (git fb10c5dbf).

gneiss15 commented 2 years ago

Because this seams to be a more general problem I had opened a discussion here: https://forum.freecadweb.org/viewtopic.php?f=10&t=70790

adrianinsaval commented 1 day ago

could someone please test if this issue still exist with the latest weekly? I mean the one that just got uploaded, if you have downloaded earlier today or yesterday I expect those to fail, even if they have the same revision number as the one today.

Appimages now shouldn't have LD_LIBRARY_PATH set anymore which is likely what was causing these problems with external applications