ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Building Wireshark on MAC

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 30 Sep 2014 14:00:25 -0700
On Sep 25, 2014, at 1:31 PM, Guy Harris <guy@xxxxxxxxxxxx> wrote:

> On Sep 25, 2014, at 1:25 PM, Anders Broman <a.broman58@xxxxxxxxx> wrote:
> 
>> Configure fails though, without parameters
>> :
>> checking for pkg-config... /usr/local/bin/pkg-config
>> checking for Qt5Core - version >= 4.6.0... no
>> checking for QtCore - version >= 4.6.0... no
>> configure: error: Qt is not available
> 
> That might be a consequence of
> 
> 	https://bugreports.qt-project.org/browse/QTBUG-35256
> 
> which is a bit painful to work around; I'll see if I have a script that fixes the .pc files.

OK, the attached script worked with the Qt binary package that was installed by the network installer on my Yosemite GM virtual machine.  It attempts to find the Qt installation and, if it does, attempts to find the .pc files for that installation and fix them.

Note that you must make sure that PATH include the pathname of the directory containing the Qt command-line tools such as moc and that PKG_CONFIG_PATH include the pathname of the directory containing the Qt pkgconfig files.  If you built and installed Qt from source, that may be the case by default, but if you installed a binary package - which, unless you have a very fast machine or are willing to wait a long time for macosx-setup.sh to finish, I'd recommend that you do - it won't be the case by default.  (I have a rather elaborate bit of code run by my .profile that attempts to find the Qt installation - that's where I got the code in the script - and set up PATH and PKG_CONFIG_PATH.)

Attachment: fix-qt-pc-files
Description: Binary data