We're now a non-profit! Support open source packet analysis by making a donation.

Wireshark-users: Re: [Wireshark-users] Unable to compile static build of TShark on Fedora 7

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 4 Sep 2007 17:45:53 -0700

On Sep 3, 2007, at 4:07 PM, Barry Gould wrote:

Hi, with WireShark 0.99.6, I am having trouble building TShark statically.

If I do this:
./configure --enable-static --disable-wireshark

I get an error about -lgmodule

However, I seem to have the appropriate libraries installed:
$ locate gmodule

Yes, but there's no libgmodule.a - i.e., no static library.

What's more, if Linux's notion of a static build is anything like SunOS 4.x's and 5.x's, it might not be possible for there to *be* a libgmodule.a; the gmodule stuff is for run-time loading of modules (such as plugins), and a fully-static binary might not have the run- time linker available.

If so, you will have to configure with --without-plugins.

If I do this:
./configure --enable-static --disable-wireshark --without-krb5
--without-ssl --disable-text2pcap --enable-dftest=no --enable- randpct=no --enable-ipv6=no --enable-threads=no --without-portaudio --disable- gtk2 --without-lua --enable-dftest=no --enable-static=yes --with-net- snmp=no
--with-ucd-snmp=no --without-adns --disable-gtkplus --disable-gmodule

--disable-glib? Good luck - Wireshark and TShark use GLib all over the place.

I'm not sure there's any such option in any case; note that configure scripts don't check whether the string after --enable or --disable is valid:

	$ ./configure --disable-magic-fingers
	checking build system type... powerpc-apple-darwin{censored}
	checking host system type... powerpc-apple-darwin{censored}
	checking target system type... powerpc-apple-darwin{censored}
	checking for a BSD-compatible install... /usr/bin/install -c