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

[AppImage] Missing libgthread-2.0.so.0 #431

Closed
teohhanhui opened this issue Jun 19, 2021 · 0 comments · Fixed by #432
Closed

[AppImage] Missing libgthread-2.0.so.0 #431

teohhanhui opened this issue Jun 19, 2021 · 0 comments · Fixed by #432

Comments

@teohhanhui
Copy link
Contributor

teohhanhui commented Jun 19, 2021

Steps to reproduce

On openSUSE MicroOS, trying to run the AppImage fails:

teohhanhui@envy-x360:~/Downloads> ./Syncplay-1.6.8-x86_64.AppImage
Could not import GUI libraries. If you do not have PySide installed then you will need to install it for the GUI to work.
Hostname can't be empty!
Some necessary arguments are missing, refer to --help

Diagnosis

Unfortunately setting the QT_DEBUG_PLUGINS=1 environment variable doesn't produce any additional output. It seems like the failure happens too early in the process.

But QT_VERBOSE=1 does work (since it's used by the Python code and not Qt itself):

teohhanhui@envy-x360:~/Downloads> export QT_VERBOSE=1
teohhanhui@envy-x360:~/Downloads> ./Syncplay-1.6.8-x86_64.AppImage 
Order: 'PySide2', 'PySide', 'PyQt5', 'PyQt4'
Trying PySide2
Misplaced member has no source: QtGui.QStringListModel
Misplaced member has no source: QtCore.Property
Misplaced member has no source: QtCore.Signal
Misplaced member has no source: QtCore.Slot
Misplaced member has no source: QtCore.QAbstractProxyModel
Misplaced member has no source: QtCore.QSortFilterProxyModel
Misplaced member has no source: QtCore.QItemSelection
Misplaced member has no source: QtCore.QItemSelectionModel
Misplaced member has no source: QtCore.QItemSelectionRange
QtCompat: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute '_QtWidgets' (most likely due to a circular import)
QtCompat: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute '_QtWidgets' (most likely due to a circular import)
QtCompat: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute '_QtWidgets' (most likely due to a circular import)
QtCompat: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute '_QtWidgets' (most likely due to a circular import)
QtCompat: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute '_QtWidgets' (most likely due to a circular import)
QtCompat: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute '_QtWidgets' (most likely due to a circular import)
QtCompat: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute '_QtWidgets' (most likely due to a circular import)
QtCompat: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute '_QtWidgets' (most likely due to a circular import)
QtCompat: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute '_QtWidgets' (most likely due to a circular import)
Could not import GUI libraries. If you do not have PySide installed then you will need to install it for the GUI to work.
Hostname can't be empty!
Some necessary arguments are missing, refer to --help

We can see the actual error on import:

teohhanhui@envy-x360:~> python3
Python 3.8.10 (default, May 05 2021, 15:36:36) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySide2 import QtCore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

Workaround

Manually install libgthread-2_0-0 package.

Possible solution

I can see that copy_deps in pkg2appimage is supposed to find all the shared libraries to be copied. But if there are missing libraries (e.g. libgthread-2.0.so.0 => not found) that wouldn't work: https://github.com/AppImage/pkg2appimage/blob/23e510b394fc28d24386e2eba076132a646f456c/functions.sh#L95-L109

I think we can install the missing libglib2.0-0 package in the GitHub Actions build:

sudo apt-get install libxkbcommon-x11-0

This seems to be the same problem that made it necessary to hardcode libxkbcommon-x11.so.0 here:

--output appimage --custom-apprun AppRun.sh -l /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0

If my theory is correct then this hardcoding should not be necessary.

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

Successfully merging a pull request may close this issue.

1 participant