Netlink is Linux-specific and masked on other platforms. Wireshark compiles and works fine without (for me at least). Reproducible: Always
Created attachment 342374 [details, diff] add netlink use flag Patch ebuild to respect netlink USE flag and make dependency on libnl optional.
Comment on attachment 342374 [details, diff] add netlink use flag This alone would make it an automagic dependency.
libnl is not linked by wireshark at all afaict. Perhaps it looks like it does because wireshark links libpcap and you have USE=netlink on libpcap? Anyway it doesn't seem right to me to adjust deps here at all. Jer, if you don't see something I don't please close.
> This alone would make it an automagic dependency. wiresharks configure checks for libnl but doesn't require it and doesn't have a --enable-libnl. I'm on Mac OS X where there's no netlink and consequently, libnl fails to compile: In file included from attr.c:12: ../include/netlink-private/netlink.h:42:25: error: linux/types.h: No such file or directory In file included from ../include/netlink-private/netlink.h:46, from attr.c:12: ../include/linux/if_arp.h:26:29: error: linux/netdevice.h: No such file or directory So I need a way to tell the wireshark ebuild that I don't have and don't want libnl. > libnl is not linked by wireshark at all afaict. Perhaps it looks like it > does because wireshark links libpcap and you have USE=netlink on libpcap? No, I do not have USE="netlink" on libpcap: cat /usr/local/gentoo/var/db/pkg/net-libs/libpcap-1.3.0-r1/USE elibc_Darwin ipv6 kernel_Darwin prefix userland_GNU x64-macos This is because of: portage/profiles/base/use.mask:# netlink is a Linux-specific interface portage/profiles/base/use.mask:netlink portage/profiles/default/linux/use.mask:# netlink is a Linux-specific interface portage/profiles/default/linux/use.mask:-netlink I don't have it set anywhere else. Otherwise libpcap would require libnl the same way as wireshark: IUSE="bluetooth ipv6 netlink static-libs canusb" RDEPEND="bluetooth? ( net-wireless/bluez ) netlink? ( dev-libs/libnl:1.1 ) If wireshark doesn't link against libnl even with libnl installed and the USE flag activated, it's a different problem.
I have libnl on my system, I don't see it linked into wireshark. I am unable to replicate this issue.
Wireshark's configure script makes no mention of netlink or libnl. I'm not sure where your information is coming from but configure.in appears clean, and my wireshark isn't linked to libnl at all. Are you using 1.8.6 or some other version? Are you reporting this bug in the masked 1.9.1 release of wireshark?
> Are you reporting this bug in the masked 1.9.1 release of wireshark? Whoops, indeed I am. Sorry for not mentioning the version explicitly.
(In reply to comment #7) > > Are you reporting this bug in the masked 1.9.1 release of wireshark? > > Whoops, indeed I am. Sorry for not mentioning the version explicitly. This is an upstream issue, reported upstream. I'm sure it is trivial for anyone good at autotools to write a patch to allow --enable/--disable; I'm just not that guy.
Created attachment 342554 [details, diff] add --enable/disable-libnl configure option to wireshark-1.9.1
Created attachment 342558 [details, diff] explicitly disable libnl based on netlink USE flag when running configure I don't (yet) have an account for wireshark's bugzilla. Would you be willing to push this upstream?
(In reply to comment #4) > > This alone would make it an automagic dependency. > > wiresharks configure checks for libnl but doesn't require it and doesn't > have a --enable-libnl. I'm on Mac OS X where there's no netlink and > consequently, libnl fails to compile: Why is OS X relevant here? If you're building Wireshark on OS X, you: 1) make sure you have the relevant required or optional support libraries (either by hand or by using the handy macosx-setup.sh script) - libnl is *NOT* one of those support libraries; 2) ./configure; 3) make; 4) make install, if desired. None of those steps involve building or installing libnl. > So I need a way to tell the wireshark ebuild that I don't have and don't > want libnl. Yup. If ebuild supports OSes other than Linux, it has to have some way of dealing with programs that can use library XXX on OS YYY, and have more capabilities when using library XXX on OS YYY, but where OS ZZZ doesn't have library XXX and where the program thus wouldn't use library XXX on OS ZZZ.
(In reply to comment #9) > Created attachment 342554 [details, diff] [details, diff] > add --enable/disable-libnl configure option to wireshark-1.9.1 Forgive me but don't you need a --disable in this patch too?
> Forgive me but don't you need a --disable in this patch too? AC_ARG_ENABLE adds both.
(In reply to comment #13) > > Forgive me but don't you need a --disable in this patch too? > > AC_ARG_ENABLE adds both. Thanks for clarifying, submitted upstream, I'm also testing it now
Should be in 1.9.2 Patch on this bug was accepted by upstream
Thank you! Will I need to open a new bug for adjusting the =net-analyzer/wireshark-1.9.2 ebuild (once it comes out) to use this option or is this taken care of already? Since there seems to be some confusion as to why I need this, I want to clarify: I build wireshark on Mac OS X using prefix portage. So I do build wireshark using the Gentoo ebuild on a non-Linux system. Therefore I need a way to tell the ebuild, that I don't have, want or need libnl. Portage has all the infrastructure for that in place already: There's a USE="netlink", that's only ever enabled on Linux and nowhere else. The only thing I need is for the ebuild to respect that USE flag. Now I've learned that automagic dependencies are bad[tm]. That's a non-issue for Mac OS X since there never can be a libnl installed on it. But it's a problem for Linux systems which we have solved by providing a configure option for explictly disabling libnl support. This way nothing unexpected happens on a Linux system if libnl is installed but disabled by the user by disabling the netlink USE flag.
(In reply to comment #17) > Thank you! Will I need to open a new bug for adjusting the > =net-analyzer/wireshark-1.9.2 ebuild (once it comes out) to use this option > or is this taken care of already? I and the other maintainer of wireshark are both aware of this issue, one of us should take care of it when bumping the package. If we forget please feel free to open a new bug, but likely it will just be done.
Created attachment 344266 [details, diff] make dependency on libnl optional and non-automagic This apparantly didn't happen as envisioned. Attached the patch for the 1.9.2 ebuild. Please apply.
This shouldn't have been marked upstream if there was pending downstream work.
Fixed in 1.9.2.