Why build of package without brew does not work?

1

I am trying to build wireshark same way brew is doing it:

13:48 marko@marko-mpbr:/tmp $ brew fetch wireshark
==> Downloading http://www.wireshark.org/download/src/wireshark-1.8.6.tar.bz2
Already downloaded: /Library/Caches/Homebrew/wireshark-1.8.6.tar.bz2
SHA1: 0f51ed901b5e07cceb1373f3368f739be8f1e827
SHA256: 2722ed3e926c26648faec31a81b7881d829df85762c21794b9dd9e4f227331ea
13:49 marko@marko-mpbr:/tmp $ tar xf /Library/Caches/Homebrew/wireshark-1.8.6.tar.bz2
13:49 marko@marko-mpbr:/tmp $ cd wireshark-1.8.6/
13:49 marko@marko-mpbr:/tmp/wireshark-1.8.6 $ ./configure --prefix=/usr/local/Cellar/wireshark/1.8.6-marko
[skip]
checking for GTK+ - version >= 2.12.0 and < 3.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error: Neither Qt nor GTK+ 2.12 or later are available, so Wireshark can't be compiled

What does brew do differently? Why does build succeeds in brew, but not when I am doing it? All configure parameters are the same. Maybe something in environment?

Marko Kevac

Posted 2013-04-04T09:51:35.533

Reputation: 175

What does config.log say? – slhck – 2013-04-04T09:59:42.343

I have already found what's going on. Look my answer. – Marko Kevac – 2013-04-04T10:17:28.823

Answers

1

You must include /opt/X11/lib/pkgconfig into PKG_CONFIG_PATH:

export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:$PKG_CONFIG_PATH

before executing configure

Marko Kevac

Posted 2013-04-04T09:51:35.533

Reputation: 175

0

I resolved the issue by running with --with-x, that is brew install wireshark --with-x. According to the formula (/usr/local/Library/Formula/wireshark.rb), the available options are --with-x and --with-qt.

user231263

Posted 2013-04-04T09:51:35.533

Reputation: 1