Discussion:
error compiling gwenhywfar for qt5
(too old to reply)
Jack
2016-05-18 20:26:52 UTC
Permalink
Under Gentoo, the ebuild for gwenhywfar-4.15.3 did not have any
reference to qt5, which is clearly needed for KDE Frameworks.
Including qt5 in the guis to be built looks good until compiling
gui/qt5/qt5dialogbox.cpp which includes qt5dialogbox.hpp, which has a
line "#include <QDialog>" which fails with "qt5dialogbox.hpp:16:19:
fatal error: QDialog: No such file or directory". QDialog is indeed
present under /usr/lib/qt5/QTWidgets/ so I don't see why it shouldn't
find it.

However, looking at the Makefile in the qt5 directory, I see a line
qt4_includes = -I/usr/include/qt4 -I/usr/include/qt4/Qt
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui
but no equivalent line for qt5. I can't tell if this is something
missing, or if qt5 has new ways of finding stuff. I also don't believe
I'm the first person to hit this issue, so I'm quite willing to believe
it's some problem in my configuration.

Any suggestions? Do I need to post to the gwenhywfar mailing list, or
is there enough overlap with this list?

Jack
Thomas Baumgart
2016-05-19 14:38:22 UTC
Permalink
Hi,
Post by Jack
Under Gentoo, the ebuild for gwenhywfar-4.15.3 did not have any
reference to qt5, which is clearly needed for KDE Frameworks.
Including qt5 in the guis to be built looks good until compiling
gui/qt5/qt5dialogbox.cpp which includes qt5dialogbox.hpp, which has a
fatal error: QDialog: No such file or directory". QDialog is indeed
present under /usr/lib/qt5/QTWidgets/ so I don't see why it shouldn't
find it.
However, looking at the Makefile in the qt5 directory, I see a line
qt4_includes = -I/usr/include/qt4 -I/usr/include/qt4/Qt
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui
but no equivalent line for qt5. I can't tell if this is something
missing, or if qt5 has new ways of finding stuff. I also don't believe
I'm the first person to hit this issue, so I'm quite willing to believe
it's some problem in my configuration.
Any suggestions? Do I need to post to the gwenhywfar mailing list, or
is there enough overlap with this list?
I don't have an answer to your technical problem but can confirm the overlap
of the lists.
--
Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429 4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
If you have a choice of two things and can't decide, take both.
-- Gregory Corso
-------------------------------------------------------------
Jack
2016-05-23 21:52:11 UTC
Permalink
Post by Jack
Under Gentoo, the ebuild for gwenhywfar-4.15.3 did not have any
reference to qt5, which is clearly needed for KDE Frameworks.
Including qt5 in the guis to be built looks good until compiling
gui/qt5/qt5dialogbox.cpp which includes qt5dialogbox.hpp, which has a
fatal error: QDialog: No such file or directory". QDialog is indeed
present under /usr/lib/qt5/QTWidgets/ so I don't see why it shouldn't
find it.
However, looking at the Makefile in the qt5 directory, I see a line
qt4_includes = -I/usr/include/qt4 -I/usr/include/qt4/Qt
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui
but no equivalent line for qt5. I can't tell if this is something
missing, or if qt5 has new ways of finding stuff. I also don't
believe I'm the first person to hit this issue, so I'm quite willing
to believe it's some problem in my configuration.
In case it triggers any ideas, I've tracked this down a bit further.
There is actually an error message above the failure I listed above -
coming from the fact that the build does not have a value for qt5_moc,
even if I pass "--with-qt5-moc=/usr/lib64/qt5/bin/moc to ./configure.
(I've also tried various combinations of dash and underscore, in case
there is a typo somewhere replacing one with the other.) I'm assuming
this is working correctly for other folks, so I doubt it is a failure
in the source code, but more likely a configuration issue on my part.

Any ideas?

Jack
Jack
2016-05-23 23:19:09 UTC
Permalink
Post by Jack
Post by Jack
Under Gentoo, the ebuild for gwenhywfar-4.15.3 did not have any
reference to qt5, which is clearly needed for KDE Frameworks.
Including qt5 in the guis to be built looks good until compiling
gui/qt5/qt5dialogbox.cpp which includes qt5dialogbox.hpp, which has
a line "#include <QDialog>" which fails with
"qt5dialogbox.hpp:16:19: fatal error: QDialog: No such file or
directory". QDialog is indeed present under /usr/lib/qt5/QTWidgets/
so I don't see why it shouldn't find it.
However, looking at the Makefile in the qt5 directory, I see a line
qt4_includes = -I/usr/include/qt4 -I/usr/include/qt4/Qt
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui
but no equivalent line for qt5. I can't tell if this is something
missing, or if qt5 has new ways of finding stuff. I also don't
believe I'm the first person to hit this issue, so I'm quite willing
to believe it's some problem in my configuration.
In case it triggers any ideas, I've tracked this down a bit further.
There is actually an error message above the failure I listed above -
coming from the fact that the build does not have a value for
qt5_moc, even if I pass "--with-qt5-moc=/usr/lib64/qt5/bin/moc to
./configure. (I've also tried various combinations of dash and
underscore, in case there is a typo somewhere replacing one with the
other.) I'm assuming this is working correctly for other folks, so I
doubt it is a failure in the source code, but more likely a
configuration issue on my part.
I found another error in the configure output showing it simply was not
finding any hint of Qt5. Passing '--with-qt5-qmake="qmake -qt=5"
--with-qt5-moc="moc -qt=5"' to ./configure allowed it to configure and
compile successfully.

With that done, I was able to compile KMM, but I'll save those issues
for a new thread.

Jack
Christian Dávid
2016-05-31 20:44:54 UTC
Permalink
Hi Jack,

I am sorry for answering this late. The solution you found is “the right one”.
The issue of the configure script is that the name of qmake and moc are
different if the distribution supports Qt 4 & 5 (moc & moc-qt5 might be good
guesses). If you (or somebody else) has an idea to make this easier, any
recommendations are welcome.

Greetings
Christian
Post by Jack
Under Gentoo, the ebuild for gwenhywfar-4.15.3 did not have any
reference to qt5, which is clearly needed for KDE Frameworks.
Including qt5 in the guis to be built looks good until compiling
gui/qt5/qt5dialogbox.cpp which includes qt5dialogbox.hpp, which has a
fatal error: QDialog: No such file or directory". QDialog is indeed
present under /usr/lib/qt5/QTWidgets/ so I don't see why it shouldn't
find it.
[…]
Jack
2016-05-31 21:12:56 UTC
Permalink
I'm still waiting to see what the official Gentoo response will be to
get gwenhywfar to include qt5. I did find some configure hand-waving
which made it work. Gwenhywfar already has a "--guis='x y z'"
configure parameter, but just adding qt5 isn't enough. The one thing I
discovered is that many of the qt related utilities (at least under
Gentoo) are actually symlinks to a program qtchooser, which calls the
appropriate version, based either on a command line flag (--qt=5 or
--qt=4) or else something in the environment. (so "moc --qt=4" or "moc
--qt=5 as appropriate) Simply adding --qt5-moc='moc --qt=5' to the
configure was not quite enough but I'd have to go dig up the script I
used to get the final bit that finally worked.

More details on Gentoo - the actual utilities are under
/usr/lib/qt/qt4/ and /usr/lib/qt/qt5/ so they can still have the same
name - it is qtchooser which dispatches the correct one.

Also - the error I got about not finding <QDialog> was indeed because
it was still using the qt4 version of qmake (I think.) Once I got the
qt5 stuff properly included, that problem went away.

Jack
Post by Christian Dávid
Hi Jack,
I am sorry for answering this late. The solution you found is “the
right one”.
The issue of the configure script is that the name of qmake and moc
are
different if the distribution supports Qt 4 & 5 (moc & moc-qt5 might
be good
guesses). If you (or somebody else) has an idea to make this easier,
any
recommendations are welcome.
Greetings
Christian
Post by Jack
Under Gentoo, the ebuild for gwenhywfar-4.15.3 did not have any
reference to qt5, which is clearly needed for KDE Frameworks.
Including qt5 in the guis to be built looks good until compiling
gui/qt5/qt5dialogbox.cpp which includes qt5dialogbox.hpp, which
has a
Post by Jack
line "#include <QDialog>" which fails with
fatal error: QDialog: No such file or directory". QDialog is
indeed
Post by Jack
present under /usr/lib/qt5/QTWidgets/ so I don't see why it
shouldn't
Post by Jack
find it.
[…]
Christian Dávid
2016-06-01 17:12:20 UTC
Permalink
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi Jack,<br/>
<br/>
maybe you can use qmake and qmoc within the /usr/lib/qt/qt5/ directory directly? The configure scripts should be able to handle that (btw: I think qmake is only needed to find the include directory but not used afterwards).<br/>
<br/>
Greetings<br/>
Christian<br/>
<br/>
&gt; Jack &lt;***@users.sourceforge.net&gt; hat am 31. Mai 2016 um 23:12 geschrieben:<br/>
&gt;<br/>
&gt;<br/>
&gt; I&#39;m still waiting to see what the official Gentoo response will be to<br/>
&gt; get gwenhywfar to include qt5. I did find some configure hand-waving<br/>
&gt; which made it work. Gwenhywfar already has a &quot;--guis=&#39;x y z&#39;&quot;<br/>
&gt; configure parameter, but just adding qt5 isn&#39;t enough. The one thing I<br/>
&gt; discovered is that many of the qt related utilities (at least under<br/>
&gt; Gentoo) are actually symlinks to a program qtchooser, which calls the<br/>
&gt; appropriate version, based either on a command line flag (--qt=5 or<br/>
&gt; --qt=4) or else something in the environment. (so &quot;moc --qt=4&quot; or &quot;moc<br/>
&gt; --qt=5 as appropriate) Simply adding --qt5-moc=&#39;moc --qt=5&#39; to the<br/>
&gt; configure was not quite enough but I&#39;d have to go dig up the script I<br/>
&gt; used to get the final bit that finally worked.<br/>
&gt;<br/>
&gt; More details on Gentoo - the actual utilities are under<br/>
&gt; /usr/lib/qt/qt4/ and /usr/lib/qt/qt5/ so they can still have the same<br/>
&gt; name - it is qtchooser which dispatches the correct one.<br/>
&gt;<br/>
&gt; Also - the error I got about not finding &lt;QDialog&gt; was indeed because<br/>
&gt; it was still using the qt4 version of qmake (I think.) Once I got the<br/>
&gt; qt5 stuff properly included, that problem went away.<br/>
[&hellip;]</div></div></body></html>
Jack
2016-06-01 19:08:12 UTC
Permalink
(please try to configure your emailer to either not use HTML at all, or
at least include a valid plain text version)

Yes - that would work, but it's not that simple for me. When I compile
gwenhywfar, I don't just want it to use qt5, I want it to know about
both qt4 and qt5, as I currently have clients that need both. The
gwenhywfar ./configure is indeed able to do that, and I think my
response in the other thread gave the core parameters I needed to use,
but I'm pretty sure there is a "less ugly" way than what I ended up
with.

Jack
Post by Christian Dávid
12.0px;"><div>Hi Jack,<br/>
<br/>
maybe you can use qmake and qmoc within the /usr/lib/qt/qt5/
directory directly? The configure scripts should be able to handle
that (btw: I think qmake is only needed to find the include directory
but not used afterwards).<br/>
<br/>
Greetings<br/>
Christian<br/>
<br/>
um 23:12 geschrieben:<br/>
&gt;<br/>
&gt;<br/>
&gt; I&#39;m still waiting to see what the official Gentoo response will be to<br/>
&gt; get gwenhywfar to include qt5. I did find some configure
hand-waving<br/>
&gt; which made it work. Gwenhywfar already has a &quot;--guis=&#39;x y z&#39;&quot;<br/>
&gt; configure parameter, but just adding qt5 isn&#39;t enough. The one thing I<br/>
&gt; discovered is that many of the qt related utilities (at least under<br/>
&gt; Gentoo) are actually symlinks to a program qtchooser, which calls the<br/>
&gt; appropriate version, based either on a command line flag (--qt=5 or<br/>
&gt; --qt=4) or else something in the environment. (so &quot;moc
--qt=4&quot; or &quot;moc<br/>
&gt; --qt=5 as appropriate) Simply adding --qt5-moc=&#39;moc
--qt=5&#39; to the<br/>
&gt; configure was not quite enough but I&#39;d have to go dig up the script I<br/>
&gt; used to get the final bit that finally worked.<br/>
&gt;<br/>
&gt; More details on Gentoo - the actual utilities are under<br/>
&gt; /usr/lib/qt/qt4/ and /usr/lib/qt/qt5/ so they can still have the same<br/>
&gt; name - it is qtchooser which dispatches the correct one.<br/>
&gt;<br/>
&gt; Also - the error I got about not finding &lt;QDialog&gt; was indeed because<br/>
&gt; it was still using the qt4 version of qmake (I think.) Once I got the<br/>
&gt; qt5 stuff properly included, that problem went away.<br/>
[&hellip;]</div></div></body></html>
Continue reading on narkive:
Loading...