UltraStar-Creator icon indicating copy to clipboard operation
UltraStar-Creator copied to clipboard

Can't build on ubuntu 20.04: Project ERROR: cld2 development package not found

Open Rom888 opened this issue 3 years ago • 16 comments

Ubuntu 20.04, try to build: ''' cd src && qmake UltraStar-Creator.pro && make Info: creating stash file /home/rom/Downloads/UltraStar-Creator/src/.qmake.stash Project ERROR: cld2 development package not found '''

Rom888 avatar Jan 14 '21 08:01 Rom888

Any help to fix this is appreciated =)

bohning avatar Jan 14 '21 09:01 bohning

Try installing libcld2-dev?

I had the same issue a couple of weeks ago on arch but I forgot how I fixed it there

Tobiaqs avatar Jan 14 '21 10:01 Tobiaqs

Try installing libcld2-dev?

I had the same issue a couple of weeks ago on arch but I forgot how I fixed it there

image

It’s not enough, unfortunately. The AppImage build on AppVeyor fails for the same reason, although libcld2-dev is installed. I assume it is not found correctly (by pkgconfig).

bohning avatar Jan 14 '21 10:01 bohning

This works for taglib, but not for cld2:

image

bohning avatar Jan 14 '21 11:01 bohning

@Tobiaqs

Try installing libcld2-dev?

Thanks for reply. Tried it now, but unfortunately with no success.

sudo apt install libcld2-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libcld2-0
The following NEW packages will be installed:
  libcld2-0 libcld2-dev
0 upgraded, 2 newly installed, 0 to remove and 14 not upgraded.
Need to get 5,298 kB of archives.
After this operation, 8,745 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 libcld2-0 amd64 0.0.0-git20150806-7build1 [5,202 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 libcld2-dev amd64 0.0.0-git20150806-7build1 [95.3 kB]
Fetched 5,298 kB in 1s (4,658 kB/s)    
Selecting previously unselected package libcld2-0:amd64.
(Reading database ... 260550 files and directories currently insta
lled.)
Preparing to unpack .../libcld2-0_0.0.0-git20150806-7build1_amd64.
deb ...
Unpacking libcld2-0:amd64 (0.0.0-git20150806-7build1) ...
Selecting previously unselected package libcld2-dev.
Preparing to unpack .../libcld2-dev_0.0.0-git20150806-7build1_amd6
4.deb ...
Unpacking libcld2-dev (0.0.0-git20150806-7build1) ...
Setting up libcld2-0:amd64 (0.0.0-git20150806-7build1) ...
Setting up libcld2-dev (0.0.0-git20150806-7build1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
qmake UltraStar-Creator.pro && make
Project ERROR: cld2 development package not found

Rom888 avatar Jan 15 '21 12:01 Rom888

@bohning thanks for reply. Tried it now:

sudo apt install qt515base libtag1-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package qt515base
lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

Rom888 avatar Jan 15 '21 12:01 Rom888

Continuous integration for Linux (Ubuntu 16.04) has just been fixed, have a look at appveyor.yml all the way at the bottom to see which steps are required. For qt515base on 20.04, you might need to run sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal sudo apt-get update before the sudo apt install.

bohning avatar Jan 16 '21 00:01 bohning

Tried again, result:

~/Downloads/UltraStar-Creator/src$ qmake UltraStar-Creator.pro && make
Info: creating stash file /home/rom/Downloads/UltraStar-Creator/src/.qmake.stash
/usr/lib/qt5/bin/uic monty/QUMontyArea.ui -o ui/ui_QUMontyArea.h
/usr/lib/qt5/bin/uic QUMainWindow.ui -o ui/ui_QUMainWindow.h
QUMainWindow.ui: Warning: The name 'layoutWidget' (QWidget) is already in use, defaulting to 'layoutWidget1'.
/usr/lib/qt5/bin/uic QUAboutDialog.ui -o ui/ui_QUAboutDialog.h
/usr/lib/qt5/bin/uic support/QUMessageBox.ui -o ui/ui_QUMessageBox.h
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Imonty -Isong -Isupport -Iui -I../include/bass -I../include/bass_fx -I../include/cld2/public -isystem /usr/include/taglib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /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/main.o main.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Imonty -Isong -Isupport -Iui -I../include/bass -I../include/bass_fx -I../include/cld2/public -isystem /usr/include/taglib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /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: In member function ‘void QUMainWindow::initConfig()’:
QUMainWindow.cpp:286:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
  286 |   ;//_menu->langPtBtn->setChecked(true);
      |   ^
QUMainWindow.cpp: In member function ‘bool QUMainWindow::determineLanguage(QString)’:
QUMainWindow.cpp:1316:17: warning: unused variable ‘cld2_lang’ [-Wunused-variable]
 1316 |  CLD2::Language cld2_lang = CLD2::DetectLanguageSummary(lyrics.toStdString().c_str(), lyrics.length(), false, language3, percent3, &text_bytes, &isReliable);
      |                 ^~~~~~~~~
QUMainWindow.cpp: In member function ‘void QUMainWindow::montyTalk(bool)’:
QUMainWindow.cpp:2125:35: warning: unused parameter ‘force’ [-Wunused-parameter]
 2125 | void QUMainWindow::montyTalk(bool force) {
      |                              ~~~~~^~~~~
QUMainWindow.cpp: In member function ‘virtual void QUMainWindow::keyReleaseEvent(QKeyEvent*)’:
QUMainWindow.cpp:1614:45: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1614 |     QUMainWindow::on_pushButton_Tap_released();
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
QUMainWindow.cpp:1615:4: note: here
 1615 |    default: QWidget::keyPressEvent(event);
      |    ^~~~~~~
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Imonty -Isong -Isupport -Iui -I../include/bass -I../include/bass_fx -I../include/cld2/public -isystem /usr/include/taglib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /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/QU.o QU.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Imonty -Isong -Isupport -Iui -I../include/bass -I../include/bass_fx -I../include/cld2/public -isystem /usr/include/taglib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /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/QUAboutDialog.o QUAboutDialog.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Imonty -Isong -Isupport -Iui -I../include/bass -I../include/bass_fx -I../include/cld2/public -isystem /usr/include/taglib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /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/QUMessageBox.o support/QUMessageBox.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Imonty -Isong -Isupport -Iui -I../include/bass -I../include/bass_fx -I../include/cld2/public -isystem /usr/include/taglib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /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/QULogService.o support/QULogService.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Imonty -Isong -Isupport -Iui -I../include/bass -I../include/bass_fx -I../include/cld2/public -isystem /usr/include/taglib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /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/QUMonty.o QUMonty.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Imonty -Isong -Isupport -Iui -I../include/bass -I../include/bass_fx -I../include/cld2/public -isystem /usr/include/taglib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /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/QUMontyArea.o monty/QUMontyArea.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Imonty -Isong -Isupport -Iui -I../include/bass -I../include/bass_fx -I../include/cld2/public -isystem /usr/include/taglib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /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/QUSongSupport.o QUSongSupport.cpp
QUSongSupport.cpp: In static member function ‘static QStringList QUSongSupport::availableCustomTags()’:
QUSongSupport.cpp:47:64: error: ‘SkipEmptyParts’ is not a member of ‘Qt’
   47 | s.value("customTags").toString().split(" ", Qt::SkipEmptyParts);
      |                                                 ^~~~~~~~~~~~~~

QUSongSupport.cpp: In static member function ‘static QStringList QUSongSupport::registryKey(const QString&, const QString&)’:
QUSongSupport.cpp:337:69: error: ‘SkipEmptyParts’ is not a member of ‘Qt’
  337 | ue(key, defaultValue).toString().split(" ", Qt::SkipEmptyParts);
      |                                                 ^~~~~~~~~~~~~~

make: *** [Makefile:942: tmp/release/QUSongSupport.o] Error 1

@bohning

Rom888 avatar Jan 16 '21 17:01 Rom888

Which version of Qt are you using? You presumably need 5.15.2, where SkipEmptyParts moved from QString to Qt namespace.

bohning avatar Jan 16 '21 18:01 bohning

@bohning I don't use Qt, but just followed instructions: https://github.com/UltraStar-Deluxe/UltraStar-Creator#compiling-on-linux and added all recommended in this topic:

sudo apt install libcld2-dev
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal
sudo apt-get update
sudo apt install qt515base
~/Downloads/UltraStar-Creator/src$ qmake --version
QMake version 3.1
Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu
~/Downloads/UltraStar-Creator/src$ apt-cache policy qt5-qmake
qt5-qmake:
  Installed: 5.12.8+dfsg-0ubuntu1
  Candidate: 5.12.8+dfsg-0ubuntu1
  Version table:
 *** 5.12.8+dfsg-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

Ok, I will try this: https://wiki.qt.io/Install_Qt_5_on_Ubuntu

Rom888 avatar Jan 17 '21 12:01 Rom888

I installed Qt 5.15.2 using this instructions: https://wiki.qt.io/Install_Qt_5_on_Ubuntu and removed old versions:

sudo apt remove qt5-default qttools5-dev-tools qtbase5-dev-tools qt5-qmake

and no success:

~/Downloads/UltraStar-Creator/src$ qmake UltraStar-Creator.pro && make
Could not find qmake spec 'linux-g++'.
Error processing project file: UltraStar-Creator.pro

Rom888 avatar Jan 17 '21 14:01 Rom888

Hmm, don’t know how to help you with the qmake spec file. Do you need to compile yourself or can you also use the AppImage from CI?

bohning avatar Jan 17 '21 20:01 bohning

Do you need to compile yourself or can you also use the AppImage from CI?

No, I don't need to compile it myself. I just want to use this tool, but at the moment I don't see any way how to run it on my Ubuntu 20.04 desktop.

It would be helpful to see any instructions how to run AppImage from CI. I have Docker on my desktop. Do I need export display or any other steps? I think it would be useful to other people too.

Rom888 avatar Jan 19 '21 12:01 Rom888

I have never used AppImages (I am not on Linux), but from what I understood, you simply download the AppImage, make it executable and execute it.

Maybe this helps: https://itsfoss.com/use-appimage-linux/

bohning avatar Jan 19 '21 15:01 bohning

@bohning , yes, I can run UltraStar-Creator using AppImage! Thanks for support!

Do you think we should add some instructions to README? Something like this:

download .appimage file from here: https://ci.appveyor.com/project/bohning/ultrastar-creator/build/job/fahaofw44aapdiin/artifacts select: Jobs- Image: Ubuntu1604...- Artifacts- bin\release\UltraStar-Creator-3ed8133-x86_64.AppImage

# in terminal:
cd ~/Downloads
fn=UltraStar-Creator-3ed8133-x86_64.AppImage
chmod u+x ${fn}
# run it
./${fn}

Rom888 avatar Jan 20 '21 07:01 Rom888

I was able to compile it with Qt 5.12.8 under Ubuntu 20.04 following the official build instructions and making a few changes.

AlexLukasT avatar Feb 24 '21 22:02 AlexLukasT