CQ-editor icon indicating copy to clipboard operation
CQ-editor copied to clipboard

Fails with Ubuntu 22.04 LTS

Open gumyr opened this issue 3 years ago • 10 comments

After upgrading Ubuntu to 22.04 LTS, creating a new conda environment, and installing cadquery with conda install -c conda-forge -c cadquery cadquery=master and cq-editor with conda install -c cadquery -c conda-forge cq-editor=master (nothing else installed), cq-editor comes up with a black window and the following messages:

libGL error: MESA-LOADER: failed to open crocus: /usr/lib/dri/crocus_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: crocus
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
libGL error: MESA-LOADER: failed to open crocus: /usr/lib/dri/crocus_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: crocus
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

Investigating I found:

  • libgl1-mesa-dri is already the newest version (22.0.1-1ubuntu2)
  • libxrender1 is already the newest version (1:0.9.10-1build4)
  • sudo apt-get install freeglut3-dev didn't help
  • sudo apt-get install -y libxtst-dev didn't help
  • sudo apt-get install -y libxft-dev didn't help

Any assistance would be appreciated.

gumyr avatar May 02 '22 22:05 gumyr

It looks like an anaconda issue. It is similar to #298 which was an issue of the pyinstaller version of CQ-Editor with old libstdc++. Here it is anaconda with older libstdc++. image

After rm libstdc++ from conda env: image

lorenzncode avatar May 03 '22 04:05 lorenzncode

I can confirm that the fix by @lorenzncode does work. The PyInstaller builds run fine on 22.04 because libstdc++ is preemptively removed after the build process completes.

jmwright avatar May 03 '22 15:05 jmwright

I guess I should also note that there are two symlinks in the environment that should be removed. libstdc++.so.6 and libstdc++.so. Once those are removed, CQ-editor should start up fine.

jmwright avatar May 03 '22 15:05 jmwright

This affects the current release as well. Looks as in the first screenshot for me. How can I get started with CadQuery now?

hho avatar Jul 13 '22 00:07 hho

@hho If you are logged into GitHub, please click on one of the runs here and download the artifact for your OS. Then please let us know if that development version works for you.

jmwright avatar Jul 25 '22 14:07 jmwright

@jmwright Thank you! That works almost flawlessly – only on startup I get a bad color for the highlighting of the last line of the file, but after the first cursor movement everything is perfect.

hho avatar Jul 25 '22 19:07 hho

only on startup I get a bad color for the highlighting of the last line of the file

I've noticed the strange highlight as well with newer builds of CQ-editor. I'm not sure where it is coming from, but I think it started after the last UI update where some button icons seems to have changed.

jmwright avatar Jul 25 '22 20:07 jmwright

Ubuntu 22.04: to use it from zip file download, I had to sudo ln -s /usr/lib/x86_64-linux-gnu/dri/ /usr/lib/dri to avoid

libGL error: MESA-LOADER: failed to open vmwgfx: /usr/lib/dri/vmwgfx_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)

and then remove libstdc++.so.6 to avoid

libGL error: MESA-LOADER: failed to open vmwgfx: /home/hero/Downloads/CQ-editor-Linux-x86_64/CQ-editor/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/vmwgfx_dri.so) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: vmwgfx

now I can run the default example - so am I right that cq is already included in the cq-editor download? because that is not stated anywhere (or I have overseen it...)

revast avatar Oct 07 '22 10:10 revast

I tested my static build of my fork of CQ-editor and was able to run on Ubuntu 22.04 without having to remove libstdc++.so.6. I think this issue may be resolved because CQ master now depends on OCP 7.6.3, which depends on VTK 9.1.0 which requires GLIBCXX_3.4.30 which is the newest available as far as I can tell (and the same as Ubuntu 22.04).

https://github.com/jdegenstein/jmwright-CQ-Editor/actions

jdegenstein avatar Oct 15 '22 01:10 jdegenstein

Here is a new static build with libstdc++ still bundled if anyone wants to try it.

https://github.com/jmwright/CQ-editor/actions/runs/3259613214

I'll post this to the Arch Linux issue as well.

jmwright avatar Oct 17 '22 11:10 jmwright