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

Cannot launch it on (pre-released) Ubuntu 22.04 #102

Open
leoheck opened this issue Apr 4, 2022 · 23 comments
Open

Cannot launch it on (pre-released) Ubuntu 22.04 #102

leoheck opened this issue Apr 4, 2022 · 23 comments

Comments

@leoheck
Copy link
Contributor

leoheck commented Apr 4, 2022

I am experiencing issues with the AppImage.

Some days ago it was working, not it cannot be launched anymore.
Not sure if this is a bug here or if it is something that has changed on Ubuntu in the last few days.

This is what happens when I launch it from the command line.

➜  Downloads chmod a+x FreeCAD_weekly-builds-28611-Linux-Conda_glibc2.12-x86_64.AppImage

➜  Downloads ./FreeCAD_weekly-builds-28611-Linux-Conda_glibc2.12-x86_64.AppImage    
Extracting usr/share/icons/default/freecad_weekly.png to "/home/lheck/.local/share/icons/default/appimagekit_545935d9f7331ab16d77afefe17637d5_freecad_weekly.png"
Extracting usr/share/mime/packages/org.freecadweb.FreeCAD.xml to "/home/lheck/.local/share/mime/packages/appimagekit_545935d9f7331ab16d77afefe17637d5_org.freecadweb.FreeCAD.xml"
WARNING: Unable to resize the application icon into a 128x128 image: "Unable to load image.". It will be written unchanged.
WARNING: Unable to resize the application icon into a 256x256 image: "Unable to load image.". It will be written unchanged.
FreeCAD 0.20, Libs: 0.20R28611 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2022
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Assembly4 workbench (v0.11.10) loaded
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
A3 available
/tmp/.mount_FreeCAyYbTbH/AppRun: line 42: 80416 Aborted                 (core dumped) ${MAIN} "$@"

Also, alternatively, the new icon was installed here
/home/lheck/.local/share/icons/default/appimagekit_545935d9f7331ab16d77afefe17637d5_freecad_weekly.png

However, I still cannot see this image in the launcher. I would like to know how is the process to generate the bubble, so I can do it here to test if the process works.

@luzpaz
Copy link
Collaborator

luzpaz commented Apr 5, 2022

Can you try invoking:
MESA_LOADER_DRIVER_OVERRIDE=i965 FreeCAD_weekly-builds-28611-Linux-Conda_glibc2.12-x86_64.AppImage

@leoheck
Copy link
Contributor Author

leoheck commented Apr 5, 2022

Still the same

➜  Applications MESA_LOADER_DRIVER_OVERRIDE=i965 ./FreeCAD_weekly-builds-28611-Linux-Conda_glibc2.12-x86_64_d6f4bdb223b526d4390282a40e90e65c.AppImage 
FreeCAD 0.20, Libs: 0.20R28611 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2022
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Assembly4 workbench (v0.11.10) loaded
gfx12 and newer are not supported on i965
libGL error: failed to create dri screen
libGL error: failed to load driver: i965
gfx12 and newer are not supported on i965
libGL error: failed to create dri screen
libGL error: failed to load driver: i965
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
A3 available
/tmp/.mount_FreeCALTY48v/AppRun: line 42: 182615 Aborted                 (core dumped) ${MAIN} "$@"

@leoheck
Copy link
Contributor Author

leoheck commented Apr 6, 2022

I found this swrast_dri.so in /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so in my system.
Then I made a symbolic link for it in the place where Freecad was looking for.
Later it gave me this issue with the missing iris_dri.so, then I did the same.

sudo mkdir -p /usr/lib/dri/
sudo ln -s /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so /usr/lib/dri/swrast_dri.so 
sudo ln -s /usr/lib/x86_64-linux-gnu/dri/iris_dri.so /usr/lib/dri/iris_dri.so

It looks like something is better now, but it is still giving me another issue that I could not workaround yet.

➜  Applications ./FreeCAD_weekly-builds-28611-Linux-Conda_glibc2.12-x86_64_d6f4bdb223b526d4390282a40e90e65c.AppImage
FreeCAD 0.20, Libs: 0.20R28611 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2022
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Assembly4 workbench (v0.11.10) loaded
libGL error: MESA-LOADER: failed to open iris: /tmp/.mount_FreeCAGzpMkZ/usr/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libLLVM-13.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /tmp/.mount_FreeCAGzpMkZ/usr/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libLLVM-13.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /tmp/.mount_FreeCAGzpMkZ/usr/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libLLVM-13.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
A3 available
/tmp/.mount_FreeCAGzpMkZ/AppRun: line 42: 78158 Aborted                 (core dumped) ${MAIN} "$@"
➜  Applications 

@leoheck
Copy link
Contributor Author

leoheck commented Apr 6, 2022

Maybe it is missing something during the build process. I am not sure how these AppImages have to be but I feel that it should be linking static libraries instead, isn't it? Maybe we have to use this flag to build it -static-libstdc++

@onekk
Copy link

onekk commented Apr 7, 2022

Using Artix Linux Linux everything is correct, see below the my version info.

Usually these errors are due to some settings, for Xorg, so probably something is broken somewhere.

It is not very clear if AppImage will use his own version of Xorg in this case probably some graphics driver is missing.

probably:

lspci -knn | grep -iA4 vga

and

glxinfo -B

Will make some light on drivers used and probably if something is missing.

OS: Artix Linux (openbox)
Word size of FreeCAD: 64-bit
Version: 0.20.28611 (Git)
Build type: Release
Branch: (HEAD detached at a3b804e)
Hash: a3b804e7806c2b3b5e1228c41bca4569a743b400
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Italian/Italy (it_IT)
Installed mods: 
  * fcgear 1.0.0
  * Curves 0.3.0

@leoheck
Copy link
Contributor Author

leoheck commented Apr 7, 2022

I don't know Artix, but it is messing missing its version. Could you add this too?

Edit: typo.

@onekk
Copy link

onekk commented Apr 8, 2022

Artix has no version, as as an Arch Linux derivative is a rolling release distribution.

If this is what you intend.

FC package versions, are related to the miniconda install (a sort of virtual environment inside the Linux distribution) that is almost similar in working with an AppImage "expanded on disk".

Commands I have posted are usually advised when there are problem with graphics chain as they show the "graphics card info" and the "OpenGL infrastructure".

I think they are "bare minimum" information to start, when troubleshooting a MESA problem.

glxinfo is usually in "mesa-utils". Sorry I don't know how it is called on Debian, but a package search with command name usually will be useful to find the containing package, if I remember well there are also some some apt... commands that will find the right package in a Debian distribution.

Regards

Carlo D.

@leoheck
Copy link
Contributor Author

leoheck commented Apr 8, 2022

Interesting, so if it is a rolling release, how do you compare or track issues related to the system? How do you know if an upgrade from today broke something that was working yesterday?

@onekk
Copy link

onekk commented Apr 8, 2022

Usually it is not too difficult, when you upgrade you see what is modified, and there the distribution forum, plus "Arch Linux" forum as a source of information.

Plus it is not difficult to downgrade packages, or even use an "package freeze archive" that "crystallize" package status on a precise date.

It is not as stable as Debian, but usually you could "pin" a problematic package, and live with it until problems are fixed, or even use an AUR package (unofficial "recipe" to builds packages in a different way that could solve problems).

Main advantage is that most of the time you use "last official" version of software and as Arch it is one of the most used distribution, you have usually a good chance to find information about problems and solutions.

see maybe:

https://wiki.archlinux.org/title/Intel_graphics

To have an idea of the level of details and completness the official Arch Linux wiki.

I'm using a SystemD free flavour of Arch so maybe something has to be adapted, but it is not so difficult as there is also a dedicated ArtixLinux forum too.

But this discussion is off-topic here, I apologize for the long answer.

Regards

Carlo D.

@yoshinari-nomura
Copy link

I encounterd the same coredump, even with FreeCAD_0.19.3-Linux-Conda_glibc2.12-x86_64.AppImage on Ubuntu 22.04.

@leoheck
Copy link
Contributor Author

leoheck commented Apr 29, 2022

For some reason, system's library is not being used. the one in use is the one inside the package. I saw this exactly same problem on Cura 5.0-beta too. I was able to use Cura by extracting the AppImage, and by removing/renaming the libstdc++.so.6 and then launching the tool from there. You can check this issue Ultimaker/Cura#11856 (comment). This may work with Freecad too.

I would like to know how to recreate the AppImage package from an extracted one. I was not able to do yet. With that, I can fix the AppImage for myself.

Alternatively, it would be helpful to know if there is an env variable that works to override the lib libstdc++.so.6.

@luzpaz
Copy link
Collaborator

luzpaz commented Apr 29, 2022

I would like to know how to recreate the AppImage package from an extracted one. I was not able to do yet. With that, I can fix the AppImage for myself.

https://wiki.freecad.org/AppImage#Repackaging_AppImages

@leoheck
Copy link
Contributor Author

leoheck commented Apr 29, 2022

I saw this and did not pass through because I thought it was a typo or wrong code...
But now you have shared it I am wondering if that it might be right...
Maybe AppImage has something inside to repack (itself) from an existing extracted folder...
image

@leoheck
Copy link
Contributor Author

leoheck commented Apr 29, 2022

No.. it does not work like that, it is the wrong code, unfortunately.

@luzpaz
Copy link
Collaborator

luzpaz commented Apr 29, 2022

Are you 100% certain? See https://github.com/AppImage/AppImageKit/#appimagetool-usage

@leoheck
Copy link
Contributor Author

leoheck commented Apr 29, 2022

No, I am just dumb. this is a tool ./appimagetool-x86_64.AppImage squashfs-root and not the AppImage I want to use. Sorry, @luzpaz, thanks for helping me on this.

@leoheck
Copy link
Contributor Author

leoheck commented Apr 29, 2022

It worked flawlessly. Damm! I found this some days ago trying desperately to find this thing. Now I have an Ultimate Cura that works. Let me test with Freecad too.

@leoheck
Copy link
Contributor Author

leoheck commented Apr 29, 2022

Nice, it is the cure for Freecad too.

# Extract the package
 ./FreeCAD_weekly-builds-28765-Linux-Conda_glibc2.12-x86_64.AppImage --appimage-extract 

# Move inside of the folder
cd squashfs-root 

# Remove (rename) libstdc out of the sight... 
mv ./usr/lib/libstdc++.so.6 ./usr/lib/libstdc++.so.6.removed

cd ..

# Recreate the AppImage file (thanks luzpaz)
./appimagetool-x86_64.AppImage squashfs-root 

# Rename keeping the original name.
mv FreeCAD_Weekly-x86_64.AppImage FreeCAD_weekly-builds-28765-Linux-Conda_glibc2.12-x86_64.AppImage

@yoshinari-nomura
Copy link

Thanks, it worked for me with both weekly-build and stable one!

As a side note, Ubuntu 22.04 also needs libfuse2.

sudo apt-get install libfuse2

@universam1
Copy link

Thanks @leoheck for the workaround, want to confirm this solves my issue on Ubuntu 22.04.

Is there a permanent solution in view?

@adrianinsaval
Copy link
Member

ultimately this is a duplicate of #67 so it should be closed IMO

@leoheck
Copy link
Contributor Author

leoheck commented May 17, 2022

Preloading was not working. And here I put a valid workaround.

@adrianinsaval
Copy link
Member

It appears you were given the wrong command here, did you try using the LD_PRELOAD command from the other issues and the known os specific issues post in the forum? The workaround you posted here was also posted before on the forum and one of the duplicates. Either way, workaround or not, this is a duplicate issue of #67 and #73

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

No branches or pull requests

6 participants