linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf] samples: bpf: fix build error
@ 2020-05-11 11:32 Matteo Croce
  2020-05-11 20:32 ` Yonghong Song
  0 siblings, 1 reply; 3+ messages in thread
From: Matteo Croce @ 2020-05-11 11:32 UTC (permalink / raw)
  To: bpf, netdev
  Cc: linux-kernel, Alexei Starovoitov, Joe Stringer, Jakub Kicinski

GCC 10 is very strict about symbol clash, and lwt_len_hist_user contains
a symbol which clashes with libbpf:

/usr/bin/ld: samples/bpf/lwt_len_hist_user.o:(.bss+0x0): multiple definition of `bpf_log_buf'; samples/bpf/bpf_load.o:(.bss+0x8c0): first defined here
collect2: error: ld returned 1 exit status

bpf_log_buf here seems to be a leftover, so removing it.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
---
 samples/bpf/lwt_len_hist_user.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/samples/bpf/lwt_len_hist_user.c b/samples/bpf/lwt_len_hist_user.c
index 587b68b1f8dd..430a4b7e353e 100644
--- a/samples/bpf/lwt_len_hist_user.c
+++ b/samples/bpf/lwt_len_hist_user.c
@@ -15,8 +15,6 @@
 #define MAX_INDEX 64
 #define MAX_STARS 38
 
-char bpf_log_buf[BPF_LOG_BUF_SIZE];
-
 static void stars(char *str, long val, long max, int width)
 {
 	int i;
-- 
2.26.2


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

* Re: [PATCH bpf] samples: bpf: fix build error
  2020-05-11 11:32 [PATCH bpf] samples: bpf: fix build error Matteo Croce
@ 2020-05-11 20:32 ` Yonghong Song
  2020-05-14 19:39   ` Alexei Starovoitov
  0 siblings, 1 reply; 3+ messages in thread
From: Yonghong Song @ 2020-05-11 20:32 UTC (permalink / raw)
  To: Matteo Croce, bpf, netdev
  Cc: linux-kernel, Alexei Starovoitov, Joe Stringer, Jakub Kicinski



On 5/11/20 4:32 AM, Matteo Croce wrote:
> GCC 10 is very strict about symbol clash, and lwt_len_hist_user contains
> a symbol which clashes with libbpf:
> 
> /usr/bin/ld: samples/bpf/lwt_len_hist_user.o:(.bss+0x0): multiple definition of `bpf_log_buf'; samples/bpf/bpf_load.o:(.bss+0x8c0): first defined here
> collect2: error: ld returned 1 exit status
> 
> bpf_log_buf here seems to be a leftover, so removing it.
> 
> Signed-off-by: Matteo Croce <mcroce@redhat.com>

Acked-by: Yonghong Song <yhs@fb.com>

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

* Re: [PATCH bpf] samples: bpf: fix build error
  2020-05-11 20:32 ` Yonghong Song
@ 2020-05-14 19:39   ` Alexei Starovoitov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2020-05-14 19:39 UTC (permalink / raw)
  To: Yonghong Song
  Cc: Matteo Croce, bpf, Network Development, LKML, Alexei Starovoitov,
	Joe Stringer, Jakub Kicinski

On Mon, May 11, 2020 at 1:32 PM Yonghong Song <yhs@fb.com> wrote:
>
>
>
> On 5/11/20 4:32 AM, Matteo Croce wrote:
> > GCC 10 is very strict about symbol clash, and lwt_len_hist_user contains
> > a symbol which clashes with libbpf:
> >
> > /usr/bin/ld: samples/bpf/lwt_len_hist_user.o:(.bss+0x0): multiple definition of `bpf_log_buf'; samples/bpf/bpf_load.o:(.bss+0x8c0): first defined here
> > collect2: error: ld returned 1 exit status
> >
> > bpf_log_buf here seems to be a leftover, so removing it.
> >
> > Signed-off-by: Matteo Croce <mcroce@redhat.com>
>
> Acked-by: Yonghong Song <yhs@fb.com>

Applied to bpf tree. Thanks

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

end of thread, other threads:[~2020-05-14 19:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 11:32 [PATCH bpf] samples: bpf: fix build error Matteo Croce
2020-05-11 20:32 ` Yonghong Song
2020-05-14 19:39   ` Alexei Starovoitov

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).