Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

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
make

I get an error about -lgmodule

However, I seem to have the appropriate libraries installed:
$ locate gmodule
/lib/libgmodule-2.0.so.0
/lib/libgmodule-2.0.so.0.1200.13
/usr/include/glib-1.2/gmodule.h
/usr/include/glib-2.0/gmodule.h
/usr/lib/libgmodule-1.2.so.0
/usr/lib/libgmodule-1.2.so.0.0.10
/usr/lib/libgmodule-2.0.so
/usr/lib/libgmodule.so
/usr/lib/pkgconfig/gmodule-2.0.pc
/usr/lib/pkgconfig/gmodule-export-2.0.pc
/usr/lib/pkgconfig/gmodule-no-export-2.0.pc
/usr/lib/pkgconfig/gmodule.pc
/usr/lib/python2.5/lib-dynload/rgbimgmodule.so
/usr/lib/python2.5/lib-dynload/timingmodule.so
/usr/lib/python2.5/site-packages/ixf86configmodule.so

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

--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

		...