Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1542973

Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf

From Joe Stringer <joe@ovn.org>
Newsgroups linux.kernel
Subject Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf
Date 2016-12-15 19:40 +0100
Message-ID <sOJ6G-Ms-15@gated-at.bofh.it> (permalink)
References <sOqGK-6gP-9@gated-at.bofh.it> <sOqGK-6gP-11@gated-at.bofh.it> <sOGBP-7B0-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 15 December 2016 at 07:50, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Em Wed, Dec 14, 2016 at 02:43:39PM -0800, Joe Stringer escreveu:
>> Now that libbpf under tools/lib/bpf/* is synced with the version from
>> samples/bpf, we can get rid most of the libbpf library here.
>>
>> Signed-off-by: Joe Stringer <joe@ovn.org>
>> Cc: Alexei Starovoitov <ast@fb.com>
>> Cc: Daniel Borkmann <daniel@iogearbox.net>
>> Cc: Wang Nan <wangnan0@huawei.com>
>> Link: http://lkml.kernel.org/r/20161209024620.31660-6-joe@ovn.org
>> [ Use -I$(srctree)/tools/lib/ to support out of source code tree builds, as noticed by Wang Nan ]
>> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> So, right before this patch building samples/bpf works, then, after, it fails,
> investigating:
>
> [root@1e797fdfbf4f linux]# make -j4 O=/tmp/build/linux/ headers_install
> make[1]: Entering directory '/tmp/build/linux'
>   CHK     include/generated/uapi/linux/version.h
> make[1]: Leaving directory '/tmp/build/linux'
> [root@1e797fdfbf4f linux]# make -j4 O=/tmp/build/linux/ samples/bpf/
> make[1]: Entering directory '/tmp/build/linux'
>   CHK     include/config/kernel.release
>   GEN     ./Makefile
>   CHK     include/generated/uapi/linux/version.h
>   Using /git/linux as source for kernel
>   CHK     include/generated/utsrelease.h
>   CHK     include/generated/timeconst.h
>   CHK     include/generated/bounds.h
>   CHK     include/generated/asm-offsets.h
>   CALL    /git/linux/scripts/checksyscalls.sh
>   HOSTCC  samples/bpf/test_lru_dist.o
>   HOSTCC  samples/bpf/libbpf.o
>   HOSTCC  samples/bpf/sock_example.o
>   HOSTCC  samples/bpf/bpf_load.o
> In file included from /git/linux/samples/bpf/libbpf.c:12:0:
> /git/linux/samples/bpf/libbpf.h:5:21: fatal error: bpf/bpf.h: No such file or directory
>  #include <bpf/bpf.h>
>                      ^
> compilation terminated.
> In file included from /git/linux/samples/bpf/test_lru_dist.c:24:0:
> /git/linux/samples/bpf/libbpf.h:5:21: fatal error: bpf/bpf.h: No such file or directory
>  #include <bpf/bpf.h>
>                      ^
> compilation terminated.
> make[2]: *** [scripts/Makefile.host:124: samples/bpf/test_lru_dist.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[2]: *** [scripts/Makefile.host:124: samples/bpf/libbpf.o] Error 1
> In file included from /git/linux/samples/bpf/bpf_load.c:24:0:
> /git/linux/samples/bpf/libbpf.h:5:21: fatal error: bpf/bpf.h: No such file or directory
>  #include <bpf/bpf.h>
>                      ^
> compilation terminated.
> make[2]: *** [scripts/Makefile.host:124: samples/bpf/bpf_load.o] Error 1
> In file included from /git/linux/samples/bpf/sock_example.c:29:0:
> /git/linux/samples/bpf/libbpf.h:5:21: fatal error: bpf/bpf.h: No such file or directory
>  #include <bpf/bpf.h>
>                      ^
> compilation terminated.
> make[2]: *** [scripts/Makefile.host:124: samples/bpf/sock_example.o] Error 1
> make[1]: *** [/git/linux/Makefile:1659: samples/bpf/] Error 2
> make[1]: Leaving directory '/tmp/build/linux'
> make: *** [Makefile:150: sub-make] Error 2
> [root@1e797fdfbf4f linux]#

Sorry about that.

It looks like this fragment which ended up in "samples/bpf: Remove
perf_event_open() declaration" patch should be here instead:

diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index add514e2984a..9718f664fedf 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -108,6 +108,8 @@ always += xdp_tx_iptunnel_kern.o

HOSTCFLAGS += -I$(objtree)/usr/include
HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
+HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
+HOSTCFLAGS += -I$(srctree)/tools/perf

HOSTCFLAGS_bpf_load.o += -I$(objtree)/usr/include -Wno-unused-variable
HOSTLOADLIBES_fds_example += -lelf

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH perf/core REBASE 0/5] Reuse libbpf from samples/bpf Joe Stringer <joe@ovn.org> - 2016-12-15 00:00 +0100
  [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Joe Stringer <joe@ovn.org> - 2016-12-15 00:00 +0100
    Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-15 17:00 +0100
      Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-15 19:40 +0100
        Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-15 19:50 +0100
        Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-15 19:50 +0100
          Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Joe Stringer <joe@ovn.org> - 2016-12-15 23:10 +0100
            Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Joe Stringer <joe@ovn.org> - 2016-12-16 02:50 +0100
              Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-12-16 15:30 +0100
              Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-16 16:50 +0100
              Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 14:50 +0100
      Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Joe Stringer <joe@ovn.org> - 2016-12-15 19:40 +0100
        Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-15 20:10 +0100
  [PATCH perf/core REBASE 3/5] tools lib bpf: Add bpf_prog_{attach,detach} Joe Stringer <joe@ovn.org> - 2016-12-15 00:10 +0100
    Re: [PATCH perf/core REBASE 3/5] tools lib bpf: Add  bpf_prog_{attach,detach} Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 15:20 +0100
      Re: [PATCH perf/core REBASE 3/5] tools lib bpf: Add  bpf_prog_{attach,detach} Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 15:40 +0100
        Re: [PATCH perf/core REBASE 3/5] tools lib bpf: Add bpf_prog_{attach,detach} Joe Stringer <joe@ovn.org> - 2016-12-20 20:00 +0100
          Re: [PATCH perf/core REBASE 3/5] tools lib bpf: Add  bpf_prog_{attach,detach} Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-21 17:10 +0100
  [PATCH perf/core REBASE 4/5] samples/bpf: Remove perf_event_open() declaration Joe Stringer <joe@ovn.org> - 2016-12-15 00:10 +0100
  [PATCH perf/core REBASE 1/5] samples/bpf: Make samples more libbpf-centric Joe Stringer <joe@ovn.org> - 2016-12-15 00:10 +0100
    [tip:perf/urgent] samples/bpf: Make samples more libbpf-centric tip-bot for Joe Stringer <tipbot@zytor.com> - 2016-12-20 20:30 +0100
  [PATCH perf/core REBASE 5/5] samples/bpf: Move open_raw_sock to separate header Joe Stringer <joe@ovn.org> - 2016-12-15 00:10 +0100

csiph-web