https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15713

--- Comment #8 from Guy Harris <g...@alum.mit.edu> ---
> It looks like all of dumpcap, tshark and wireshark link to caputils which
> links to various netlink libraries. Hopefully that should be sufficient then
> for libpcap.

And if it isn't, we may have to use pcap-config.

> Wireshark does not use DBus directly, but it is used indirectly through Qt.
> Not all Linux distributions enable DBus support though.

"Enable DBus" in Qt, or "enable DBus" in libpcap?

In either case, for dynamic linking, that shouldn't be an issue, at least not
on UN*X (see below), but for *static* linking, you'd have to find out what
libraries the static libraries with which you're linking require, and link with
them.  Fortunately, it should be OK to statically link with DBus libraries
twice, if static Qt and static libpcap both require them.

> > If pkg_search_module() doesn't try using pcap-config if it doesn't find a
> > .pc file, it's insufficient for handling libpcap; libpcap only recently
> > added .pc files. (Remember, not every UN*X has pkg-config!  That may
> > happen eventually, given, among other things, the BSD-licensed
> > pkg-config developed by the OpenBSD people, but it's not the case *now*.)
> 
> So far we have survived without calling pcap-config, the libpcap maintainers
> do not make it especially hard to find libraries and headers :)

The trick here isn't finding the *libpcap* libraries and headers, the trick is
finding the libraries that libpcap uses.

That's relatively easy for dynamically-linked libraries on UN*X; for most UN*X
dynamically-linked library mechanisms, if, when you build a dynamically-linked
library, you link it with another dynamically-linked library, then, if, when yo
build an executable, you link it with the dynamically-linked library you built,
it will, when run, automatically pick up whatever additional dynamically-linked
libraries the dynamically-linked library in question requires, even if that set
is different from the set required by the version you built it with.  (That's
one reason *why* they do that - libXXX can be changed to use libYYY without a
requirement for new libraries to be loaded disrupting programs built with
libXXX.)

It's not so easy for statically-linked libraries; I don't know whether Windows
dynamically-linked libraries have the same transitive dependencies.

> If detection fails for whatever reason, the user can manually set
> PCAP_LIBRARIES and PCAP_INCLUDE_DIRS, and report a bug for us to look at.

...and we may end up fixing it by using pcap-compile (which is what the libpcap
maintainers provide to find out what libraries you need in addition to libpcap
when doing a static build).

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to