Closed bjornandersson closed 2 years ago
Hi @bjornandersson!
How did you install Qt; did you use the command at https://github.com/sonic-pi-net/sonic-pi/blob/dev/BUILD-LINUX.md#11-debian to install dependencies?
Also, could you paste the output of this command too?
qmake -query "QT_INSTALL_PREFIX"
Thanks!
I got the same errors. I did install according to the instructions. anders@thisbe:~/bin/sonic-pi/app$ qmake -query "QT_INSTALL_PREFIX" /usr
But after upgrading to latest cmake from 3.18.4 to 3.23.2 I got fewer errors: Generating makefiles... -- CMakeLists: Sonic Pi -- TARGET_LINUX -- System: Linux-5.13.0-51-generic -- Compiler: GNU -- Compiler Version: 9.4.0 -- Debug Flags: -g -D_DEBUG -DDEBUG -- Release Flags: -O3 -DNDEBUG -- Aubio Builder -- ERLANG_INCLUDE_PATH: /usr/lib/erlang/erts-13.0.2/include -- USE_SYSTEM_LIBS: OFF -- ImGui Interface: ON -- CMakeLists: Sonic Pi -- App Root: /home/anders/bin/sonic-pi/app -- Qtapp Root: /home/anders/bin/sonic-pi/app/gui/qt -- Configuring done CMake Error at gui/qt/CMakeLists.txt:288 (target_link_libraries): Target "sonic-pi" links to:
Qt::Core
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at gui/qt/QScintilla_src-2.13.3/CMakeLists.txt:293 (target_link_libraries): Target "QScintilla" links to:
Qt::PrintSupport
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Hmmm, something is suspicious here because it doesn't even seem like CMake is looking for the Qt libs or is finding them but calling them something else, because otherwise there would be an error when looking for them rather than later on.
I imagine it's some Ubuntu incompatibility (they may have renamed the targets so Qt5 and Qt6 dev targets could be used simultaneously idk). I'll see if I can investigate later if someone else doesn't find anything else out before then
So the forward-compatible CMake target names weren't added until Qt 5.15 (see https://codereview.qt-project.org/c/qt/qtbase/+/283446) and Ubuntu 20.04 is still on 5.12, so we need to be using Qt5::Core
and stuff in CMake rather than Qt::Core
and can't be sharing those with Qt6 like we were (not until we decide to drop support for Ubuntu 20.04 at least)
I'll see if I can post a patch in the next few days if no one beats me to it
@aodanne or @bjornandersson, could one of you try pulling the latest dev branch and building that to confirm the issue was resolved for you by #3131?
I built a fresh clone and got further. But I got the QRecursiveMutex error. This is mentioned in issue #3028 but not solved in dev branch.
[ 90%] Automatic RCC for info_files.qrc
[ 91%] Building CXX object gui/qt/CMakeFiles/sonic-pi.dir/sonic-pi_autogen/mocs_compilation.cpp.o
In file included from /home/anders/bin/sonic-pi/app/build/gui/qt/sonic-pi_autogen/IMAN36LHMA/../../../../../gui/qt/widgets/sonicpieditor.h:19,
from /home/anders/bin/sonic-pi/app/build/gui/qt/sonic-pi_autogen/IMAN36LHMA/moc_sonicpieditor.cpp:9,
from /home/anders/bin/sonic-pi/app/build/gui/qt/sonic-pi_autogen/mocs_compilation.cpp:10:
/home/anders/bin/sonic-pi/app/gui/qt/widgets/sonicpiscintilla.h:21:10: fatal error: QRecursiveMutex: No such file or directory
21 | #include ~~~~
compilation terminated.
make[2]: [gui/qt/CMakeFiles/sonic-pi.dir/build.make:3562: gui/qt/CMakeFiles/sonic-pi.dir/sonic-pi_autogen/mocs_compilation.cpp.o] Error 1
make[1]: [CMakeFiles/Makefile2:510: gui/qt/CMakeFiles/sonic-pi.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Alright, that issue should be fixed now and hopefully it was the last incompatibility. Can you try one more time on latest dev
?
Finally I can build and run. Thank you very much!
Awesome, I'm glad to hear it!
Trying to install from source on Ubuntu 20.04 and getting this (partial log)...