casualsnek / onthespot

qt based music downloader written in python
GNU General Public License v2.0
735 stars 53 forks source link

[BUG] build from source - qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found #108

Open peterpepo opened 6 months ago

peterpepo commented 6 months ago

Describe the bug Cannot launch after build according to instructions.

debusr@deb12vm:~/programs/onthespot/dist$ ./onthespot_linux 
OTS Version :  0.5
Config version:  0.5
Attempting to use system ffmpeg binary !
Using ffmpeg binary at:  ffmpeg
[2023-12-30 22:11:23,268 :: __init__ :: __init__.py -> 11:                main() :: INFO] -> Starting application in 
3
2
1
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted

To Reproduce Steps to reproduce the behavior:

  1. Fresh debian12 with xfce install
  2. apt install git python3-pip python3-venv
  3. Follow these steps: https://github.com/casualsnek/onthespot#211-on-linuxnix

Expected behaviour This comment recommends building from source: https://github.com/casualsnek/onthespot/issues/101#issuecomment-1783716548 The prebuilt binary works for me - in terms I can launch it and works 90% of time, but I experience various issues such as metadata error, therefore I wanted to build from source.

System Information (please complete the following information):



**Additional context**
Add any other context about the problem here.
ghost commented 4 months ago

There seems to be a missing dependency in the readme. I had your same issue and installing adwaita-qt pulled in a list of about 11 qt related packages (one of them is required), after rebuilding onthespot with them installed it, ran just fine.

peterpepo commented 4 months ago

Thank you @just37 , it started successfully after installing adwaita-qt :) Would you mind sharing details how you figured this out?

ghost commented 4 months ago

It was just by chance to be honest, I use onthespot whenever I launch spotify so that any songs I play are downloaded but was sick of the white ui. I had 2 hours free last night and coded in an option for a dark mode. The app would not compile and I knew that xcb is qt related so I installed qtcore and the app still would not compile. I installed adwaita-qt because I knew it would pull in all the required deps I was missing, after which the app compiled fine and I uninstalled adwaita-qt.

One of the following is required to build the app:

dev-libs/double-conversion-3.2.1 dev-qt/qtcore-5.15.12-r1
x11-libs/xcb-util-renderutil-0.3.10 x11-libs/xcb-util-wm-0.4.2 dev-qt/qtgui-5.15.12 dev-qt/qtdbus-5.15.12
dev-qt/qtwidgets-5.15.12
dev-qt/qtx11extras-5.15.12