bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenz Bauer <lmb@cloudflare.com>
To: bpf <bpf@vger.kernel.org>
Subject: Building bpftool with OUTPUT set breaks
Date: Thu, 18 Jul 2019 14:59:26 +0100	[thread overview]
Message-ID: <CACAyw9-CWRHVH3TJ=Tke2x8YiLsH47sLCijdp=V+5M836R9aAA@mail.gmail.com> (raw)

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

             reply	other threads:[~2019-07-18 13:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18 13:59 Lorenz Bauer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACAyw9-CWRHVH3TJ=Tke2x8YiLsH47sLCijdp=V+5M836R9aAA@mail.gmail.com' \
    --to=lmb@cloudflare.com \
    --cc=bpf@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).