From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Fernandes Subject: Re: samples don't build on v4.18 Date: Tue, 14 Aug 2018 20:01:32 -0700 Message-ID: <20180815030132.GA204101@joelaf.mtv.corp.google.com> References: <20180815012054.GA70201@joelaf.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: LKML , wangnan0@huawei.com, "open list:BPF (Safe dynamic programs and tools)" , Alexei Starovoitov , acme@kernel.org, Chenbo Feng , Jakub Kicinski Return-path: Received: from mail-pf1-f194.google.com ([209.85.210.194]:45071 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728523AbeHOFvo (ORCPT ); Wed, 15 Aug 2018 01:51:44 -0400 Received: by mail-pf1-f194.google.com with SMTP id i26-v6so10123793pfo.12 for ; Tue, 14 Aug 2018 20:01:35 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Aug 14, 2018 at 06:22:21PM -0700, Joel Fernandes wrote: > Forgot to add the patch author, doing so now. thanks > > On Tue, Aug 14, 2018 at 6:20 PM, Joel Fernandes wrote: > > > > Hi, > > When building BPF samples on v4.18, I get the following errors: > > > > $ cd samples/bpf/ > > $ make > > > > Auto-detecting system features: > > ... libelf: [ OFF ] > > ... bpf: [ OFF ] > > > > No libelf found > > Makefile:213: recipe for target 'elfdep' failed > > ----------- > > > > I bissected it down to commit 5f9380572b4bb24f60cd492b1 > > > > Author: Jakub Kicinski > > Date: Thu May 10 10:24:39 2018 -0700 > > > > samples: bpf: compile and link against full libbpf > > --------- > > > > Checking out a kernel before this commit makes the samples build. Also I do > > have libelf on my system. > > > > Any thoughts on this issue? There is some weirdness going on with my kernel tree. If I do a fresh clone of v4.18 and build samples, everything works. However if I take my existing checkout, do a: git clean -f -d make mrproper Then I try to build the samples, I get the "No libelf found". Obviously the existing checked out kernel tree is in some weird state that I am not yet able to fix. But atleast if I blow the whole tree and clone again, I'm able to build... Is this related to the intermittent "No libelf found" issues that were recently discussed? - Joel