Discussion:
QT with cmake
Dario Lombardo
2014-10-21 09:20:54 UTC
Permalink
Hi list
I tried to compile the master of wireshark using cmake.

mkdir build
cd build
cmake ..
make

In run/ I can find wireshark-gtk but not qt. Any specific command to pass
to cmake to have it? I am able to obtain qt executable using autotools
(meaning that my qt dev subsystem should be fine).

Thanks
Dario.
Michal Orynicz
2014-10-21 09:31:08 UTC
Permalink
Hi,
right now wireshark-qt is renamed to wireshark, and wireshark was renamed
to wireshark-gtk. This is to push people to use the new UI.
So please check if Your wireshark binary is the one You are searching for :)
Post by Dario Lombardo
Hi list
I tried to compile the master of wireshark using cmake.
mkdir build
cd build
cmake ..
make
In run/ I can find wireshark-gtk but not qt. Any specific command to pass
to cmake to have it? I am able to obtain qt executable using autotools
(meaning that my qt dev subsystem should be fine).
Thanks
Dario.
___________________________________________________________________________
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
?subject=unsubscribe
--
Pozdrawiam / Best regards
Michał Orynicz, Software Engineer
Tieto Corporation

Product Development Services

http://www.tieto.com / http://www.tieto.pl
---
ASCII: Michal Orynicz
location: Swobodna 1 Street, 50-088 Wrocław, Poland
room: 5.01 (desk next to 5.08)
---
Please note: The information contained in this message may be legally
privileged and confidential and protected from disclosure. If the
reader of this message is not the intended recipient, you are hereby
notified that any unauthorised use, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the message and deleting it from your computer. Thank You.
---
Please consider the environment before printing this e-mail.
---
Tieto Poland spółka z ograniczoną odpowiedzialnością z siedzibą w
Szczecinie, ul. Malczewskiego 26. Zarejestrowana w Sądzie Rejonowym
Szczecin-Centrum w Szczecinie, XIII Wydział Gospodarczy Krajowego
Rejestru Sądowego pod numerem 0000124858. NIP: 8542085557. REGON:
812023656. Kapitał zakładowy: 4 271500 PLN
Dario Lombardo
2014-10-21 09:38:15 UTC
Permalink
Well... it's the first thing I searched for, since I compiled it with
autotools and I noticed that switch.
But actually

wireshark/build$ find . -name wireshark
wireshark/build$ find . -name wireshark-gtk
./run/wireshark-gtk
wireshark/build$

wireshark qt seems not to be compiled at all.
Post by Michal Orynicz
Hi,
right now wireshark-qt is renamed to wireshark, and wireshark was renamed
to wireshark-gtk. This is to push people to use the new UI.
So please check if Your wireshark binary is the one You are searching for :)
Post by Dario Lombardo
Hi list
I tried to compile the master of wireshark using cmake.
mkdir build
cd build
cmake ..
make
In run/ I can find wireshark-gtk but not qt. Any specific command to pass
to cmake to have it? I am able to obtain qt executable using autotools
(meaning that my qt dev subsystem should be fine).
Thanks
Dario.
___________________________________________________________________________
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
?subject=unsubscribe
--
Pozdrawiam / Best regards
Michał Orynicz, Software Engineer
Tieto Corporation
Product Development Services
http://www.tieto.com / http://www.tieto.pl
---
ASCII: Michal Orynicz
location: Swobodna 1 Street, 50-088 Wrocław, Poland
room: 5.01 (desk next to 5.08)
---
Please note: The information contained in this message may be legally
privileged and confidential and protected from disclosure. If the
reader of this message is not the intended recipient, you are hereby
notified that any unauthorised use, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the message and deleting it from your computer. Thank You.
---
Please consider the environment before printing this e-mail.
---
Tieto Poland spółka z ograniczoną odpowiedzialnością z siedzibą w
Szczecinie, ul. Malczewskiego 26. Zarejestrowana w Sądzie Rejonowym
Szczecin-Centrum w Szczecinie, XIII Wydział Gospodarczy Krajowego
812023656. Kapitał zakładowy: 4 271500 PLN
___________________________________________________________________________
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
?subject=unsubscribe
Michal Orynicz
2014-10-21 09:46:09 UTC
Permalink
Please check if You have QT flags set up properly. Using ccmake or
cmake-gui might help with checking those up. There is a switch to chose
between QT5 and QT4 in cmake setup, which might be the culprit.
Post by Dario Lombardo
Well... it's the first thing I searched for, since I compiled it with
autotools and I noticed that switch.
But actually
wireshark/build$ find . -name wireshark
wireshark/build$ find . -name wireshark-gtk
./run/wireshark-gtk
wireshark/build$
wireshark qt seems not to be compiled at all.
Post by Michal Orynicz
Hi,
right now wireshark-qt is renamed to wireshark, and wireshark was renamed
to wireshark-gtk. This is to push people to use the new UI.
So please check if Your wireshark binary is the one You are searching for :)
Post by Dario Lombardo
Hi list
I tried to compile the master of wireshark using cmake.
mkdir build
cd build
cmake ..
make
In run/ I can find wireshark-gtk but not qt. Any specific command to
pass to cmake to have it? I am able to obtain qt executable using autotools
(meaning that my qt dev subsystem should be fine).
Thanks
Dario.
___________________________________________________________________________
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
?subject=unsubscribe
--
Pozdrawiam / Best regards
Michał Orynicz, Software Engineer
Tieto Corporation
Product Development Services
http://www.tieto.com / http://www.tieto.pl
---
ASCII: Michal Orynicz
location: Swobodna 1 Street, 50-088 Wrocław, Poland
room: 5.01 (desk next to 5.08)
---
Please note: The information contained in this message may be legally
privileged and confidential and protected from disclosure. If the
reader of this message is not the intended recipient, you are hereby
notified that any unauthorised use, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the message and deleting it from your computer. Thank You.
---
Please consider the environment before printing this e-mail.
---
Tieto Poland spółka z ograniczoną odpowiedzialnością z siedzibą w
Szczecinie, ul. Malczewskiego 26. Zarejestrowana w Sądzie Rejonowym
Szczecin-Centrum w Szczecinie, XIII Wydział Gospodarczy Krajowego
812023656. Kapitał zakładowy: 4 271500 PLN
___________________________________________________________________________
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
?subject=unsubscribe
___________________________________________________________________________
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
?subject=unsubscribe
--
Pozdrawiam / Best regards
Michał Orynicz, Software Engineer
Tieto Corporation

Product Development Services

http://www.tieto.com / http://www.tieto.pl
---
ASCII: Michal Orynicz
location: Swobodna 1 Street, 50-088 Wrocław, Poland
room: 5.01 (desk next to 5.08)
---
Please note: The information contained in this message may be legally
privileged and confidential and protected from disclosure. If the
reader of this message is not the intended recipient, you are hereby
notified that any unauthorised use, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the message and deleting it from your computer. Thank You.
---
Please consider the environment before printing this e-mail.
---
Tieto Poland spółka z ograniczoną odpowiedzialnością z siedzibą w
Szczecinie, ul. Malczewskiego 26. Zarejestrowana w Sądzie Rejonowym
Szczecin-Centrum w Szczecinie, XIII Wydział Gospodarczy Krajowego
Rejestru Sądowego pod numerem 0000124858. NIP: 8542085557. REGON:
812023656. Kapitał zakładowy: 4 271500 PLN
Peter Wu
2014-10-21 09:49:32 UTC
Permalink
Post by Dario Lombardo
I tried to compile the master of wireshark using cmake.
mkdir build
cd build
cmake ..
make
In run/ I can find wireshark-gtk but not qt. Any specific command to pass
to cmake to have it? I am able to obtain qt executable using autotools
(meaning that my qt dev subsystem should be fine).
If I am not mistaken, the CMake build defaults to Qt5 by default. To use Qt4
instead, pass the option -DENABLE_QT5=0. Otherwise, install the qt5-tools
package which should provide the packages which are reported missing during
cmake.

Have you checked the cmake output already?
--
Kind regards,
Peter
https://lekensteyn.nl

___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev-IZ8446WsY0/***@public.gmane.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request-IZ8446WsY0/***@public.gmane.org?subject=unsubscribe
Dario Lombardo
2014-10-21 11:12:18 UTC
Permalink
Well... after installing some other qt5 packages I get

CMake Error at ui/qt/CMakeLists.txt:306 (QT5_ADD_TRANSLATION):
Unknown CMake command "QT5_ADD_TRANSLATION".
Post by Peter Wu
Post by Dario Lombardo
I tried to compile the master of wireshark using cmake.
mkdir build
cd build
cmake ..
make
In run/ I can find wireshark-gtk but not qt. Any specific command to pass
to cmake to have it? I am able to obtain qt executable using autotools
(meaning that my qt dev subsystem should be fine).
If I am not mistaken, the CMake build defaults to Qt5 by default. To use Qt4
instead, pass the option -DENABLE_QT5=0. Otherwise, install the qt5-tools
package which should provide the packages which are reported missing during
cmake.
Have you checked the cmake output already?
--
Kind regards,
Peter
https://lekensteyn.nl
Peter Wu
2014-10-21 11:20:34 UTC
Permalink
Post by Dario Lombardo
Well... after installing some other qt5 packages I get
Unknown CMake command "QT5_ADD_TRANSLATION".
On Arch Linux, the package qt5-tools provides the following file which defines
that function:
/usr/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake

What distro are you using? For Debian/Ubuntu you need to install qttools5-dev.

Kind regards,
Peter

___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev-IZ8446WsY0/***@public.gmane.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request-IZ8446WsY0/***@public.gmane.org?subject=unsubscribe
Dario Lombardo
2014-10-21 12:11:25 UTC
Permalink
Post by Peter Wu
What distro are you using? For Debian/Ubuntu you need to install qttools5-dev.
It is exactly what I'm using (ubuntu 14.04). I've installed qttools5-dev
and compilation made few steps ahead, but then stopped with

Scanning dependencies of target qtui
[ 79%] Building CXX object ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o
In file included from
/home/dario/Projects/wireshark/ui/qt/about_dialog.cpp:25:0:
/home/dario/Projects/wireshark/ui/qt/ui_about_dialog.h:13:25: fatal error:
QtGui/QAction: No such file or directory
#include <QtGui/QAction>
^
compilation terminated.
make[2]: *** [ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o] Error 1
make[1]: *** [ui/qt/CMakeFiles/qtui.dir/all] Error 2
make: *** [all] Error 2
Peter Wu
2014-10-21 12:48:28 UTC
Permalink
Post by Dario Lombardo
Post by Peter Wu
What distro are you using? For Debian/Ubuntu you need to install qttools5-dev.
It is exactly what I'm using (ubuntu 14.04). I've installed qttools5-dev
and compilation made few steps ahead, but then stopped with
Scanning dependencies of target qtui
[ 79%] Building CXX object ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o
In file included from
QtGui/QAction: No such file or directory
#include <QtGui/QAction>
^
compilation terminated.
make[2]: *** [ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o] Error 1
make[1]: *** [ui/qt/CMakeFiles/qtui.dir/all] Error 2
make: *** [all] Error 2
Have you tried to clear your build dir? The QtGui/QAction file is located in the
qt4 include directory, in qt5 it is located at QtWidgets/QAction.
--
Kind regards,
Peter
https://lekensteyn.nl

___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev-IZ8446WsY0/***@public.gmane.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request-IZ8446WsY0/***@public.gmane.org?subject=unsubscribe
Dario Lombardo
2014-10-21 13:13:01 UTC
Permalink
Post by Peter Wu
Have you tried to clear your build dir? The QtGui/QAction file is located in the
qt4 include directory, in qt5 it is located at QtWidgets/QAction.
I've completely deleted the build dir and started over. Same output.
[ 79%] Building CXX object ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o
In file included from
/home/dario/Projects/wireshark/ui/qt/about_dialog.cpp:25:0:
/home/dario/Projects/wireshark/ui/qt/ui_about_dialog.h:13:25: fatal error:
QtGui/QAction: No such file or directory
#include <QtGui/QAction>
^
compilation terminated.
make[2]: *** [ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o] Error 1
make[1]: *** [ui/qt/CMakeFiles/qtui.dir/all] Error 2
make: *** [all] Error 2

The strange thing I noticed is that QtGui/Qaction is not present in any qt5
package (only qt4)

wireshark/build$ sudo apt-file search QAction
libqt4-dev: /usr/include/qt4/QtGui/QAction
libqt4-dev: /usr/include/qt4/QtGui/QActionEvent
libqt4-dev: /usr/include/qt4/QtGui/QActionGroup
qtbase5-dev: /usr/include/qt5/QtGui/QActionEvent
qtbase5-dev: /usr/include/qt5/QtWidgets/QAction
qtbase5-dev: /usr/include/qt5/QtWidgets/QActionGroup
Joerg Mayer
2014-10-21 23:58:08 UTC
Permalink
Post by Dario Lombardo
Post by Peter Wu
Have you tried to clear your build dir? The QtGui/QAction file is located in the
qt4 include directory, in qt5 it is located at QtWidgets/QAction.
I've completely deleted the build dir and started over. Same output.
[ 79%] Building CXX object ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o
In file included from
QtGui/QAction: No such file or directory
#include <QtGui/QAction>
Weird. Where does this include come from? I can't find it in any file.
Hmm, OK, it's in a generated file and most probably generated for Qt4.
So maybe it is not properly picking up the qt5 tools (uic) but using
the qt4 version instead?
Or there is a leftover. The path looks like the file ui_about_dialog.h
is in tree, not out of tree, but that's for you to confirm or deny.

Ciao
Jörg
--
Joerg Mayer <***@loplof.de>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-***@wireshark.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshar
Dario Lombardo
2014-10-22 07:34:06 UTC
Permalink
I don't know how, but now it compiles.
My guess is that it was related to (one of them or both):
1) previous compilation with qt4
2) previous compilation with autotools

Thanks everybody for your help.
Post by Peter Wu
Post by Dario Lombardo
Post by Peter Wu
Have you tried to clear your build dir? The QtGui/QAction file is
located
Post by Dario Lombardo
Post by Peter Wu
in the
qt4 include directory, in qt5 it is located at QtWidgets/QAction.
I've completely deleted the build dir and started over. Same output.
[ 79%] Building CXX object ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o
In file included from
/home/dario/Projects/wireshark/ui/qt/ui_about_dialog.h:13:25: fatal
QtGui/QAction: No such file or directory
#include <QtGui/QAction>
Weird. Where does this include come from? I can't find it in any file.
Hmm, OK, it's in a generated file and most probably generated for Qt4.
So maybe it is not properly picking up the qt5 tools (uic) but using
the qt4 version instead?
Or there is a leftover. The path looks like the file ui_about_dialog.h
is in tree, not out of tree, but that's for you to confirm or deny.
Ciao
Jörg
--
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
___________________________________________________________________________
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
?subject=unsubscribe
Alexis La Goutte
2014-10-22 07:58:29 UTC
Permalink
Hi Dario,

I have already get this issue... (don't good idea to mix autofoo and cmake)

Do you have try to cleanup your git repo ?
git clean(up?) -X -F

and what the end of output of cmake ?

On Wed, Oct 22, 2014 at 9:34 AM, Dario Lombardo
Post by Dario Lombardo
I don't know how, but now it compiles.
1) previous compilation with qt4
2) previous compilation with autotools
Thanks everybody for your help.
Post by Joerg Mayer
Post by Dario Lombardo
Post by Peter Wu
Have you tried to clear your build dir? The QtGui/QAction file is
located
in the
qt4 include directory, in qt5 it is located at QtWidgets/QAction.
I've completely deleted the build dir and started over. Same output.
[ 79%] Building CXX object ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o
In file included from
QtGui/QAction: No such file or directory
#include <QtGui/QAction>
Weird. Where does this include come from? I can't find it in any file.
Hmm, OK, it's in a generated file and most probably generated for Qt4.
So maybe it is not properly picking up the qt5 tools (uic) but using
the qt4 version instead?
Or there is a leftover. The path looks like the file ui_about_dialog.h
is in tree, not out of tree, but that's for you to confirm or deny.
Ciao
Jörg
--
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
___________________________________________________________________________
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
___________________________________________________________________________
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-***@wireshark.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-***@wireshark.org?subject=unsubscr

Dario Lombardo
2014-10-21 09:12:23 UTC
Permalink
Hi list
I tried to compile the master of wireshark using cmake.

mkdir build
cd build
cmake ..
make

In run/ I can find wireshark-gtk but not qt. Any specific command to pass
to cmake to have it? I am able to obtain qt executable using autotools
(meaning that my qt dev subsystem should be fine).

Thanks
Dario.
Continue reading on narkive:
Loading...