viperleed / viperleed

ViPErLEED is a package for quantitative low-energy electron diffraction (LEED-IV).
https://www.viperleed.org
Other
6 stars 1 forks source link

LEED Pattern Indexing Helper: Linux-Version: Fontconfig error: symbol lookup error at startup #217

Open Julian-Hochhaus opened 3 years ago

Julian-Hochhaus commented 3 years ago

Hi guys, its me again :)!

I am currently trying to start the LEED Pattern Indexing Helper, which I was not yet able to do. When executing ./viperleed_gui_linux_v0.2.0 The GUI could not be loaded due to a fontconfig error:

Matplotlib is building the font cache; this may take a moment.
Loading GUI...Fontconfig error: Cannot load default config file
No file found for "image/png.xml" , even though update-mime-info said it would exist.
Either it was just removed, or the directory doesn't have executable permission... ("/home/julian/.local/share/mime", "/tmp/_MEILoDTQC/share/mime")
No file found for "image/png.xml" , even though update-mime-info said it would exist.
Either it was just removed, or the directory doesn't have executable permission... ("/home/julian/.local/share/mime", "/tmp/_MEILoDTQC/share/mime")
No file found for "image/png.xml" , even though update-mime-info said it would exist.
Either it was just removed, or the directory doesn't have executable permission... ("/home/julian/.local/share/mime", "/tmp/_MEILoDTQC/share/mime")
No file found for "image/png.xml" , even though update-mime-info said it would exist.
Either it was just removed, or the directory doesn't have executable permission... ("/home/julian/.local/share/mime", "/tmp/_MEILoDTQC/share/mime")
./viperleed_gui_linux_v0.2.0: symbol lookup error: /tmp/_MEILoDTQC/libmkl_intel_thread.so: undefined symbol: omp_get_num_procs

We once had similar problems with PyQT-Applications not being able to load intended fonts, back then, we fixed it similar to the following description: gitmemory

michele-riva commented 3 years ago

Hey Julian, thanks for reporting this. I'll have a look into it. Sounds like some mess with the pyinstaller

michele-riva commented 3 years ago

Judging from the pyinstaller Issue #3438 it seems like this is an issue related to the PyQt5 build in Anaconda (which also has other unrelated issues). The new builds will be done from an original python version, and hopefully the problem should be gone.

michele-riva commented 3 years ago

Likely solved in v0.3.1. Cannot currently test on a Linux machine different from the one where the executables were build. Will close the Issue after I receive confirmation that it is.

Julian-Hochhaus commented 3 years ago

Hi Michele, I am now able to start the LEED Pattern Indexing Helper and I am able to save the Pattern and export beams, however, there still seems to be something a bit off, i. e. several buttons as for Save and Cancel have no outline and not clickable via mouse. However, jumping around via TAB and confirm with ENTER was possible.

During execution, the following error/warning are repeatedly thrown out:

are repeatedly thrown out:

(viperleed_gui_linux_v0.3.1:340328): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(viperleed_gui_linux_v0.3.1:340328): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(viperleed_gui_linux_v0.3.1:340328): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /tmp/_MEI801YE7/libz.so.1: version `ZLIB_1.2.9' not found (required by /lib/x86_64-linux-gnu/libpng16.so.16)

(viperleed_gui_linux_v0.3.1:340328): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /tmp/_MEI801YE7/libz.so.1: version `ZLIB_1.2.9' not found (required by /lib/x86_64-linux-gnu/libpng16.so.16)

I am not entirely sure, if this is somehow related to the original Issue, if not sorry for hijacking this thread! And please feel free to open a new issue thread!

Kind regards

Attached, you will find my full terminal output during execution, maybe that's somehow helpful! gui_terminal_output

michele-riva commented 3 years ago

Hi Julian,

Hmm that's odd. A quick test on the machine we built the executable on did show the icons and I don't think we had these errors showing up. I'll have to check that.

I'll hold off closing the Issue till I figure if the two are related.

michele-riva commented 3 years ago

Sorry, one more thing. Could you share two screenshots of the GUI window: one at startup, the other one after loading a file (with Crtl+O) or after making a random structure (with Ctrl+N -- just the default settings should do)?

Thanks!

Julian-Hochhaus commented 3 years ago

Sure, here you go: GUI at startup Pattern loaded Red boxes to protect personal data :) popup_save_pattern

michele-riva commented 3 years ago

Oh that's super funny. I did not get that the missing buttons were from the native Save/Export dialog.

A little reserach seems to indicate that this may be a problem with the OS-level libraries included by pyinstaller on build. Probably some of the libraries from our older Ubuntu version packed into the executable are incompatible with the ones on your newer version. Probably would be fixed by excluding the offending libraries in the .spec file. I'll have to check which ones need to be scrapped.

michele-riva commented 3 years ago

Thinking again about it, I now recall that perhaps we have already seen this mess of errors/warnings when trying to run the build from v0.3.0 in @fkraushofer's bash shell on Win10. Did not raise a big red flag then, as we considered it a flaw of the bash shell, but probably it is the same issue.

michele-riva commented 3 years ago

A likely related problem was also reported by @jbahlmann on 2021.04.30:

(5.) I am not able to run the viperleed gui (v0.3.1) in my Linux vm. Traceback (most recent call last): File "viperleed/gui.py", line 32, in ImportError: /lib/x86_64-linux-gnu/libGL.so.1: undefined symbol: g_PrlGBMApi [661063] Failed to execute script gui

It works fine on my Windows VM. I don't know if it is a problem of my ubuntu 20.04 or what is actually the problem. I just wanted to let you know.