Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1036987imm; Thu, 13 Sep 2018 11:36:57 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb8buZSvuB/rjAvdWAo0Vbyeezyn14FW6qsH25finEWSCd5S+j/4DLxSB2T4R4Mww6OnLWI X-Received: by 2002:a17:902:4081:: with SMTP id c1-v6mr8443023pld.169.1536863817367; Thu, 13 Sep 2018 11:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536863817; cv=none; d=google.com; s=arc-20160816; b=Yy1+BI7y7CJsG+Vzl+WLl5ET7jGoD8luijVjU8HkFinb7Cxdy2CElwnVeLPs139k6g HMslamMhdCUemCTShkuJsY5cdzj9ehZA/66wLbtpRvtPlDiPUbSPz+VwKbnIuzMDmVPk hETOEN35bFVmcLArPZZwl0efcQQwkh7uLme9fIpM2rLs6LHdK+G5TQ6iaL+gsqFqroMr 1XRRY6+OXwPACoxeloJjDkRPm2/mzoeDQ3tPTcDQYIiqjjlk2nm6WBWjYQYcTpE+abcD N6VY89Ld6rPL7ETJd20Qsg7lFE0HoudMu8x/7vWW/Ra6gO/bk/bqX8p8EUNztjHRwrGB xMIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zh5eS3wePVVXaDw85tePNup056W3kqzj3Hy8JJMg2Pc=; b=b0OVLZBwyE54uL1irn7mMgjvm3e81ORswrnK+/LYl+dNAVDrwVNDpwVObblHqUIIZj +bUNp8FM7i0pQt2ro1swPwcmpf84ZDda3tklhGxwPelqKQhkzEoFxDm/ZD7uoXqduSsS Yo4ScNa8m8WQsFjafCAObE2udDTGgx+OOWdOsRmcuf8p3sHyIMRpC0nwoAtLLlO5niFk lsx0Y5uQydryhwtAvF3dpWuEL9uErNPEaAwfJ4MQvUwEarrKOsPjyOZiW5wfWtqx0OJY AQgtZgPUqjqQgnpovabYGBO4bQPWJmV4kMUvTL3Fdl/Ke6r7cUIYXSQ2mCEOseMrUug5 rHlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2uTIHwkI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d37-v6si4675716pla.40.2018.09.13.11.36.41; Thu, 13 Sep 2018 11:36:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2uTIHwkI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727788AbeIMXnZ (ORCPT + 99 others); Thu, 13 Sep 2018 19:43:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:53616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726950AbeIMXnZ (ORCPT ); Thu, 13 Sep 2018 19:43:25 -0400 Received: from jouet.infradead.org (unknown [190.15.121.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5464720866; Thu, 13 Sep 2018 18:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536863563; bh=adS9s/BBaR1gsW2Kjo9wq7mGx1oWtjSRJThN3K3N17k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2uTIHwkIHPTDZw8YsowJyOkwNRuE4mM8k+muImIxLgkAZ82xoxmkJZ9fJZRZP2UvW LXwIMhscCIf5K/jkKuLXI2y/Y/OmkWPKtiVwQENf8KcIAn1zZzviMmQXWV5wxg+3se tvNTdfm5H3jCjq6Od9boFN4m1B3mED27hjeeQEQI= Received: by jouet.infradead.org (Postfix, from userid 1000) id 58E2B140260; Thu, 13 Sep 2018 15:32:40 -0300 (-03) Date: Thu, 13 Sep 2018 15:32:40 -0300 From: Arnaldo Carvalho de Melo To: Alexei Starovoitov Cc: Jakub Kicinski , Daniel Borkmann , Thomas Richter , Hendrik Brueckner , Jiri Olsa , Namhyung Kim , Linux Kernel Mailing List , Linux Networking Development Mailing List Subject: [RFC/fix] Re: libbpf build broken on musl libc (Alpine Linux) Message-ID: <20180913183240.GF30969@kernel.org> References: <20180910172903.GB15516@kernel.org> <20180911122218.0d2eb3f9@cakuba> <20180911121543.GB22689@kernel.org> <20180911212451.hvnyfwyvcs4yojqy@ast-mbp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180911212451.hvnyfwyvcs4yojqy@ast-mbp> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/ [acme@jouet perf]$ I did a lot of tests to make sure tools/perf, tools/lib/bpf, tools/bpf/bpftools and the bpf selftests all build as expected, with OUTPUT= and in place. The csets have further comments about tricky aspects of this. - Arnaldo