Freecad not starting on Ubuntu 22.04

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
UbunTux
Posts: 60
Joined: Fri Jan 25, 2019 12:11 pm

Freecad not starting on Ubuntu 22.04

Post by UbunTux »

None of the latest AppImage from the Freecadweb.org site does not start. Neither the stable version 0.19.3 nor the development version (0.20)
"New" installation (by overwriting 20.04).
Portable Pack Bell EasyNote TS13-HR-215FR.

I regularly use these builds on my Latitude 15-5500 with no issues.

These versions worked perfectly on an HP Notebook 15-ay067 nf with Xubuntu 20.04.
But the same blockage appeared when I removed Xubuntu 20.04 by installing Xubuntu 22.04 on this HP.

On Xubuntu 22.04, when requested to run, the two apps seem to launch (display of the welcome screen) then nothing...
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Freecad not starting on Ubuntu 22.04

Post by openBrain »

Problems with MESA ? What tells the log when run from console ?
Haavard
Posts: 217
Joined: Wed Feb 17, 2021 10:48 pm

Re: Freecad not starting on Ubuntu 22.04

Post by Haavard »

I tested the newest appimage in a VM, Ubuntu 22.04.

First, i had to install fuse:

Code: Select all

sudo apt install fuse
Then i made the appimage executable and tried to run from terminal, with the following (expected) error:

Code: Select all

libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so
To fix that, follow this advice:
https://forum.freecadweb.org/viewtopic.php?f=3&t=30573

Open the terminal in your appimage-folder and run FreeCAD like this:

Code: Select all

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./FreeCAD_weekly-builds*
UbunTux
Posts: 60
Joined: Fri Jan 25, 2019 12:11 pm

Re: Freecad not starting on Ubuntu 22.04

Post by UbunTux »

Thanks, @openBrain that was the problem with MESA.
@Haavard, I followed the procedure, installed Fuse and applied the line of code: Freecad 0.19 launched fine.

Once closed, I wanted to restart it with the AppImage: again, refusal to launch. Ditto, if launch ./Freecad-xxx in the terminal.
Haavard
Posts: 217
Joined: Wed Feb 17, 2021 10:48 pm

Re: Freecad not starting on Ubuntu 22.04

Post by Haavard »

UbunTux wrote: Tue Apr 26, 2022 3:54 pm Once closed, I wanted to restart it with the AppImage: again, refusal to launch. Ditto, if launch ./Freecad-xxx in the terminal.
Yep, you have to launch it with LD_PRELOAD..... every time until a new appimage with the newest stdlibc comes out.

I prefer to make a .desktop file, that creates a start menu icon, and launch it from there. In the desktop file you can append LD_PRELOAD... to the appimage path.
UbunTux
Posts: 60
Joined: Fri Jan 25, 2019 12:11 pm

Re: Freecad not starting on Ubuntu 22.04

Post by UbunTux »

I tried it also on Xubuntu 22.04 and it works. I will see how to create a desktop file
Haavard
Posts: 217
Joined: Wed Feb 17, 2021 10:48 pm

Re: Freecad not starting on Ubuntu 22.04

Post by Haavard »

UbunTux wrote: Tue Apr 26, 2022 4:39 pm I tried it also on Xubuntu 22.04 and it works. I will see how to create a desktop file
Here is an example.

- Extract the attached zip
- Replace "USERNAME" with your username in "freecad.desktop" and "freecad.sh"
- Correct the path to, and name of your Appimage, in "freecad.sh"
- Right click "freecad.sh" and make sure it is executable
- Place "freecad.desktop" and "freecad.sh" in .local/share/applications
- Place the icon folder in .local/share

Voila :)
Attachments
Freecad desktop file.zip
(4.11 KiB) Downloaded 183 times
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Freecad not starting on Ubuntu 22.04

Post by adrianinsaval »

alternatively you can extract the appimage, delete the libstc++ library and generate a new appimage with appimagetool, of course using the desktop file or a script is much easier.
UbunTux
Posts: 60
Joined: Fri Jan 25, 2019 12:11 pm

Re: Freecad not starting on Ubuntu 22.04

Post by UbunTux »

Here is the file I created. Unfortunately, it generates an error message on cd

[Desktop Entry]
Version=1.1
Type=Application
Name=Freecad
Comment=Une petite présentation de cette application.
Icon=applications-other
Exec=cd /home/jean/APPLIS/FREECAD\\nLD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./FreeCAD_0.19.3-Linux-Conda_glibc2.12-x86_64.AppImage
Path=/home/jean/APPLIS/FREECAD
Terminal=true
Actions=
Categories=X-XFCE;X-Xfce-Toplevel;
UbunTux
Posts: 60
Joined: Fri Jan 25, 2019 12:11 pm

Re: Freecad not starting on Ubuntu 22.04

Post by UbunTux »

Haavard wrote: Tue Apr 26, 2022 4:59 pm
Here is an example.

- Extract the attached zip
- Replace "USERNAME" with your username in "freecad.desktop" and "freecad.sh"
- Correct the path to, and name of your Appimage, in "freecad.sh"
- Right click "freecad.sh" and make sure it is executable
- Place "freecad.desktop" and "freecad.sh" in .local/share/applications
- Place the icon folder in .local/share

Voila :)
And it works !
I will have learned some things tonight.
Un grand merci ;-)
Post Reply