Wireshark-dev: Re: [Wireshark-dev] Cmake and RPM
From: Jonne Zutt <jonne.zutt.ml@xxxxxxxxx>
Date: Tue, 16 Aug 2016 18:38:53 +0200
Fedora 20.

$ cat /etc/fedora-release
Fedora release 20 (Heisenbug)

On Tue, Aug 16, 2016 at 6:32 PM, João Valverde <joao.valverde@xxxxxxxxxxxxxxxxxx> wrote:
Now that all the build dependencies are present it seems like you hit two separate build system bugs.

Which distro/system are you using exactly, please?


On 08/16/2016 05:12 PM, Jonne Zutt wrote:
Thanks to Jeff's suggestion I was able to install qt5-qttools-devel
which provided me with lrelease-qt5
$ dzdo yum whatprovides /usr/bin/lrelease-qt5
qt5-qttools-devel-5.2.0-0.5.beta1.fc20.i686 : Development files for
qt5-qttools

"./configure --with-qt=5 --with-gtk=no" now ends with:
checking for qtchooser... /usr/lib/qtchooser/qtchooser
checking for uic... /usr/lib/qtchooser/uic
checking for qtchooser... (cached) /usr/lib/qtchooser/qtchooser
checking for moc... /usr/lib/qtchooser/moc
checking for qtchooser... (cached) /usr/lib/qtchooser/qtchooser
checking for rcc... /usr/lib/qtchooser/rcc
checking for qtchooser... (cached) /usr/lib/qtchooser/qtchooser
checking for lrelease... /usr/lib/qtchooser/lrelease
checking whether lrelease -version works... no
configure: error: /usr/lib/qtchooser/lrelease -qt=5 -version returned
non-zero exit status
make: *** No targets specified and no makefile found.  Stop.


Ok, so configure fails when trying "lrelease -qt=5 -version", it seems
my lrelease doesn't like the -qt=5 argument.

$ lrelease -qt=4 -version
lrelease: could not find a Qt installation of '4'
$ lrelease -qt=5 -version
lrelease: could not find a Qt installation of '5'
$ lrelease -qt=default -version
lrelease version 4.8.6

It seems to like -qt=qt5 though:

$ /usr/lib/qtchooser/lrelease -qt=qt5 -version
lrelease version 5.3.2

I changed:
                LRELEASE="$LRELEASE -qt=$qt_version"
into
                LRELEASE="$LRELEASE -qt=qt$qt_version"


Then configure seems to work:
checking for qtchooser... /usr/lib/qtchooser/qtchooser
checking for uic... /usr/lib/qtchooser/uic
checking for qtchooser... (cached) /usr/lib/qtchooser/qtchooser
checking for moc... /usr/lib/qtchooser/moc
checking for qtchooser... (cached) /usr/lib/qtchooser/qtchooser
checking for rcc... /usr/lib/qtchooser/rcc
checking for qtchooser... (cached) /usr/lib/qtchooser/qtchooser
checking for lrelease... /usr/lib/qtchooser/lrelease
checking whether lrelease -version works... ok, lrelease version 5.3.2


It seems I need to do the same for UIC:

  UIC      ui_about_dialog.h
uic: could not find a Qt installation of '5'

                UIC="$UIC -qt=qt$qt_version"

And also for MOC, RCC.

Maybe I should've changed qt_version, but anyways, I do not see a neat
way for that (e.g., cannot provide --with-qt=qt5 to configure).

Seems like I'm almost there, getting to closer to build an rpm:

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.P9teqs
+ umask 022
+ cd /export/home/jonne/wireshark/wireshark/packaging/rpm/BUILD
+ cd /export/home/jonne/wireshark/wireshark/packaging/rpm/BUILD
+ rm -rf wireshark-2.3.0
+ /usr/bin/tar -xf -
+ /usr/bin/xz -dc
/export/home/jonne/wireshark/wireshark/packaging/rpm/SOURCES/wireshark-2.3.0.tar.xz
/usr/bin/tar: This does not look like a tar archive
/usr/bin/tar: Exiting with failure status due to previous errors
error: Bad exit status from /var/tmp/rpm-tmp.P9teqs (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.P9teqs (%prep)


Thanks for you help,
Jonne.



$ qtchooser -qt=5 -version
qtchooser: unknown option: -version
$ qtchooser -qt=5
Usage:
  qtchooser { -l | -list-versions | -print-env }
  qtchooser -run-tool=<tool name> [-qt=<Qt version>] [program arguments]
  <executable name> [-qt=<Qt version>] [program arguments]

Environment variables accepted:
 QTCHOOSER_RUNTOOL  name of the tool to be run (same as the -run-tool
argument)
 QT_SELECT          version of Qt to be run (same as the -qt argument)

$ qtchooser -qt=5 -l
default
qt4-64
qt4
qt5-64
qt5

On Tue, Aug 16, 2016 at 4:14 PM, João Valverde
<joao.valverde@tecnico.ulisboa.pt
<mailto:joao.valverde@tecnico.ulisboa.pt>> wrote:

    I wasn't aware of that shell script, it might need updating.

    This part of the Qt toolchain (qt-tools) is awkward, to be kind, and
    detection might not work always well.

    Feel free to ask for help here if you get stuck.

    You need lrelease to build the Qt GUI. Not sure what is going on
    with qtchooser.



    On 08/16/2016 02:41 PM, Jonne Zutt wrote:

        I see, thanks for that. I was already trying this path after
        reading the
        reply of Anders.

        I installed the rpms that were suggested
        by wireshark/tools/install_rpms_for_devel.sh

        I then also installed qtchooser-39-1.fc20.x86_64, but configure
        is still
        unable to find it somehow. I guess I need to help it a bit
        somehow, I'll
        keep trying!

        Thanks,
        Jonne.


        ....
        checking for GLIB... yes
        checking for Qt5Core - version >= 5.0.0... yes (version 5.3.2)
        checking for Qt5Gui - version >= 5.0.0... yes (version 5.3.2)
        checking for Qt5Widgets - version >= 5.0.0... yes (version 5.3.2)
        checking for Qt5PrintSupport - version >= 5.0.0... yes (version
        5.3.2)
        checking for Qt5Multimedia - version >= 5.0.0... yes (version 5.3.2)
        checking for Qt5MacExtras - version >= 5.0.0... no
        checking whether Qt works without -fPIC... no
        checking whether Qt works with -fPIC... yes
        checking for qtchooser... no
        checking for uic-qt5... /usr/bin/uic-qt5
        checking for qtchooser... no
        checking for moc-qt5... /usr/bin/moc-qt5
        checking for qtchooser... no
        checking for rcc-qt5... /usr/bin/rcc-qt5
        checking for qtchooser... no
        checking for lrelease-qt5... no
        checking for lrelease... no
        configure: error: I couldn't find lrelease-qt5 or lrelease; make
        sure
        it's installed and in your path
        make: *** No targets specified and no makefile found.  Stop.


        On Tue, Aug 16, 2016 at 1:57 PM, João Valverde
        <joao.valverde@tecnico.ulisboa.pt
        <mailto:joao.valverde@tecnico.ulisboa.pt>
        <mailto:joao.valverde@tecnico.ulisboa.pt

        <mailto:joao.valverde@tecnico.ulisboa.pt>>> wrote:



            On 08/16/2016 10:23 AM, Jonne Zutt wrote:

                Hi all,

                Could somebody tell me what I have to do to be able to
        build an
                RPM package?


            You have to use autotools. :-)

            CMake doesn't support building an rpm package yet (see
        README.cmake).

                I successfully build wireshark using cmake and make.
                I have a working wireshark-gtk executable in the build
        directory
                that I
                can run and works fine.

                Now, if I try to run "make rpm-package", it seems it doesn't
                know the
                target. I wonder what I have to do to get this?

                $ make rpm-package
                make: *** No rule to make target `rpm-package'.  Stop.

                Thanks,
                Jonne.




        ___________________________________________________________________________
                Sent via:    Wireshark-dev mailing list
                <wireshark-dev@xxxxxxxxxxxxx
        <mailto:wireshark-dev@wireshark.org>
        <mailto:wireshark-dev@wireshark.org
        <mailto:wireshark-dev@wireshark.org>>>
                Archives:
        https://www.wireshark.org/lists/wireshark-dev
        <https://www.wireshark.org/lists/wireshark-dev>
                <https://www.wireshark.org/lists/wireshark-dev
        <https://www.wireshark.org/lists/wireshark-dev>>
                Unsubscribe:
        https://wireshark.org/mailman/options/wireshark-dev
        <https://wireshark.org/mailman/options/wireshark-dev>
                <https://wireshark.org/mailman/options/wireshark-dev
        <https://wireshark.org/mailman/options/wireshark-dev>>
                             mailto:wireshark-dev-request@wireshark.org
        <mailto:wireshark-dev-request@wireshark.org>
                <mailto:wireshark-dev-request@wireshark.org
        <mailto:wireshark-dev-request@wireshark.org>>?subject=unsubscribe


        ___________________________________________________________________________
            Sent via:    Wireshark-dev mailing list
        <wireshark-dev@xxxxxxxxxxxxx <mailto:wireshark-dev@wireshark.org>
            <mailto:wireshark-dev@wireshark.org

        <mailto:wireshark-dev@wireshark.org>>>
            Archives:    https://www.wireshark.org/lists/wireshark-dev
        <https://www.wireshark.org/lists/wireshark-dev>
            <https://www.wireshark.org/lists/wireshark-dev
        <https://www.wireshark.org/lists/wireshark-dev>>
            Unsubscribe:
        https://wireshark.org/mailman/options/wireshark-dev
        <https://wireshark.org/mailman/options/wireshark-dev>
            <https://wireshark.org/mailman/options/wireshark-dev
        <https://wireshark.org/mailman/options/wireshark-dev>>
                        mailto:wireshark-dev-request@wireshark.org
        <mailto:wireshark-dev-request@wireshark.org>
            <mailto:wireshark-dev-request@wireshark.org
        <mailto:wireshark-dev-request@wireshark.org>>?subject=unsubscribe




        ___________________________________________________________________________
        Sent via:    Wireshark-dev mailing list
        <wireshark-dev@xxxxxxxxxxxxx <mailto:wireshark-dev@wireshark.org>>
        Archives:    https://www.wireshark.org/lists/wireshark-dev
        <https://www.wireshark.org/lists/wireshark-dev>
        Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
        <https://wireshark.org/mailman/options/wireshark-dev>
                     mailto:wireshark-dev-request@wireshark.org
        <mailto:wireshark-dev-request@wireshark.org>?subject=unsubscribe

    ___________________________________________________________________________
    Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx
    <mailto:wireshark-dev@wireshark.org>>
    Archives:    https://www.wireshark.org/lists/wireshark-dev
    <https://www.wireshark.org/lists/wireshark-dev>
    Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
    <https://wireshark.org/mailman/options/wireshark-dev>
                mailto:wireshark-dev-request@wireshark.org
    <mailto:wireshark-dev-request@wireshark.org>?subject=unsubscribe




___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe