[PATCH bpf] bpf: samples/sockmap fix Makefile for build error

Subsystems: the rest

STALE3140d

3 messages, 3 authors, 2018-02-14 · open the first message on its own page

[PATCH bpf] bpf: samples/sockmap fix Makefile for build error

From: Prashant Bhole <hidden>
Date: 2018-02-13 04:44:33

While building samples/sockmap, undefined reference error is thrown
for `nla_dump_errormsg'.
Linking tools/lib/bpf/nlattr.o as a fix 

Signed-off-by: Prashant Bhole <redacted>
---
 samples/sockmap/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/sockmap/Makefile b/samples/sockmap/Makefile
index 73f1da4d116c..9bf2881bd11b 100644
--- a/samples/sockmap/Makefile
+++ b/samples/sockmap/Makefile
@@ -2,7 +2,7 @@
 hostprogs-y := sockmap
 
 # Libbpf dependencies
-LIBBPF := ../../tools/lib/bpf/bpf.o
+LIBBPF := ../../tools/lib/bpf/bpf.o ../../tools/lib/bpf/nlattr.o
 
 HOSTCFLAGS += -I$(objtree)/usr/include
 HOSTCFLAGS += -I$(srctree)/tools/lib/
-- 
2.13.6

Re: [PATCH bpf] bpf: samples/sockmap fix Makefile for build error

From: Alexei Starovoitov <hidden>
Date: 2018-02-14 01:48:50

On Tue, Feb 13, 2018 at 01:42:49PM +0900, Prashant Bhole wrote:
While building samples/sockmap, undefined reference error is thrown
for `nla_dump_errormsg'.
Linking tools/lib/bpf/nlattr.o as a fix 

Signed-off-by: Prashant Bhole <redacted>
Applied to bpf-next, thanks Prashant!

Re: [PATCH bpf] bpf: samples/sockmap fix Makefile for build error

From: John Fastabend <john.fastabend@gmail.com>
Date: 2018-02-14 02:26:55

On 02/13/2018 05:48 PM, Alexei Starovoitov wrote:
On Tue, Feb 13, 2018 at 01:42:49PM +0900, Prashant Bhole wrote:
quoted
While building samples/sockmap, undefined reference error is thrown
for `nla_dump_errormsg'.
Linking tools/lib/bpf/nlattr.o as a fix 

Signed-off-by: Prashant Bhole <redacted>
Applied to bpf-next, thanks Prashant!
Thanks!

Acked-by: John Fastabend <john.fastabend@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help