Skip to contentSkip to conversation

libbpf: minor packaging fixes

PATCH In review Björn Töpel 2 participants 5 messages Mar 27, 2019 – Mar 28, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover libbpf: minor packaging fixes

The DPDK project is moving forward with its AF_XDP PMD, and during that process some libbpf issues surfaced [1].

This series address two, minor, packaging issues for libbpf. The header file xsk.h was missing from the instal_headers target and libelf was not included in the libbpf.so (shared library) build.

Thanks,
Björn

[1] https://patches.dpdk.org/patch/50704/#93571

Björn Töpel (2):
libbpf: add xsk.h to install_headers target
libbpf: add libelf dependency to shared library build

 tools/lib/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/2 libbpf: add xsk.h to install_headers target

From: Björn Töpel <[email protected]>

The xsk.h header file was missing from the insteall_headers target in the Makefile. This patch simply adds xsk.h to the set of installed headers.

Fixes 1cad07884239 ("libbpf: add support for using AF_XDP sockets")
---
 tools/lib/bpf/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/lib/bpf/Makefile +1 -0
index 5bf8e52c41fc..279589c29983 100644
@@ -222,6 +222,7 @@ install_headers:
 		$(call do_install,bpf.h,$(prefix)/include/bpf,644); \
 		$(call do_install,libbpf.h,$(prefix)/include/bpf,644);
 		$(call do_install,btf.h,$(prefix)/include/bpf,644);
+		$(call do_install,xsk.h,$(prefix)/include/bpf,644);
 
 install: install_lib
 
Signature · 1 line
2.19.1
#2 lore raw

PATCH 2/2 libbpf: add libelf dependency to shared library build

In reply to Björn Töpel

From: Björn Töpel <[email protected]>

When libbpf was built was a shared library, libelf was not included in the linking phase. Since libelf is an internal depedency to libbpf, libeld should be included. This patch adds '-lelf' to resolve that.

Fixes 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature check")
---
 tools/lib/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/Makefile +1 -1
index 279589c29983..7beec4d5b522 100644
@@ -177,7 +177,7 @@ $(OUTPUT)libbpf.so: $(OUTPUT)libbpf.so.$(LIBBPF_VERSION)
 
 $(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(BPF_IN)
 	$(QUIET_LINK)$(CC) --shared -Wl,-soname,libbpf.so.$(VERSION) \
-				    -Wl,--version-script=$(VERSION_SCRIPT) $^ -o $@
+				    -Wl,--version-script=$(VERSION_SCRIPT) $^ -lelf -o $@
 	@ln -sf $(@F) $(OUTPUT)libbpf.so
 	@ln -sf $(@F) $(OUTPUT)libbpf.so.$(VERSION)
 
Signature · 1 line
2.19.1
maintainer
#3 lore raw
In reply to Björn Töpel
Quoted 2 lines · Björn Töpel

The DPDK project is moving forward with its AF_XDP PMD, and during that process some libbpf issues surfaced [1].

Great to hear!

Quoted 8 lines

This series address two, minor, packaging issues for libbpf. The header file xsk.h was missing from the instal_headers target and libelf was not included in the libbpf.so (shared library) build.

Thanks,
Björn

Quoted 9 lines

[1] https://patches.dpdk.org/patch/50704/#93571

Björn Töpel (2):
libbpf: add xsk.h to install_headers target
libbpf: add libelf dependency to shared library build

 tools/lib/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Looks good, applied, thanks (also fixed up various typos in the commit message while applying).

#4 lore raw
Quoted 21 lines · Daniel Borkmann
Quoted 2 lines · Björn Töpel

The DPDK project is moving forward with its AF_XDP PMD, and during that process some libbpf issues surfaced [1].

Great to hear!

Quoted 14 lines

This series address two, minor, packaging issues for libbpf. The header file xsk.h was missing from the instal_headers target and libelf was not included in the libbpf.so (shared library) build.

Thanks,
Björn

[1] https://patches.dpdk.org/patch/50704/#93571

Björn Töpel (2):
libbpf: add xsk.h to install_headers target
libbpf: add libelf dependency to shared library build

Quoted 6 lines
Quoted 3 lines
 tools/lib/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Looks good, applied, thanks (also fixed up various typos in the commit message while applying).

Thank you for fixing the typos!