UltraStar-Deluxe / UltraStar-Manager

UltraStar Manager
GNU General Public License v2.0
32 stars 18 forks source link

Errors compiling on Linux #21

Closed DerGitRob closed 6 months ago

DerGitRob commented 1 year ago

When compiling I get the following error on Debian unstable:

# cd src && qmake UltraStar-Manager.pro && make && cd ../
g++ -c -pipe -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DUNICODE -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -I. -Isong -Isongdetails -Isongtree -Ireport -Itasks -Itasks/taskDialog -Ipreview -Iplaylist -Iplaylistdetails -Ifilter -Imonty -Imediaplayer -Isupport -Ipreferences -Iui -Iplugins -Iribbon -Islideshow -Ilyricseditor -Iscore -Iremoteimages -Iwebinfo -I../include/mediainfo -I../include/cld2/public -I/usr/include/taglib -I/usr/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtMultimedia -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -Itmp/release -Iui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o tmp/release/QUMainWindow.o QUMainWindow.cpp
QUMainWindow.cpp:26:10: fatal error: QStringConverter: Datei oder Verzeichnis nicht gefunden
   26 | #include <QStringConverter>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:2071: tmp/release/QUMainWindow.o] Fehler 1
bohning commented 1 year ago

QStringConverter needs Qt >= 6.2, I believe (https://doc.qt.io/qt-6.2/qstringconverter.html).

DerGitRob commented 1 year ago

should be in libqt6widgets6 which is installed (libqt6widgets5 as well) Won't I get messed up installing QT5 and QT6 together...?!

DerGitRob commented 1 year ago

Additionally I installed the following packages, but unfortunately it still won't compile with the same error:

libqt6shadertools6 qml6-module-qt5compat-graphicaleffects qml6-module-qtquick-window
libqt6concurrent6 qmake6 qmake6-bin qt6-5compat-dev qt6-base-dev qt6-base-dev-tools
libqt6core5compat6
DerGitRob commented 1 year ago

Any suggestions which package I should install or how to tell qmake to use the right QT package?

DerGitRob commented 11 months ago

@bohning the issues initial terminal log points out that it refers to qt5 ("-I/usr/include/x86_64-linux-gnu/qt5/QtWidgets").

After I had installed the QT6 packages as mentioned above, I had to generate qt6.conf based on path to qmake6 qtchooser -install qt6 $(which qmake6)

And I had to install multimedia with apt-get install qt6-multimedia-dev

Unfortunately, I keep struggling with qmake:

ui/ui_QUReportDialog.h:762:25: error: invalid conversion from ‘int’ to ‘QFont::Weight’ [-fpermissive]
  762 |         font1.setWeight(75);
      |                         ^~
      |                         |
      |                         int
/usr/include/x86_64-linux-gnu/qt6/QtGui/qfont.h:162:27: note:   initializing argument 1 of ‘void QFont::setWeight(Weight)’
  162 |     void setWeight(Weight weight);
      |                    ~~~~~~~^~~~~~
QUMainWindow.cpp: In member function ‘void QUMainWindow::editSongSetDetail(QTableWidgetItem*)’:
QUMainWindow.cpp:774:56: warning: unused parameter ‘item’ [-Wunused-parameter]
  774 | void QUMainWindow::editSongSetDetail(QTableWidgetItem *item) {
      |                                      ~~~~~~~~~~~~~~~~~~^~~~
QUMainWindow.cpp: In member function ‘void QUMainWindow::toggleAlwaysOnTop(bool)’:
QUMainWindow.cpp:1297:70: warning: enum constant in boolean context [-Wint-in-bool-context]
 1297 |                 this->setWindowFlags(this->windowFlags() & uint(!Qt::WindowStaysOnTopHint));
      |                                                                  ~~~~^~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:2052: tmp/release/QUMainWindow.o] Fehler 1
JulioSDDR commented 10 months ago

I am running into the same problem building on linux (but it probably does not matter). It seems like changes introduced in [1] to the master branch are to blame.

Building from the release 1.8.3 source (both uman and experimental folders) also fails, as it tries to include QWidget. The problem seems to be unrelated to this issue.

I will just dust off the windows machine :/

[1] https://github.com/UltraStar-Deluxe/UltraStar-Manager/commit/22ccf475f825f592f05abd3c74460c10b6843d50

DerGitRob commented 9 months ago

@bohning Any idea to solve this? Would be great to be able to use UltraStar Manager again :)

bohning commented 9 months ago

I think I followed this guide when migrating from Qt5 to Qt6. Qt5 QTextCodec was replaced by Qt6 QStringConverter.

https://embeddeduse.com/2021/01/17/migrating-a-harvester-hmi-from-qt-5-12-to-qt-6-0/

DerGitRob commented 9 months ago

I retried compiling as mentioned in Readme, all qmake pointing to QT6 with "qmake -qt=qt6". Additionally I had to install libcld2-dev to finally make it. Unfortunately, the program doesn't load, @bohning. So I think, some of the qmake warnings are relevant.

To summarize the warnings:

I attached all warnings here. warnings.txt

bohning commented 9 months ago

I think none of the warnings are critical. So compilation is successful, but you just cannot start the app?

DerGitRob commented 9 months ago

Yes, compilation was done. When I start I see the splash screen, but nothing happens and after a few minutes, the splash screen just closes and the program is terminated. I get not messages in the shell.

DeinAlptraum commented 6 months ago

@DerGitRob could you try this again? We've changed some of the compilation instructions when we fixed the CI recently, including the upgrade to Qt6. Maybe this fixed your issue as well?

Steps to compile should be:

cd src/plugins/audiotag/ && qmake6 audiotag.pro && make
cd ../cleanup && qmake6 cleanup.pro && make
cd ../lyric/ && qmake6 lyric.pro && make
cd ../preparatory/ && qmake6 preparatory.pro && make
cd ../rename && qmake6 rename.pro && make
cd ../.. && qmake6 UltraStar-Manager.pro && make

This let me compile and run bin/release/UltraStar-Manager without any trouble.

If you don't care about the compilation itself but just want to run the software, there's an up-to-date linux appimage if you scroll down on the latest CI run here: https://github.com/UltraStar-Deluxe/UltraStar-Manager/actions/runs/8755276523

DerGitRob commented 6 months ago

@DeinAlptraum thanks for the AppImage, that works! :) If I should compile for testing purposes, just let me know.

DeinAlptraum commented 6 months ago

@DerGitRob since I can compile locally and the CI works as well, I'd assume it's fine, but it'd be nice if you could check as well :)