ivan-hc / Bottles-appimage

Unofficial AppImage of "Bottles", an app to run Windows software and games on Linux.
20 stars 1 forks source link

Crash on Debian bookworm #3

Closed Palace4Software closed 6 months ago

Palace4Software commented 6 months ago
Traceback (most recent call last):
  File "/tmp/.mount_BottleMoZTI0/usr/bin//bottles", line 44, in <module>
    from bottles.frontend import main
  File "/usr/share/bottles/bottles/frontend/main.py", line 36, in <module>
    from bottles.frontend.windows.main_window import MainWindow
  File "/usr/share/bottles/bottles/frontend/windows/main_window.py", line 30, in <module>
    from bottles.backend.managers.manager import Manager
  File "/usr/share/bottles/bottles/backend/managers/manager.py", line 39, in <module>
    from bottles.backend.managers.component import ComponentManager
  File "/usr/share/bottles/bottles/backend/managers/component.py", line 25, in <module>
    import pycurl
ImportError: pycurl: libcurl link-time version (7.88.1) is older than compile-time version (8.0.1)

I use Debian bookworm (with GNOME Desktop) and I'm not able to start your AppImage. It would be great, if you use at least the bookworm versions of the dependencies (if possible).

On ArchLinux everything is working, but I don't want to use my VM for gaming, and I also think that that's not possible ;)

ivan-hc commented 6 months ago

I'd like to rebase everything on Buster (oldoldstable), all depends on how much its compatible a library compiled from AUR with a Debian system (I'm on Debian Testing).

At first impression, it seems that there is an issue with pycurl.

It would be useful if you too compile the Appimage on your system, all you have to do is to download the script and made it executable:

wget https://raw.githubusercontent.com/ivan-hc/Bottles-appimage/main/bottles.sh
chmoda a+x ./bottles.sh
./bottles.sh

I recommend to install imagemagick from your repository in order to made pkg2appimage work as it should.

The first step I can try is to comment the line 109 https://github.com/ivan-hc/Bottles-appimage/blob/e3654c3e5eaefbcbd18e9ada0c19061683ea1c70/bottles.sh#L109

and maybe also the line above (108), being them processes where the script get the packages from Pacman, not from YAY.

I'll perform a test for this in the meantime. Expect updates in "releases" in case it works for me.

ivan-hc commented 6 months ago

and maybe also the line above (108), being them processes where the script get the packages from Pacman, not from YAY.

EDIT: python-orjson is not in Debian, I think it should not conflict with Debian's libraries

ivan-hc commented 6 months ago

UPDATE: the isue here is

ImportError: pycurl: libcurl link-time version (7.88.1) is older than compile-time version (8.0.1)

but the python-pycurl package from Arch Linux is compatible with Debian Testing... maybe it is not compatible with the Debian Stable base.

ivan-hc commented 6 months ago

In this commit I've imported "libcurl" from the Arch Linux container https://github.com/ivan-hc/Bottles-appimage/commit/1585126a367a824781b0bc3eea9dd11e6549f3a0

when this workflow run is finished, go to the releases section and download the new AppImage.

@Palace4Software

Palace4Software commented 6 months ago
Traceback (most recent call last):
  File "/tmp/.mount_BottleGuuP45/usr/bin//bottles", line 44, in <module>
    from bottles.frontend import main
  File "/usr/share/bottles/bottles/frontend/main.py", line 36, in <module>
    from bottles.frontend.windows.main_window import MainWindow
  File "/usr/share/bottles/bottles/frontend/windows/main_window.py", line 30, in <module>
    from bottles.backend.managers.manager import Manager
  File "/usr/share/bottles/bottles/backend/managers/manager.py", line 39, in <module>
    from bottles.backend.managers.component import ComponentManager
  File "/usr/share/bottles/bottles/backend/managers/component.py", line 25, in <module>
    import pycurl
ImportError: pycurl: libcurl link-time version (7.88.1) is older than compile-time version (8.0.1)

I get following error, if I start via terminal. I think it's the same. I currently build the AppImage, like you said.

Palace4Software commented 6 months ago

Okay. I built. Same error like in my message above.

ivan-hc commented 6 months ago

OK, the Appimage is giving priority to libcurl on your host system, not the one into the package.

I go investigate.

ivan-hc commented 6 months ago

I'm going mad here, I don't know why pycurl from Arch and python3-pycurl from Debian have the same files and also if I keep them in dist-packages or use rsync to place them in site-packages I still get this error at the startup:

20:14:20 (WARNING) No managed runners found. 
20:14:21 (WARNING) Connection status: offline … 
20:14:21 (INFO) No dependencies found! 
20:14:21 (INFO) No installers found! 
20:14:21 (WARNING) Connection status: offline … 
20:14:21 (INFO) No components found. 

without an internet connection, Bottles can't inizialize the download of dependences.

On the web page of of python3-pycurl https://packages.debian.org/bullseye/python3-pycurl they say that SSL is provided by GnuTLS, without indications on how to configure it. I've also tried to bundle python3-openssl, gnutls-bin and libcurl4-gnutls-dev without success. "pycurl" works only if from Arch Linux.

ivan-hc commented 6 months ago

The responsible of such a malfunction is pycurl.cpython-311-x86_64-linux-gnu.so, the one from Debian seems to be broken

ivan-hc commented 6 months ago

Also, the two libraries have same sizes, but different priorities

ivan@debian:~$ patchelf --print-needed '/home/ivan/Scrivania/tmp/archlinux-junest/.junest/usr/lib/python3.11/site-packages/pycurl.cpython-311-x86_64-linux-gnu.so' 
libssl.so.3
libcrypto.so.3
libcurl.so.4
libc.so.6

ivan@debian:~$ patchelf --print-needed '/home/ivan/Scrivania/tmp/bottles/bottles.AppDir/usr/lib/python3/dist-packages/pycurl.cpython-311-x86_64-linux-gnu.so' 
libcurl-gnutls.so.4
libc.so.6
ivan-hc commented 6 months ago

Nothing to do, I'm working to made pycurl use the internet connection and I get always the same errors

(WARNING) Connection status: offline … 

this is also because the Debian packagers have patched this not to work as it is ment to be:

https://sources.debian.org/patches/pycurl/7.45.2-3/

On Arch Linux python-pycurl is the "stock" version, in Debian they have patched some parts for security reasons. In brief, "pycurl" is no more "pycurl", in Debian.

I'm lucky because I use Debian Testing, so libcurl is the same as Arch Linux... but soon this would change (i.e. in the Debian's hard-freeze period).

I need at least a Debian Stable environment to use patchelf trying to link pycurl.cpython-311-x86_64-linux-gnu.so against libcurl.so on the host (and in that case I don't know if it wil work with newer systems... pycurl seems to be a strange animal).

ivan-hc commented 6 months ago

I have downloaded a newer libcurl4 release from Debian Stable-backports https://github.com/ivan-hc/Bottles-appimage/commit/6775c40b76a382008581831e44c39b67364fc18f

I've also used LD_PRELOAD to preload the right libcurl version from the AppImage.

At the end of this workflow run you should be able to use Bottles from releases

https://github.com/ivan-hc/Bottles-appimage/actions/runs/8059474798

I hope that this finally solves the issue.

ivan-hc commented 6 months ago

In the meantime, I've tested this on a VM of Debian Stable "Bookworm" and works.

Also found that imagemagick is a core dependency of Bottles, so I've added it in the recipe.yml file at https://github.com/ivan-hc/Bottles-appimage/commit/6bee10dc1c6a33010261630d4fa370091445fb4d

in case of problems, don't esitate to reopen this or another issue.

Palace4Software commented 6 months ago

Thank you. I tried the most recent build and it worked. Thank you very much for your work :)

ivan-hc commented 6 months ago

Also found that imagemagick must be installed on the host, not in the package, so if you wait about 10 minutes, I'll reduce the size of 10 MB

Palace4Software commented 6 months ago

No problem :) Thanks