* [PATCH bpf 0/1] runqslower: fix Makefile
@ 2020-01-30 2:09 Yulia Kartseva
2020-01-30 2:09 ` [PATCH bpf 1/1] " Yulia Kartseva
0 siblings, 1 reply; 4+ messages in thread
From: Yulia Kartseva @ 2020-01-30 2:09 UTC (permalink / raw)
To: bpf, hex, ast, daniel, netdev; +Cc: andriin
From: Julia Kartseva <hex@fb.com>
Fix undefined reference linker errors when building runqslower with
gcc 7.4.0 on Ubuntu 18.04.
The issue is with misplaced -lelf, -lz options in Makefile:
$(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@
-lelf, -lz options should follow the list of target dependencies:
$(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
or after substitution
cc -g -Wall runqslower.o libbpf.a -lelf -lz -o runqslower
The current order of gcc params causes failure in libelf symbols resolution,
e.g. undefined reference to `elf_memory'
Julia Kartseva (1):
runqslower: fix Makefile
tools/bpf/runqslower/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH bpf 1/1] runqslower: fix Makefile
2020-01-30 2:09 [PATCH bpf 0/1] runqslower: fix Makefile Yulia Kartseva
@ 2020-01-30 2:09 ` Yulia Kartseva
2020-01-30 2:37 ` Andrii Nakryiko
0 siblings, 1 reply; 4+ messages in thread
From: Yulia Kartseva @ 2020-01-30 2:09 UTC (permalink / raw)
To: bpf, hex, ast, daniel, netdev; +Cc: andriin
From: Julia Kartseva <hex@fb.com>
Fix undefined reference linker errors when building runqslower with
gcc 7.4.0 on Ubuntu 18.04.
The issue is with misplaced -lelf, -lz options in Makefile:
$(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@
-lelf, -lz options should follow the list of target dependencies:
$(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
or after substitution
cc -g -Wall runqslower.o libbpf.a -lelf -lz -o runqslower
The current order of gcc params causes failure in libelf symbols resolution,
e.g. undefined reference to `elf_memory'
---
tools/bpf/runqslower/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
index 0c021352b..87eae5be9 100644
--- a/tools/bpf/runqslower/Makefile
+++ b/tools/bpf/runqslower/Makefile
@@ -41,7 +41,7 @@ clean:
$(OUTPUT)/runqslower: $(OUTPUT)/runqslower.o $(BPFOBJ)
$(call msg,BINARY,$@)
- $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@
+ $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
$(OUTPUT)/runqslower.o: runqslower.h $(OUTPUT)/runqslower.skel.h \
$(OUTPUT)/runqslower.bpf.o
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH bpf 1/1] runqslower: fix Makefile
2020-01-30 2:09 ` [PATCH bpf 1/1] " Yulia Kartseva
@ 2020-01-30 2:37 ` Andrii Nakryiko
2020-01-30 2:38 ` Andrii Nakryiko
0 siblings, 1 reply; 4+ messages in thread
From: Andrii Nakryiko @ 2020-01-30 2:37 UTC (permalink / raw)
To: Yulia Kartseva
Cc: bpf, Alexei Starovoitov, Daniel Borkmann, Networking, Andrii Nakryiko
On Wed, Jan 29, 2020 at 6:10 PM Yulia Kartseva <hex@fb.com> wrote:
>
> From: Julia Kartseva <hex@fb.com>
>
> Fix undefined reference linker errors when building runqslower with
> gcc 7.4.0 on Ubuntu 18.04.
> The issue is with misplaced -lelf, -lz options in Makefile:
> $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@
>
> -lelf, -lz options should follow the list of target dependencies:
> $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
> or after substitution
> cc -g -Wall runqslower.o libbpf.a -lelf -lz -o runqslower
>
> The current order of gcc params causes failure in libelf symbols resolution,
> e.g. undefined reference to `elf_memory'
> ---
Thanks for fixing!
Just for the future, there is no need to create a cover letter for a
single patch.
Please also add Fixes tag like so:
Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf")
> tools/bpf/runqslower/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
> index 0c021352b..87eae5be9 100644
> --- a/tools/bpf/runqslower/Makefile
> +++ b/tools/bpf/runqslower/Makefile
> @@ -41,7 +41,7 @@ clean:
>
> $(OUTPUT)/runqslower: $(OUTPUT)/runqslower.o $(BPFOBJ)
> $(call msg,BINARY,$@)
> - $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@
> + $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
>
> $(OUTPUT)/runqslower.o: runqslower.h $(OUTPUT)/runqslower.skel.h \
> $(OUTPUT)/runqslower.bpf.o
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf 1/1] runqslower: fix Makefile
2020-01-30 2:37 ` Andrii Nakryiko
@ 2020-01-30 2:38 ` Andrii Nakryiko
0 siblings, 0 replies; 4+ messages in thread
From: Andrii Nakryiko @ 2020-01-30 2:38 UTC (permalink / raw)
To: Yulia Kartseva
Cc: bpf, Alexei Starovoitov, Daniel Borkmann, Networking, Andrii Nakryiko
On Wed, Jan 29, 2020 at 6:37 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Wed, Jan 29, 2020 at 6:10 PM Yulia Kartseva <hex@fb.com> wrote:
> >
> > From: Julia Kartseva <hex@fb.com>
> >
> > Fix undefined reference linker errors when building runqslower with
> > gcc 7.4.0 on Ubuntu 18.04.
> > The issue is with misplaced -lelf, -lz options in Makefile:
> > $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@
> >
> > -lelf, -lz options should follow the list of target dependencies:
> > $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
> > or after substitution
> > cc -g -Wall runqslower.o libbpf.a -lelf -lz -o runqslower
> >
> > The current order of gcc params causes failure in libelf symbols resolution,
> > e.g. undefined reference to `elf_memory'
> > ---
>
> Thanks for fixing!
>
> Just for the future, there is no need to create a cover letter for a
> single patch.
>
> Please also add Fixes tag like so:
>
> Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf")
Oh, and Signed-off-by is missing too, please add and respin v2.
With that, also add:
Acked-by: Andrii Nakryiko <andriin@fb.com>
>
> > tools/bpf/runqslower/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
> > index 0c021352b..87eae5be9 100644
> > --- a/tools/bpf/runqslower/Makefile
> > +++ b/tools/bpf/runqslower/Makefile
> > @@ -41,7 +41,7 @@ clean:
> >
> > $(OUTPUT)/runqslower: $(OUTPUT)/runqslower.o $(BPFOBJ)
> > $(call msg,BINARY,$@)
> > - $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@
> > + $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
> >
> > $(OUTPUT)/runqslower.o: runqslower.h $(OUTPUT)/runqslower.skel.h \
> > $(OUTPUT)/runqslower.bpf.o
> > --
> > 2.17.1
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-30 2:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 2:09 [PATCH bpf 0/1] runqslower: fix Makefile Yulia Kartseva
2020-01-30 2:09 ` [PATCH bpf 1/1] " Yulia Kartseva
2020-01-30 2:37 ` Andrii Nakryiko
2020-01-30 2:38 ` Andrii Nakryiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).