Thread (7 messages) 7 messages, 6 authors, 2019-10-31

Re: Compile build issues with samples/bpf/ again

From: Jesper Dangaard Brouer <hidden>
Date: 2019-10-30 11:06:12
Also in: bpf

On Wed, 30 Oct 2019 11:53:21 +0100
Björn Töpel [off-list ref] wrote:
On Wed, 30 Oct 2019 at 11:43, Jesper Dangaard Brouer [off-list ref] wrote:
quoted
Hi Maintainers,

It is annoy to experience that simply building kernel tree samples/bpf/
is broken as often as it is.  Right now, build is broken in both DaveM
net.git and bpf.git.  ACME have some build fixes queued from Björn
Töpel. But even with those fixes, build (for samples/bpf/task_fd_query_user.c)
are still broken, as reported by Eric Sage (15 Oct), which I have a fix for.
 
Hmm, something else than commit e55190f26f92 ("samples/bpf: Fix build
for task_fd_query_user.c")?
I see, you already fixed this... and it is in the bpf.git tree.

Then we only need your other fixes from ACME's tree.  I just cloned a
fresh version of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
to check that 'make M=samples/bpf' still fails.

quoted
Could maintainers add building samples/bpf/ to their build test scripts?
(make headers_install && make M=samples/bpf)

Also I discovered, the command to build have also recently changed:
- Before : make samples/bpf/   or  simply make in subdir samples/bpf/
- new cmd: make M=samples/bpf  and in subdir is broken

Anyone knows what commit introduced this change?
(I need it for a fixes tag, when updating README.rst doc)
The make cmdline change is confusing, because the old command
'make samples/bpf/' reports success (remember last '/') ... this could
be why maintainers are not catching this.

See: old make cmd

 $ touch samples/bpf/*kern.c
 $ make samples/bpf/
   CALL    scripts/checksyscalls.sh
   CALL    scripts/atomic/check-atomics.sh
   DESCEND  objtool
 $


New make cmd fails:

$ make M=samples/bpf
samples/bpf/Makefile:209: WARNING: Detected possible issues with include path.
samples/bpf/Makefile:210: WARNING: Please install kernel headers locally (make headers_install).
  AR      samples/bpf/built-in.a
make -C /home/hawk/git/kernel/bpf/samples/bpf/../../tools/lib/bpf/ RM='rm -rf' LDFLAGS= srctree=/home/hawk/git/kernel/bpf/samples/bpf/../../ O=
  HOSTCC  samples/bpf/test_lru_dist
  HOSTCC  samples/bpf/sock_example
  HOSTCC  samples/bpf/fds_example.o
  HOSTLD  samples/bpf/fds_example
  HOSTCC  samples/bpf/sockex1_user.o
  HOSTLD  samples/bpf/sockex1
  HOSTCC  samples/bpf/sockex2_user.o
  HOSTLD  samples/bpf/sockex2
  HOSTCC  samples/bpf/bpf_load.o
  HOSTCC  samples/bpf/sockex3_user.o
  HOSTLD  samples/bpf/sockex3
/usr/bin/ld: samples/bpf/bpf_load.o: in function `do_load_bpf_file.part.2':
bpf_load.c:(.text+0x91a): undefined reference to `test_attr__enabled'
/usr/bin/ld: bpf_load.c:(.text+0x1403): undefined reference to `test_attr__open'
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/Makefile.host:116: samples/bpf/sockex3] Error 1
make: *** [Makefile:1649: samples/bpf] Error 2

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help