bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Building bpftool with OUTPUT set breaks
@ 2019-07-18 13:59 Lorenz Bauer
  2019-07-18 14:20 ` [PATCH bpf] tools/bpf: fix bpftool build with OUTPUT set Ilya Leoshkevich
  0 siblings, 1 reply; 7+ messages in thread
From: Lorenz Bauer @ 2019-07-18 13:59 UTC (permalink / raw)
  To: bpf

Hello,

On 5.2 and current bpf-next, the following fails:

$ make -C tools/bpf/bpftool OUTPUT=/tmp/tmp.NUSttIbAYw/
make: Entering directory '/home/lorenz/dev/bpf-next/tools/bpf/bpftool'

Auto-detecting system features:
...                        libbfd: OFF
...        disassembler-four-args: OFF

  CC       /tmp/tmp.NUSttIbAYw/map_perf_ring.o
<snip>
  CC       /tmp/tmp.NUSttIbAYw/disasm.o
make[1]: Entering directory '/home/lorenz/dev/bpf-next/tools/lib/bpf'

Auto-detecting system features:
...                        libelf: on
...                           bpf: on

  CC       /tmp/tmp.NUSttIbAYw/libbpf.o
<snip>
  CC       /tmp/tmp.NUSttIbAYw/btf_dump.o
  LD       /tmp/tmp.NUSttIbAYw/libbpf-in.o
  LINK     /tmp/tmp.NUSttIbAYw/libbpf.a
make[1]: Leaving directory '/home/lorenz/dev/bpf-next/tools/lib/bpf'
  LINK     /tmp/tmp.NUSttIbAYw/bpftool
/usr/bin/ld: /tmp/tmp.NUSttIbAYw/libbpf.a(libbpf-in.o): in function `do_btf':
(.text+0x105b0): multiple definition of `do_btf';
/tmp/tmp.NUSttIbAYw/btf.o:btf.c:(.text+0x11f0): first defined here
<snip>

I think the problem is that objects for both bpftool and libbpf end up
in the same directory
if OUTPUT is set. Does anybody know how to fix this?

Best
Lorenz

-- 
Lorenz Bauer  |  Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK

www.cloudflare.com

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

end of thread, other threads:[~2019-07-23 15:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 13:59 Building bpftool with OUTPUT set breaks Lorenz Bauer
2019-07-18 14:20 ` [PATCH bpf] tools/bpf: fix bpftool build with OUTPUT set Ilya Leoshkevich
2019-07-18 18:51   ` Jakub Kicinski
2019-07-19 13:12     ` Ilya Leoshkevich
2019-07-19 18:17       ` Jakub Kicinski
2019-07-23 15:14         ` Ilya Leoshkevich
2019-07-23 12:59   ` Lorenz Bauer

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