|Main Archive Page > Month Archives > wireshark-dev archives|
On at least some platforms, you can't build 100% statically-linked programs:
ProductName: Mac OS X
$ cat iefbr14.c
$ gcc -static -o iefbr14 iefbr14.c
ld: library not found for -lcrt0.o
collect2: ld returned 1 exit status
and, on others, you might be able to do so, but there's no guarantee that they'll work on any version of the OS other than the one on which you built it (if Solaris even allows it at all, it doesn't make any such guarantee).
I don't know whether you can build it statically on *any* UN*X and have plugin support - I tried it on Linux (Ubuntu 9, as I remember) and it didn't build with plugin support left enabled. A 100% statically-linked binary, on most if not all UN*Xes, doesn't use the run-time linker and doesn't make it available, so you don't get to use the run-time-linking APIs.
Is there *any* platform on which you can build a 100% statically-linked Wireshark or TShark *and* have support for plugins? If not, there's probably not much point in leaving in any support for it.
(I suspect most people who want a "statically-linked" Wireshark or TShark only care about libraries that aren't present on the platform on which they'll be deploying it, and are fine with dynamically linking to libc/libSystem/whatever your OS calls the bottommost system library. Unfortunately, I don't think the auto*/libtool stuff understands the notion of a "mostly static binary" - it's all or nothing.)
Sent via: Wireshark-dev mailing list <email@example.com>