This is a static archive of our old Q&A Site. Please post any new questions and answers at

static tshark builds for linux and/or solaris sparc/x64



did anyone made the miracle and build a static tshark for linux and/or solaris sparc/x64? I tried with several times with different releases:

example with 1.4.0: [email protected]:/var/tmp/wireshark-1.4.0rc2$ ./configure --enable-tshark --disable-wireshark --with-krb5=no --with-portaudio=no --with-gnutls=no -with-gcrypt=no --enable-editcap=no --enable-dumpcap=yes --enable-capinfos=no --enable-mergecap=no --enable-text2pcap=no --disable-idl2wrs --disable-randpkt --enable-ipv6=no --enable-static --disable-shared

result: libtool: link: rm -f ".libs/tsharkS.c" ".libs/tshark.nm" ".libs/tshark.nmS" ".libs/tshark.nmT" libtool: link: gcc -DNEW_PACKET_LIST "-D_U_=attribute((unused))" -Wall -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wno-pointer-sign -Wcast-align -Wformat-security -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wl,--as-needed -o tshark -Wl,-static -static tshark-capture-pcap-util-unix.o tshark-capture-pcap-util.o tshark-cfile.o tshark-clopts_common.o tshark-disabled_protos.o tshark-packet-range.o tshark-print.o tshark-ps.o tshark-sync_pipe_write.o tshark-timestats.o tshark-util.o tshark-tap-megaco-common.o tshark-tap-rtp-common.o tshark-version_info.o tshark-capture_errs.o tshark-capture_ifinfo.o tshark-capture_ui_utils.o tshark-tap-afpstat.o tshark-tap-ansi_astat.o tshark-tap-bootpstat.o tshark-tap-camelcounter.o tshark-tap-camelsrt.o tshark-tap-comparestat.o tshark-tap-dcerpcstat.o tshark-tap-diameter-avp.o tshark-tap-funnel.o tshark-tap-gsm_astat.o tshark-tap-h225counter.o tshark-tap-h225rassrt.o tshark-tap-httpstat.o tshark-tap-iostat.o tshark-tap-iousers.o tshark-tap-mgcpstat.o tshark-tap-megacostat.o tshark-tap-protocolinfo.o tshark-tap-protohierstat.o tshark-tap-radiusstat.o tshark-tap-rpcstat.o tshark-tap-rpcprogs.o tshark-tap-rtp.o tshark-tap-sctpchunkstat.o tshark-tap-sipstat.o tshark-tap-smbsids.o tshark-tap-smbstat.o tshark-tap-stats_tree.o tshark-tap-sv.o tshark-tap-wspstat.o tshark-capture_opts.o tshark-capture_sync.o tshark-tempfile.o tshark-tshark-tap-register.o tshark-tshark.o .libs/tsharkS.o -Wl,--export-dynamic -L/usr/local/lib plugins/asn1/.libs/asn1.a plugins/docsis/.libs/docsis.a plugins/ethercat/.libs/ethercat.a plugins/giop/.libs/cosnaming.a plugins/giop/.libs/coseventcomm.a plugins/gryphon/.libs/gryphon.a plugins/interlink/.libs/interlink.a plugins/irda/.libs/irda.a plugins/m2m/.libs/m2m.a plugins/mate/.libs/mate.a plugins/opcua/.libs/opcua.a plugins/profinet/.libs/profinet.a plugins/sercosiii/.libs/sercosiii.a plugins/stats_tree/.libs/stats_tree.a plugins/unistim/.libs/unistim.a plugins/wimax/.libs/wimax.a wiretap/.libs/libwiretap.a epan/.libs/libwireshark.a /var/tmp/wireshark-1.4.0rc2/wiretap/.libs/libwiretap.a /var/tmp/wireshark-1.4.0rc2/wsutil/.libs/libwsutil.a wsutil/.libs/libwsutil.a /usr/lib/ -ldl /usr/lib/ -lm -lpcap -lz /usr/bin/ld: attempted static link of dynamic object /usr/lib/' collect2: ld returned 1 exit status libtool: link: rm -f ".libs/tsharkS.o" make[2]: *** [tshark] Error 1 make[2]: Leaving directory/var/tmp/wireshark-1.4.0rc2' make[1]: [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/wireshark-1.4.0rc2' make: [all] Error 2

cheers tim

asked 14 Sep '10, 09:40

jever's gravatar image

accept rate: 0%

edited 14 Sep '10, 10:11

Gerald%20Combs's gravatar image

Gerald Combs ♦♦

What does ls /usr/lib/libgmodule*.a say? It looks like you may not have a static version of GLib on your system.

(14 Sep '10, 10:16) Gerald Combs ♦♦

Yes, the latest attempt was just run on a debian, so the linking of the enviroment is dynamic. On my solaris I tried to compile a non dynamic version for glib and on top to compile wireshark code to get a tshark standalone. That one failed for some (many) reasons. The reason I ask: I saw once on the wireshark-dev this post "[email protected]/msg12615.html" and was asking myself if the static tshark is at all possible to be build... That's my question: is static tshark at all possible to be build or did this no one for a long time?

(14 Sep '10, 10:41) jever

If by "Yes, the latest attempt was just run on a debian, so the linking of the enviroment is dynamic." you mean that, on your Debian system, there are no static versions of GLib installed, then static linking of TShark (or Wireshark or anything else using GLib) will be impossible - "static" is all or nothing here.

If you do have static versions of all libraries installed on Solaris, then - unless Solaris doesn't have static versions of its own libraries - it might be possible to do static builds. Report this as a bug on; show all the build failures in the bug.

(15 Sep '10, 16:59) Guy Harris ♦♦