Package: bpfcc-tools
Version: 0.2.0-1
Severity: grave
Tags: newcomer
Justification: renders package unusable

Dear Maintainer,

Trying to run binaries after installing bpfcc-tools ends up in an error like 
the following:

# tcpconnect 
In file included from <built-in>:317:
<command line>:5:10: fatal error: './include/linux/kconfig.h' file not found
#include "./include/linux/kconfig.h"
         ^
1 error generated.
Traceback (most recent call last):
  File "/usr/sbin/tcpconnect", line 207, in <module>
    b = BPF(text=bpf_text)
  File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 197, in __init__
    raise Exception("Failed to compile BPF module %s" % src_file)
Exception: Failed to compile BPF module 

The fix for this is already upstream and one needs to change the debian/rules 
file:

-   dh_auto_configure -- -DREVISION_LAST=$(UPSTREAM_VERSION) 
-DREVISION=$(UPSTREAM_VERSION) -DLLVM_DEFINITIONS="-D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+   dh_auto_configure -- -DREVISION_LAST=$(UPSTREAM_VERSION) 
-DREVISION=$(UPSTREAM_VERSION) -DLLVM_DEFINITIONS="-D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" 
-DBCC_KERNEL_HAS_SOURCE_DIR=1

The fix is documented here:
https://github.com/dkronst/bcc/commit/3e2f9d9d6250d3f8a076bbf1a953cf4f0d21f75a

After applying the change in debian/rules and rebuilding the package the 
binaries work:

# tcpconnect 
In file included from /virtual/main.c:3:
In file included from include/net/sock.h:51:
In file included from include/linux/netdevice.h:38:
In file included from include/linux/dmaengine.h:20:
In file included from include/linux/device.h:24:
In file included from include/linux/pinctrl/devinfo.h:21:
In file included from include/linux/pinctrl/consumer.h:17:
In file included from include/linux/seq_file.h:10:
include/linux/fs.h:2686:9: warning: comparison of unsigned enum
      expression < 0 is always false [-Wtautological-compare]
        if (id < 0 || id >= READING_MAX_ID)
            ~~ ^ ~
1 warning generated.
PID    COMM         IP SADDR            DADDR            DPORT
3805   Chrome_IOThr 4  10.20.10.1     1.2.3.4            443 

The following might also be a fix for the issue but I haven't tested it yet
https://github.com/iovisor/bcc/pull/701/files


-- System Information:
Debian Release: 8.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (400, 'unstable'), 
(400, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bpfcc-tools depends on:
ii  python-bpfcc    0.2.0-1
ii  python-netaddr  0.7.12-2
pn  python:any      <none>

bpfcc-tools recommends no packages.

bpfcc-tools suggests no packages.

-- no debconf information

Reply via email to