Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2688558imm; Thu, 16 Aug 2018 13:57:07 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzRFALBD0VOWCTw6nvUytZ78ms8lVrRntgDuFG7UjDdYDSuBFW/bMjlCun7Oe0CxTKvri61 X-Received: by 2002:a62:c288:: with SMTP id w8-v6mr33597913pfk.92.1534453027686; Thu, 16 Aug 2018 13:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534453027; cv=none; d=google.com; s=arc-20160816; b=fDAz/9xthjDSOZAbzljyXc6T4uSC57oFl4TjVhtyGY4ulFtebgEjsbgnh+JiKvBpga 7aCb6+VsXyOKVNcvRDHh+7N4S5lZdfr771+9yJH3No6WhJGjRhjcv/Ghg9l7Hg//Mkit 3NH7QAymTDd5zTbFmSlIXwRbTgRXL8bRrnWlf6huVhjev2NogdoRPlMzwSEiLQf4qBMN mFxE/yqD46bveuhBjoOhbFmKpuV2TSe3XqDDjF4AF4tuz78bfns5sbYXGhBIOpE5F6Pa wjha1yCONUTE3RMsMHZwEZ5e9vFMgRm14Dhhbxgj65si38nZbN479Y+AXboPDcnmGM3P WlfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=1QGDp1bxj+QbouWKDJonPkZ+4z4i1XJZyp4Tykg6faU=; b=KQfGoIQ1g1TdtFPyUvj2Q5/as3LPAZk1kvVkgHB7yZtPRAbCSW7Tkm4/tH/bfJOw9C jRL9ats3ioN+TYG2V9mvobuuHXNZBt551FAs7Ezm6XbpvkkGMdgydEYpdBPaWisLV00I jVxbl6bCPgkPtmzqvYAWkvWHgrgBLXxhKYoorsvTagbXzWwpdMDp1+8TrDckZEjF/cRi +P3WmtNn+xA2l5ro0d6o23xfm/cP8WoxWYf53134AzC/O9mBvJxhA66yBzCNE7vGAVWT 9ku6pIU4nx89oq1ViehqlERK1ldx8ori8HZZHPtq7Ax40KdBo8opWNGkpS2JcBAA6f8P LhkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="mwthBL/R"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9-v6si211884pfi.99.2018.08.16.13.56.51; Thu, 16 Aug 2018 13:57:07 -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=@google.com header.s=20161025 header.b="mwthBL/R"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725977AbeHPX4G (ORCPT + 99 others); Thu, 16 Aug 2018 19:56:06 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:38471 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725835AbeHPX4F (ORCPT ); Thu, 16 Aug 2018 19:56:05 -0400 Received: by mail-yb0-f193.google.com with SMTP id d18-v6so1160165ybq.5 for ; Thu, 16 Aug 2018 13:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1QGDp1bxj+QbouWKDJonPkZ+4z4i1XJZyp4Tykg6faU=; b=mwthBL/R3ExFZnEoli6vyYHZq2Niv7F6CugwHGKb7V1pTYKR1GdNpuRirzViTOco+v ps4vA9q8J12POHzHKOXfyFyycQmEdzzcR9L9yS8YFMb9v3aBpkcYe9CIhJ8ViQz1/7IC cx2Jybgjej15N33JpJSvm48SokxNInSunMeoIE00NZgHWMW6eWp7MA7VhEfeThOcFGLf ZKEUeX5qZpv6ew1c1otQfp6T0G9/F4RNU0WZDvWMlB8edofcIm+swzkomAC9W3rR/2+7 cKVtr4oBg+WsVmXv9NFTOh2uAybqXcJ3gpW1b0rkfjg1h5mGsTwxo8DYi5oUiiuUm5OO hSiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1QGDp1bxj+QbouWKDJonPkZ+4z4i1XJZyp4Tykg6faU=; b=lkR2Db7zanwWuDDqbUjyTOjSsMSdfAaAzZXMo/VC+YYbhEQD0U92sJQnmmP5R6Tcd3 RS/C1iUdHgu3gJze30R2yilXMbsNBQ68N/05mQMEXNGkW7si7S+tqOKmBAjOcafjQ26N TEanYHBS17z5mtneBtRfAqear1oVxsnasVL8qKcl1nyUjiPKINvJdU4A8QS8K77+yhuP QNJoEFniN6HK7peRgz4z4gwFXNjuG+6kH7vqN7GGg9elWpk8W72tgMAKXddLPNxHFZFZ V1l9a991A0aC5Ze0OoKRWa+H3/U70Y0ObGAJnprtnp279JU8CXa1OUsLi/CxCTX0xpcX 8P2Q== X-Gm-Message-State: AOUpUlGxpKI9zwzMfMJy+pknWsnYBLhMtNN6x5i9AtczSEMM+E+DZgOW u8WhcIO4GxlJVtZWrheZXxQLfDkQntE/bZqpKS5vRQ== X-Received: by 2002:a5b:40c:: with SMTP id m12-v6mr17237505ybp.53.1534452926491; Thu, 16 Aug 2018 13:55:26 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3995:0:0:0:0:0 with HTTP; Thu, 16 Aug 2018 13:55:25 -0700 (PDT) In-Reply-To: <20180815123418.2765f5b6@cakuba.netronome.com> References: <20180815012054.GA70201@joelaf.mtv.corp.google.com> <20180815030132.GA204101@joelaf.mtv.corp.google.com> <20180815123418.2765f5b6@cakuba.netronome.com> From: Joel Fernandes Date: Thu, 16 Aug 2018 13:55:25 -0700 Message-ID: Subject: Re: samples don't build on v4.18 To: Jakub Kicinski Cc: LKML , wangnan0@huawei.com, "open list:BPF (Safe dynamic programs and tools)" , Alexei Starovoitov , acme@kernel.org, Chenbo Feng Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 15, 2018 at 12:34 PM, Jakub Kicinski wrote: > On Tue, 14 Aug 2018 20:01:32 -0700, Joel Fernandes wrote: >> 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? > > Can't reproduce, could you provide all exact commands you run to see > this, including the initial clone? Not sure if you saw that I replied to my own email. As I was saying, doing a fresh clone and build of the kernel tree makes things work for me. The problematic kernel tree which I cloned many months ago was the one I was using when I reported the issue. On the problematic tree, the steps I did to reproduce issue were: git clean -f -d make mrproper make x86_64_defconfig cd samples/bpf/ make I have since moved onto using the fresh cloned tree since that's working for me. I will let you know if I run into this again. Thanks for your time! - Joel