seq66 icon indicating copy to clipboard operation
seq66 copied to clipboard

Qt5 include errors

Open fpesari opened this issue 3 years ago • 7 comments

Hello,

I am trying to package seq66 0.95.0 on openSUSE Tumbleweed but i can't build it due to a couple of Qt5-related include errors:

[  153s] libtool: compile:  g++ -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I../../include -I../include -I../../seq_qt5 -I../../libseq66/include -I../../libsessions/include -I../../seq_portmidi/include -I../../seq_rtmidi/include -I../../resources "-DSEQ66_GIT_VERSION=\" \"" -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -Wall -Wextra -pedantic -Wno-parentheses -D_REENTRANT -DAPI_VERSION=0.95 -std=gnu++1y -pipe -Wno-variadic-macros -Wno-deprecated-declarations -c qclocklayout.cpp  -fPIC -DPIC -o .libs/qclocklayout.o
[  153s] qclocklayout.cpp:35:10: fatal error: QtWidgets/QButtonGroup: No such file or directory
[  153s]    35 | #include <QtWidgets/QButtonGroup>
[  153s]       |          ^~~~~~~~~~~~~~~~~~~~~~~~

The QtWidgets/QButtonGroup file exists in the machine, in /usr/include/qt5/QtWidgets/QButtonGroup. Maybe the g++ arguments are missing something like -I/usr/include/qt5?

[  153s] libtool: compile:  g++ -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I../../include -I../include -I../../seq_qt5 -I../../libseq66/include -I../../libsessions/include -I../../seq_portmidi/include -I../../seq_rtmidi/include -I../../resources "-DSEQ66_GIT_VERSION=\" \"" -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -Wall -Wextra -pedantic -Wno-parentheses -D_REENTRANT -DAPI_VERSION=0.95 -std=gnu++1y -pipe -Wno-variadic-macros -Wno-deprecated-declarations -c gui_palette_qt5.cpp  -fPIC -DPIC -o .libs/gui_palette_qt5.o
[  153s] In file included from gui_palette_qt5.cpp:77:
[  153s] ../include/gui_palette_qt5.hpp:40:10: fatal error: QBrush: No such file or directory

QBrush in my system is under qt5/QtGui/QBrush, not qt5/QBrush.

fpesari avatar Jul 05 '21 11:07 fpesari

Not sure what could cause that compile failure on your system. However, to be consistent with all the other Qt modules in Seq66, I removed the "QtWidgets" portion of the path from qclocklayout. The macro in m4/ax_have_qt_min.m4 takes care of making sure that QtWidgets is part of the INCLUDE spec.

I just checked that fix (and some others) into the "optimizing" branch. You can do a ./bootstrap --full-clean, ./bootstrap -er, and rebuild. Let me know if that works.

I will try to merge optimizing to master later today, once I do some yard work, bike, and shower. Thanks for the report!

-------- Fabio Pesari 04:11 Mon 05 Jul --------

Hello,

I am trying to package seq66 on openSUSE Tumbleweed but i can't build it due to a couple of Qt5-related include errors:

[  153s] libtool: compile:  g++ -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I../../include -I../include -I../../seq_qt5 -I../../libseq66/include -I../../libsessions/include -I../../seq_portmidi/include -I../../seq_rtmidi/include -I../../resources "-DSEQ66_GIT_VERSION=\" \"" -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -Wall -Wextra -pedantic -Wno-parentheses -D_REENTRANT -DAPI_VERSION=0.95 -std=gnu++1y -pipe -Wno-variadic-macros -Wno-deprecated-declarations -c qclocklayout.cpp  -fPIC -DPIC -o .libs/qclocklayout.o
[  153s] qclocklayout.cpp:35:10: fatal error: QtWidgets/QButtonGroup: No such file or directory
[  153s]    35 | #include <QtWidgets/QButtonGroup>
[  153s]       |          ^~~~~~~~~~~~~~~~~~~~~~~~

The QtWidgets/QButtonGroup file exists in the machine, in /usr/include/qt5/QtWidgets/QButtonGroup. Maybe the g++ arguments are missing something like -I/usr/include/qt5?

[  153s] libtool: compile:  g++ -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I../../include -I../include -I../../seq_qt5 -I../../libseq66/include -I../../libsessions/include -I../../seq_portmidi/include -I../../seq_rtmidi/include -I../../resources "-DSEQ66_GIT_VERSION=\" \"" -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -Wall -Wextra -pedantic -Wno-parentheses -D_REENTRANT -DAPI_VERSION=0.95 -std=gnu++1y -pipe -Wno-variadic-macros -Wno-deprecated-declarations -c gui_palette_qt5.cpp  -fPIC -DPIC -o .libs/gui_palette_qt5.o
[  153s] In file included from gui_palette_qt5.cpp:77:
[  153s] ../include/gui_palette_qt5.hpp:40:10: fatal error: QBrush: No such file or directory

QBrush in my system is under qt5/QtGui/QBrush, not qt5/QBrush.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/54

-- No lifeguard on duty.

ahlstromcj avatar Jul 05 '21 15:07 ahlstromcj

OK, I think I pinned down the issue. The build process looks for qmake but does not find it, because on openSUSE for Qt5 the executable name is actually qmake-qt5. This causes the whole build process to fail because the QT variable is never properly set, despite the libraries being installed. Can something be done about it, please? :smiley:

fpesari avatar Jul 06 '21 07:07 fpesari

I have beefed up the m4/ax_have_qt_min.m4 script with an error message if it cannot find qmake. Updated the INSTALL file to note what to do in that case (make a soft link). There might be a better test, not sure. Anyway, will check in the update later today.

-------- Fabio Pesari 00:03 Tue 06 Jul --------

OK, I think I pinned down the issue. The build process looks for qmake but does not find it, because on openSUSE for Qt5 the executable name is actually qmake-qt5. This causes the whole build process to fail because the QT variable is never properly set, despite the libraries being installed. Can something be done about it, please? :smiley:

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/54#issuecomment-874513059

ahlstromcj avatar Jul 06 '21 12:07 ahlstromcj

Now it fails with:

[ 56s] configure: error: qmake/Qt not found... is it qmake-qt5 on your system?

could it fallback on qmake-qt5 instead of giving this error? I am building in a virtualized environment so there is no way to make a link.

fpesari avatar Jul 07 '21 12:07 fpesari

Ooops, no text in your last message. Preemptively, do this after getting the latest from master:

$ ./bootstrap --full-clean $ ./bootstrap -er &> make.log $ make &>> make.log

Let me know what happens. Thanks!

-------- Fabio Pesari 05:00 Wed 07 Jul --------

Now it fails with:

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/54#issuecomment-875544457

-- "...Local prohibitions cannot block advances in military and commercial technology... Democratic movements for local restraint can only restrain the world's democracies, not the world as a whole." -- K. Eric Drexler

ahlstromcj avatar Jul 07 '21 13:07 ahlstromcj

Sorry, I initially sent an empty message but then I edited it - I wish Github sent edits via email as well! The log is in the attachment.

The log is in the attachments but if you don't get the attachment, basically I get this line:

[ 56s] configure: error: qmake/Qt not found... is it qmake-qt5 on your system?

Whereas I hoped that not finding qmake, it would automatically fall back on qmake-qt5, rather than warn me about it - I can make a symbolic link on my machine but the openSUSE package I am making uses a virtualized environment (actually, thinking about it, maybe I could run ln there but if possible, I would like to avoid it anyway since qmake on openSUSE means qmake-qt4).

fpesari avatar Jul 08 '21 05:07 fpesari

Added an update to ax_have_qt_min.m4 to fix this issue, I hope. Found out that /usr/bin/qmake is a softlink to qtchooser, maybe running qtchooser to change the "version" would have worked. But updating the m4 file was less of a hassle.

ahlstromcj avatar Aug 22 '22 13:08 ahlstromcj