Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 469176 - net-analyzer/wireshark with >net-libs/libpcap-1.4.0 could probably safely enable USE=netlink on both when libcap is built against dev-libs/libnl-3
Summary: net-analyzer/wireshark with >net-libs/libpcap-1.4.0 could probably safely ena...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on: 511502
Blocks: 510222
  Show dependency tree
 
Reported: 2013-05-09 12:44 UTC by Jeroen Roovers (RETIRED)
Modified: 2014-10-20 14:35 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2013-05-09 12:44:35 UTC
net-libs/libpcap-1.4.0 supports dev-libs/libnl-3 now, so we shouldn't see the segmentation faults in net-analyzerwireshark that currently happen when wireshark is linked against libnl-3 and libpcap is linked against libnl-1.

The current solution to preventing the segmentation faults is to depend on libpcap being built with USE=-netlink:

wireshark-1.10.0_rc1.ebuild :    pcap? ( net-libs/libpcap[-netlink] )

This is not ideal.

Now, without restricting build systems in any way, how do we enable this properly? I think the best way forward is to patch libpcap to not try for any libnl that happens to be installed, but to allow us (in configure) to pick a branch (1.1 or 3) so we can set USE flags for it and depend on those in wireshark ebuilds so we could set something like:

pcap? (
    || (
      <net-libs/libpcap-1.4.0[-netlink]
      >=net-libs/libpcap-1.4.0[netlink3]
    )
)

Obviously we need to fix libpcap first by adapting the configure script.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-09 12:46:26 UTC
More like this:

pcap? (
    || (
      <net-libs/libpcap-1.4.0[-netlink]
      >=net-libs/libpcap-1.4.0[-netlink11,netlink3=]
    )
)
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2013-05-11 17:27:19 UTC
Is it possible to build wireshark with libnl-1? If so, I'd better checked what version net-libs/libpcap is built with built with the same version wireshark. If this is not possible, then depend new version on >=net-libs/libpcap-1.4.0 and require libpcap be built only with netlink3 (die if that's not the case).

if $(readelf --dynamic /usr/lib64/libpcap.so | grep -q libnl.so.1); then
  die "libpcap is linked to libnl:1.1, rebuld libpcap with libnl:3"
fi
Comment 3 Rick Farina (Zero_Chaos) gentoo-dev 2013-05-12 14:45:01 UTC
Going to try to push symbol versioning upstream for libnl as it should fix this sort of issue (I'm told).  That way we don't have to randomly hack around the real problem.
Comment 4 Nikoli 2014-06-09 16:57:26 UTC
net-libs/libpcap-1.5.3 is now marked stable, tried building it with USE netlink enabled and rebuilding net-analyzer/wireshark-1.10.7 with both USE netlink and pcap enabled: wireshark did not crash.
I suggest changing dev-libs/libnl dep to dev-libs/libnl:3 in both libpcap and wireshark and revbumping them: then both sure will link to same libnl. Seems such solution is simplest and fastest.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-09 17:46:10 UTC
(In reply to Nikoli from comment #4)
> net-libs/libpcap-1.5.3 is now marked stable, tried building it with USE
> netlink enabled and rebuilding net-analyzer/wireshark-1.10.7 with both USE
> netlink and pcap enabled: wireshark did not crash.
> I suggest changing dev-libs/libnl dep to dev-libs/libnl:3 in both libpcap
> and wireshark and revbumping them: then both sure will link to same libnl.
> Seems such solution is simplest and fastest.

Agreed. But libpcap isn't stable _yet_ on 8 architectures.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-17 13:13:54 UTC
By the time bug #511502 is finally fixed, and we have a preference for libnl:3 in stable versions of both libpcap and wireshark, we might just do this:

Index: libpcap-1.5.3.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-libs/libpcap/libpcap-1.5.3.ebuild,v
retrieving revision 1.8
diff -u -B -p -r1.8 libpcap-1.5.3.ebuild
--- libpcap-1.5.3.ebuild        2 Aug 2014 11:27:58 -0000       1.8
+++ libpcap-1.5.3.ebuild        17 Aug 2014 13:06:52 -0000
@@ -18,7 +18,7 @@ IUSE="bluetooth dbus ipv6 netlink static
 RDEPEND="
        bluetooth? ( net-wireless/bluez )
        dbus? ( sys-apps/dbus )
-       netlink? ( dev-libs/libnl )
+       netlink? ( dev-libs/libnl:3 )
        canusb? ( virtual/libusb )
 "
 DEPEND="${RDEPEND}
Index: libpcap-1.6.1-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-libs/libpcap/libpcap-1.6.1-r1.ebuild,v
retrieving revision 1.3
diff -u -B -p -r1.3 libpcap-1.6.1-r1.ebuild
--- libpcap-1.6.1-r1.ebuild     16 Aug 2014 15:29:08 -0000      1.3
+++ libpcap-1.6.1-r1.ebuild     17 Aug 2014 13:06:52 -0000
@@ -18,7 +18,7 @@ IUSE="bluetooth dbus ipv6 netlink static
 RDEPEND="
        bluetooth? ( net-wireless/bluez:= )
        dbus? ( sys-apps/dbus )
-       netlink? ( dev-libs/libnl )
+       netlink? ( dev-libs/libnl:3 )
        canusb? ( virtual/libusb )
 "
 DEPEND="${RDEPEND}

Index: wireshark-1.10.9.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.10.9.ebuild,v
retrieving revision 1.9
diff -u -B -p -r1.9 wireshark-1.10.9.ebuild
--- wireshark-1.10.9.ebuild     10 Aug 2014 17:27:10 -0000      1.9
+++ wireshark-1.10.9.ebuild     17 Aug 2014 13:13:19 -0000
@@ -29,7 +29,7 @@ GTK_COMMON_DEPEND="
 "
 RDEPEND="
        >=dev-libs/glib-2.14:2
-       netlink? ( dev-libs/libnl )
+       netlink? ( dev-libs/libnl:3 )
        adns? ( >=net-dns/c-ares-1.5 )
        crypt? ( dev-libs/libgcrypt:0= )
        caps? ( sys-libs/libcap )
@@ -44,7 +44,7 @@ RDEPEND="
        )
        kerberos? ( virtual/krb5 )
        lua? ( >=dev-lang/lua-5.1 )
-       pcap? ( net-libs/libpcap[-netlink] )
+       pcap? ( net-libs/libpcap )
        portaudio? ( media-libs/portaudio )
        qt4? (  
                dev-qt/qtcore:4
Index: wireshark-1.12.0.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.12.0.ebuild,v
retrieving revision 1.1
diff -u -B -p -r1.1 wireshark-1.12.0.ebuild
--- wireshark-1.12.0.ebuild     4 Aug 2014 11:15:12 -0000       1.1
+++ wireshark-1.12.0.ebuild     17 Aug 2014 13:13:19 -0000
@@ -27,7 +27,7 @@ GTK_COMMON_DEPEND="
 "
 RDEPEND="
        >=dev-libs/glib-2.14:2
-       netlink? ( dev-libs/libnl )
+       netlink? ( dev-libs/libnl:3 )
        adns? ( >=net-dns/c-ares-1.5 )
        crypt? ( dev-libs/libgcrypt:0 )
        caps? ( sys-libs/libcap )
@@ -38,7 +38,7 @@ RDEPEND="
        )
        kerberos? ( virtual/krb5 )
        lua? ( >=dev-lang/lua-5.1 )
-       pcap? ( net-libs/libpcap[-netlink] )
+       pcap? ( net-libs/libpcap )
        portaudio? ( media-libs/portaudio )
        qt4? (  
                dev-qt/qtcore:4
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-16 21:59:31 UTC
Committed, awaiting resolution of bug #511502 through bug #522968.