Wireshark-bugs: [Wireshark-bugs] [Bug 7829] version info lacks pcap lib version

Date: Tue, 9 Oct 2012 18:29:21 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7829

--- Comment #1 from Guy Harris <guy@xxxxxxxxxxxx> 2012-10-09 18:29:21 PDT ---
(In reply to comment #0)
> Build Information:
> /me just wonders, why libpcap hasn't version string in the "Compiled" section:

Because libpcap doesn't supply a string that is guaranteed to be the version of
libpcap on the system at compile time.  version[] might be it on *some*
platforms, but, on others, it's the version of libpcap with which you're
running.  To quote the comment on the checkin wherein I removed the version
info for libpcap from the "Compiled" message:

  ------------------------------------------------------------------------
  r40138 | guy | 2011-12-09 13:15:48 -0800 (Fri, 09 Dec 2011) | 7 lines

  Referring to pcap_version[] doesn't do what you want on at least some
  UN*Xes (Fedora 16 and probably other Linux distributions, probably at
  least some if not all other ELF-based systems, and perhaps also Mac OS
  X), and causes problems if pcap_version[] has a different length in the
  libpcap with which the executable was built and the libpcap with which
  it's run, so we avoid using it for now.

I might, just for fun, look at trying to have the libpcap configure script
generate pcap.h from pcap.h.in and stuff the contents of libpcap's VERSION file
into a #define; if I do that, then, at least when configured and built with
whatever released version has that or any later version, Wireshark can supply a
compile-time version of libpcap.

> BTW why is libz necessary during compile time ?

So that we can use it at run time?  In order to use it, we need the header for
it, as well as the .so/.dylib/.whatever file or .a file on UN*X, and the .lib
file and maybe .dll file on Windows.  The header file provides a version
string, so we know what version the configure script found, and thus what libz
capabilities it configured in.  The run-time string indicates what version it's
running with; if it's dynamically linked, and you're running on an OS that is
not actively hostile towards running binaries built with older versions of the
OS on newer versions of the OS :-), the "compiled with" and "running with"
versions could be different.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.