BPF List
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: BPF-dev-list <bpf@vger.kernel.org>, Song Liu <songliubraving@fb.com>
Cc: brouer@redhat.com, Daniel Borkmann <borkmann@iogearbox.net>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Andrii Nakryiko <andriin@fb.com>, Yonghong Song <yhs@fb.com>
Subject: Build errors in tools/testing/selftests/bpf/ at 046cc3dd9a25
Date: Fri, 3 Jul 2020 16:38:37 +0200	[thread overview]
Message-ID: <20200703163837.0611d26a@carbon> (raw)

Hi Song,

I' getting this compile error in tools/testing/selftests/bpf/ on
bpf-next git tree with HEAD 046cc3dd9a25 ("bpf: Fix build without
CONFIG_STACKTRACE"):

 $ pwd
 /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf
 $ make 
 Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h'
 Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
   INSTALL  headers
   GEN-SKEL [test_progs] bpf_iter_task_stack.skel.h
 libbpf: invalid relo for 'entries' in special section 0xfff2; forgot to initialize global var?..
 Error: failed to open BPF object file: 0
 make: *** [Makefile:372: /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/bpf_iter_task_stack.skel.h] Error 255
 make: *** Deleting file '/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/bpf_iter_task_stack.skel.h'


If I revert c7568114bc56 ("selftests/bpf: Add bpf_iter test with
bpf_get_task_stack()") (Author: Song Liu) then it compiles again.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

More details:

$ clang --version
clang version 10.0.0 (https://github.com/llvm/llvm-project.git 90c78073f73eac58f4f8b4772a896dc8aac023bc)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

 llc --version
LLVM (http://llvm.org/):
  LLVM version 10.0.0git
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: ivybridge

  Registered Targets:
    bpf    - BPF (host endian)
    bpfeb  - BPF (big endian)
    bpfel  - BPF (little endian)
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64


make V=1
(clang  -g -D__TARGET_ARCH_x86 -mlittle-endian -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/tools/include -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf -I/home/jbrouer/git/kernel/bpf-next/tools/include/uapi -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/local/stow/llvm-10.0.0-rc2/lib/clang/10.0.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types -O2 -target bpf -emit-llvm -c progs/bpf_iter_task_stack.c -o - || echo "BPF obj compilation failed") | llc -mattr=dwarfris -march=bpf -mcpu=v3  -mattr=+alu32 -filetype=obj -o /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/bpf_iter_task_stack.o

/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/tools/sbin/bpftool gen skeleton /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/bpf_iter_task_stack.o > /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/bpf_iter_task_stack.skel.h
libbpf: invalid relo for 'entries' in special section 0xfff2; forgot to initialize global var?..
Error: failed to open BPF object file: 0
make: *** [Makefile:372: /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/bpf_iter_task_stack.skel.h] Error 255
make: *** Deleting file '/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/bpf_iter_task_stack.skel.h'


             reply	other threads:[~2020-07-03 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 14:38 Jesper Dangaard Brouer [this message]
2020-07-03 18:09 ` Build errors in tools/testing/selftests/bpf/ at 046cc3dd9a25 Song Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200703163837.0611d26a@carbon \
    --to=brouer@redhat.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andriin@fb.com \
    --cc=borkmann@iogearbox.net \
    --cc=bpf@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox