From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnaldo Carvalho de Melo Subject: Re: [RFC/fix] Re: libbpf build broken on musl libc (Alpine Linux) Date: Thu, 13 Sep 2018 16:44:41 -0300 Message-ID: <20180913194441.GG30969@kernel.org> References: <20180910172903.GB15516@kernel.org> <20180911122218.0d2eb3f9@cakuba> <20180911121543.GB22689@kernel.org> <20180911212451.hvnyfwyvcs4yojqy@ast-mbp> <20180913183240.GF30969@kernel.org> <20180913185629.su22fnimluoezntg@ast-mbp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Josh Poimboeuf , Arnaldo Carvalho de Melo , Jakub Kicinski , Daniel Borkmann , Thomas Richter , Hendrik Brueckner , Jiri Olsa , Namhyung Kim , Linux Kernel Mailing List , Linux Networking Development Mailing List To: Alexei Starovoitov Return-path: Content-Disposition: inline In-Reply-To: <20180913185629.su22fnimluoezntg@ast-mbp> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Em Thu, Sep 13, 2018 at 11:56:31AM -0700, Alexei Starovoitov escreveu: > On Thu, Sep 13, 2018 at 03:32:40PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Sep 11, 2018 at 02:24:53PM -0700, Alexei Starovoitov escreveu: > > > On Tue, Sep 11, 2018 at 09:15:43AM -0300, Arnaldo Carvalho de Melo wrote: > > > > Em Tue, Sep 11, 2018 at 12:22:18PM +0200, Jakub Kicinski escreveu: > > > > > On Mon, 10 Sep 2018 14:29:03 -0300, Arnaldo Carvalho de Melo wrote: > > > > > > After lunch I'll work on a patch to fix this, > > > > > Any luck? > > > > > > Well, we need to apply the patch below and make tools/lib/str_error_r.c > > > > live in a library that libbpf and perf is linked to. > > > > > do you want us to take the patch or you're applying it yourself? > > > > Please do some testing with my perf/libbpf+str_error_r branch, it has > > two patches to get this fixed, the one I sent and a prep one making > > libbpf link against libapi. > > > > [acme@jouet perf]$ git log --oneline -2 > > a7ab924b7fec (HEAD -> perf/urgent, acme.korg/perf/libbpf+str_error_r) tools lib bpf: Use str_error_r() to fix the build in Alpine Linux > > fb4a79e04c2b tools lib bpf: Build and link to tools/lib/api/ > > https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf/libbpf%2bstr_error_r&id=fb4a79e04c2b37ee873a3b31a3250925cf466fff > we cannot do this. > lib/api is GPL we cannot use it in LGPL library. Humm, I wrote tools/lib/str_error_r.c, so I can possibly relicense it as LGPL and then link just that one, as I did in one of my local patches. The only line that is not from me in tha file is from Josh Poinboeuf, which I CCed here. - Arnaldo