lkml.org 
[lkml]   [2020]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.8 27/85] libbpf: Remove arch-specific include path in Makefile
    Date
    From: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

    [ Upstream commit 21e9ba5373fc2cec608fd68301a1dbfd14df3172 ]

    Ubuntu mainline builds for ppc64le are failing with the below error (*):
    CALL /home/kernel/COD/linux/scripts/atomic/check-atomics.sh
    DESCEND bpf/resolve_btfids

    Auto-detecting system features:
    ... libelf: [ [32mon[m ]
    ... zlib: [ [32mon[m ]
    ... bpf: [ [31mOFF[m ]

    BPF API too old
    make[6]: *** [Makefile:295: bpfdep] Error 1
    make[5]: *** [Makefile:54: /home/kernel/COD/linux/debian/build/build-generic/tools/bpf/resolve_btfids//libbpf.a] Error 2
    make[4]: *** [Makefile:71: bpf/resolve_btfids] Error 2
    make[3]: *** [/home/kernel/COD/linux/Makefile:1890: tools/bpf/resolve_btfids] Error 2
    make[2]: *** [/home/kernel/COD/linux/Makefile:335: __build_one_by_one] Error 2
    make[2]: Leaving directory '/home/kernel/COD/linux/debian/build/build-generic'
    make[1]: *** [Makefile:185: __sub-make] Error 2
    make[1]: Leaving directory '/home/kernel/COD/linux'

    resolve_btfids needs to be build as a host binary and it needs libbpf.
    However, libbpf Makefile hardcodes an include path utilizing $(ARCH).
    This results in mixing of cross-architecture headers resulting in a
    build failure.

    The specific header include path doesn't seem necessary for a libbpf
    build. Hence, remove the same.

    (*) https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9-rc3/ppc64el/log

    Reported-by: Vaidyanathan Srinivasan <svaidy@linux.ibm.com>
    Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: Andrii Nakryiko <andriin@fb.com>
    Link: https://lore.kernel.org/bpf/20200902084246.1513055-1-naveen.n.rao@linux.vnet.ibm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    tools/lib/bpf/Makefile | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
    index c820b0be9d637..9ae8f4ef0aac2 100644
    --- a/tools/lib/bpf/Makefile
    +++ b/tools/lib/bpf/Makefile
    @@ -59,7 +59,7 @@ FEATURE_USER = .libbpf
    FEATURE_TESTS = libelf libelf-mmap zlib bpf reallocarray
    FEATURE_DISPLAY = libelf zlib bpf

    -INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi
    +INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi
    FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)

    check_feat := 1
    --
    2.25.1


    \
     
     \ /
      Last update: 2020-10-05 17:38    [W:3.895 / U:1.328 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site