Wireshark-dev: Re: [Wireshark-dev] Cmake and RPM
From: João Valverde <[email protected]>
Date: Thu, 18 Aug 2016 17:27:08 +0100

On 08/18/2016 04:56 PM, Jonne Zutt wrote:
I did not make changes to my $PATH.
Well, after verifying and searching for a while, that did happen
actually, because of the qtchooser package:

$ rpm -qf /etc/profile.d/qtchooser.sh
qtchooser-39-1.fc20.x86_64

$ cat /etc/profile.d/qtchooser.sh

case ":${PATH:-}:" in
    *:/usr/lib/qtchooser:*) ;;
    *) PATH="/usr/lib/qtchooser${PATH:+:$PATH}" ;;
esac


What I did earlier to make it work for me was:
sed -i -e 's/-qt=/-qt=qt/g' configure
but I understand that's not the way to go.

Maybe I should not have installed qtchooser-39-1.fc20.x86_64?
(/usr/lib/qtchooser is a directory on my system, the executable next to
it you don't seem to have)

$ whereis qtchooser
qtchooser: /usr/lib/qtchooser /usr/lib/qtchooser/qtchooser

$ ./configure --with-qt=5 --with-gtk=no
---
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
---

$ lrelease-qt5 -version
lrelease version 5.3.2

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

$ lrelease -qt=qt5 -version
lrelease version 5.3.2

Removing the qtchooser package seems to fix the issue I had:

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... /usr/bin/lrelease-qt5
checking whether lrelease -version works... ok, lrelease version 5.3.2

Oops, sorry about that?

No problem, it's still useful to know. I also have qtchooser installed 
on the Fedora VM, it just isn't picked up by configure.