All of lore.kernel.org
 help / color / mirror / Atom feed
* BPF selftests build failures
@ 2020-07-20  8:09 Christoph Hellwig
  2020-07-20 20:41 ` Alexei Starovoitov
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2020-07-20  8:09 UTC (permalink / raw)
  To: Shuah Khan, Alexei Starovoitov, Daniel Borkmann; +Cc: bpf

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

Hi BPF and selftest maintainers.  I get a very strange failure
when trying to build the bpf selftests on current net-next master:

hch@brick:~/work/linux/tools/testing/selftests/bpf$ make
  GEN      vmlinux.h
Error: failed to load BTF from /home/hch/work/linux/vmlinux: No such file or directory
make: *** [Makefile:187: /home/hch/work/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h]
Error 2
make: *** Deleting file '/home/hch/work/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h'

But vmlinux obviously exists:

hch@brick:~/work/linux/tools/testing/selftests/bpf$ ls -l ~/work/linux/vmlinux
-rwxr-xr-x 1 hch hch 628909168 Jul 20 09:48 /home/hch/work/linux/vmlinux

.config attached.

[-- Attachment #2: .config.gz --]
[-- Type: application/x-gzip, Size: 37936 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BPF selftests build failures
  2020-07-20  8:09 BPF selftests build failures Christoph Hellwig
@ 2020-07-20 20:41 ` Alexei Starovoitov
  2020-07-21  2:54   ` David Ahern
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alexei Starovoitov @ 2020-07-20 20:41 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Shuah Khan, Alexei Starovoitov, Daniel Borkmann, bpf

On Mon, Jul 20, 2020 at 10:09:43AM +0200, Christoph Hellwig wrote:
> Hi BPF and selftest maintainers.  I get a very strange failure
> when trying to build the bpf selftests on current net-next master:
> 
> hch@brick:~/work/linux/tools/testing/selftests/bpf$ make
>   GEN      vmlinux.h
> Error: failed to load BTF from /home/hch/work/linux/vmlinux: No such file or directory

That's bpftool complaining that BTF is not present in vmlinux.
You need CONFIG_DEBUG_INFO_BTF=y and pahole >= v1.16
You also need llvm 10 to build bpf progs.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BPF selftests build failures
  2020-07-20 20:41 ` Alexei Starovoitov
@ 2020-07-21  2:54   ` David Ahern
  2020-07-21  5:24   ` Christoph Hellwig
  2020-07-21  7:04   ` Christoph Hellwig
  2 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2020-07-21  2:54 UTC (permalink / raw)
  To: Alexei Starovoitov, Christoph Hellwig
  Cc: Shuah Khan, Alexei Starovoitov, Daniel Borkmann, bpf

On 7/20/20 2:41 PM, Alexei Starovoitov wrote:
> On Mon, Jul 20, 2020 at 10:09:43AM +0200, Christoph Hellwig wrote:
>> Hi BPF and selftest maintainers.  I get a very strange failure
>> when trying to build the bpf selftests on current net-next master:
>>
>> hch@brick:~/work/linux/tools/testing/selftests/bpf$ make
>>   GEN      vmlinux.h
>> Error: failed to load BTF from /home/hch/work/linux/vmlinux: No such file or directory
> 
> That's bpftool complaining that BTF is not present in vmlinux.
> You need CONFIG_DEBUG_INFO_BTF=y and pahole >= v1.16
> You also need llvm 10 to build bpf progs.
> 

These never ending bumps to required versions to build kernels and bpf
code are not friendly to users. Until a recent commit I was able to use
Ubuntu 20.04 for bpf development and testing (e.g., the recent devmap
changes). Ubuntu 20.04 is an LTS OS released just 3 months ago with
pahole 1.15 and llvm 10. Now with v5.8-next 20.04 is out of date.

These hard requirements are making BTF inaccessible to average users by
*requiring* them to constantly chase new build versions. At this point I
can no longer point potential BPF/XDP users to this latest OS and say
try it out. Any instructions I write for getting started will be out of
date in some arbitrarily short period of time.

Worst, it is not even feature based within BTF; it is all or nothing.
ie., try to use 5.8-next with Ubuntu 20.04 and you lose all of BTF for
all use cases, not just some recently added feature.

If you want people to adopt this tech, you need to make it easier to use.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BPF selftests build failures
  2020-07-20 20:41 ` Alexei Starovoitov
  2020-07-21  2:54   ` David Ahern
@ 2020-07-21  5:24   ` Christoph Hellwig
  2020-07-21  7:04   ` Christoph Hellwig
  2 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2020-07-21  5:24 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: Christoph Hellwig, Shuah Khan, Alexei Starovoitov, Daniel Borkmann, bpf

On Mon, Jul 20, 2020 at 01:41:52PM -0700, Alexei Starovoitov wrote:
> On Mon, Jul 20, 2020 at 10:09:43AM +0200, Christoph Hellwig wrote:
> > Hi BPF and selftest maintainers.  I get a very strange failure
> > when trying to build the bpf selftests on current net-next master:
> > 
> > hch@brick:~/work/linux/tools/testing/selftests/bpf$ make
> >   GEN      vmlinux.h
> > Error: failed to load BTF from /home/hch/work/linux/vmlinux: No such file or directory
> 
> That's bpftool complaining that BTF is not present in vmlinux.
> You need CONFIG_DEBUG_INFO_BTF=y and pahole >= v1.16
> You also need llvm 10 to build bpf progs.

That's not a very useful error message then.  Can you fix it to
tell people what is wrong?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BPF selftests build failures
  2020-07-20 20:41 ` Alexei Starovoitov
  2020-07-21  2:54   ` David Ahern
  2020-07-21  5:24   ` Christoph Hellwig
@ 2020-07-21  7:04   ` Christoph Hellwig
  2 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2020-07-21  7:04 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: Christoph Hellwig, Shuah Khan, Alexei Starovoitov, Daniel Borkmann, bpf

On Mon, Jul 20, 2020 at 01:41:52PM -0700, Alexei Starovoitov wrote:
> On Mon, Jul 20, 2020 at 10:09:43AM +0200, Christoph Hellwig wrote:
> > Hi BPF and selftest maintainers.  I get a very strange failure
> > when trying to build the bpf selftests on current net-next master:
> > 
> > hch@brick:~/work/linux/tools/testing/selftests/bpf$ make
> >   GEN      vmlinux.h
> > Error: failed to load BTF from /home/hch/work/linux/vmlinux: No such file or directory
> 
> That's bpftool complaining that BTF is not present in vmlinux.
> You need CONFIG_DEBUG_INFO_BTF=y and pahole >= v1.16
> You also need llvm 10 to build bpf progs.

Oh well, after the non-obvious enabling of CONFIG_DEBUG_INFO_BTF
I did run into the too old clang (clang 9) as well, which just
creates random errors instead of warning about a too old compiler,
sight.

Then I installed clang-10, but there still seem to be various
failures in the net-next baseline, and the setsockopt code I'm
trying to test doesn't even get exercised from sticking a printk
in there.

That is not a great testcase experience..

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-21  7:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  8:09 BPF selftests build failures Christoph Hellwig
2020-07-20 20:41 ` Alexei Starovoitov
2020-07-21  2:54   ` David Ahern
2020-07-21  5:24   ` Christoph Hellwig
2020-07-21  7:04   ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.