Re: Building tcpdump with static libraries
Guy Harris <guy <at> alum.mit.edu>
2012-05-28 18:47:54 GMT
On May 28, 2012, at 2:28 AM, Ajith Adapa wrote:
> I am currently building tcpdump on Ubuntu
Given the "libpcap.so.0.8", I suspected you were either using Debian or a Debian derivative such as Ubuntu.
> $ ./tcpdump -h
> tcpdump version 4.4.0-PRE_GIT_2012_05_28
OK, that's a *VERY* recent version (as indicated by the the "On May 28, 2012, at 2:28 AM" above and the
"2012_05_28" in the version string) of tcpdump - and it's from the Git trunk (or whatever it's called in
Git), given the "4.4.0-PRE_GIT_" in the version string.
> libpcap version 1.0.0
OK, that's presumably the shared library that came with the system.
> I even tried adding -static flag but I have got errors regarding dlopen and
Many UN*Xes make it difficult to link a program 100% statically. (Some make it *impossible*, by not
supplying a static version of the "system library" - the one usually called "libc", but called
"libSystem" on the UN*X with the largest desktop market share, that being one of the UN*Xes that does not
supply a static version of that library.)
One way in which it can be difficult to link a program 100% statically is that:
many UN*Xes have a plug-in architecture for routines such as getpwuid() and getpwnam(), so that support
for looking up user login names and user IDs can be configured to look in a local database, look up over the