Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp838846ybt; Wed, 24 Jun 2020 12:29:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW37wjHULrP30jM9L25/e1ja0Lv2JwnSTVwtpszTzWGe+QolxLhI63kP6lp2rCLJgMW8Ab X-Received: by 2002:a17:906:fcba:: with SMTP id qw26mr13235390ejb.112.1593026962946; Wed, 24 Jun 2020 12:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593026962; cv=none; d=google.com; s=arc-20160816; b=AlCgQSmx49mRRUThwRMk2HEpDTWG0MbU5zJuGIiq1wy/vgumWTxvlP2KO2DUhOAwTm +PeWXHk1G/EC6x3RWwD2IdK7TY8F7wY+ZX8iTaE1mIzTFqFORKx44Af/rppbME8FO9+k bPPn2+2EfVDopjn9/JU7T2WwPWMFiT8QH6EAv0/xeaAqv9HGRosUjmENohx/uPRVlHdK t1du4RSTPpmRau1yE2MviSHgG2/JK/KjiURKMNMOBYpccwifI6AZriYMZv4dF/Uf+33a zArrfGnb9kh+H/V1CBJTH76csyqnk59cgkYI9Hp9WbHkmsA8gFi/KBMds8oAWdHd839X iTTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=cVgR+y2rl1A0O/fcIfcloIxbYTjgzf+SX0xSidJWfM4=; b=JGDzgbdNuHnvixPlnqr+gTRpMZX5jjS8ouKsyzqpcx9hKWqYPoypu4B5bTaMTUOTnR md0lpIT6XCghCf0bklj3SK06blVegllWz7+enOTASzf3lAI9eXbxWwH1+WtTDGzdidaJ ak75OiEZIyPgFDNRqXTphibG1ybUD8RnUabyYXRn18HwOlcr1h/K0tt97HgSfzOUU/N5 PvQTrtk3L80DpKRZaNA//MUGuI0b33zHhcAbGw76NkRWqQ7wQBfGH0s3yllWUijPrzxs OjWDZtRW9Igoo30wJjDij4GY/G2h2pnb56Dw4lNzvEGhxMqgJxMBdXDSEq+E3aliTXRb i7mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bTNjmNtZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si12843627ejl.550.2020.06.24.12.28.59; Wed, 24 Jun 2020 12:29:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bTNjmNtZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391305AbgFXT1b (ORCPT + 99 others); Wed, 24 Jun 2020 15:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391250AbgFXT1a (ORCPT ); Wed, 24 Jun 2020 15:27:30 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33777C061573; Wed, 24 Jun 2020 12:27:29 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id e13so2992965qkg.5; Wed, 24 Jun 2020 12:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=cVgR+y2rl1A0O/fcIfcloIxbYTjgzf+SX0xSidJWfM4=; b=bTNjmNtZMYFpbvCFyALTaIIDPoxFnxSQLQEu7xaZJqXTSwv+MG0RtESgNGGIgiApEU 0Z+8jj1Vp+nrpKyICKhkiJXDbCJBqwVIHJsxN/rEelAGgBbLGIMlG6nexL0CEyfaaSYP algjcHmUyNbmpNkA4tWOnptKJqO2ehR+vPSpwovlwa0KwGiuikQwQOvc03oaUSvCTT7G MOYP3W8DHfTm5/eUVoG2GGgsJ9fAiGgpAckUTUow+gF8gx11sGpyj8OCxJzJe8yvKLAA s0GTw8VKCCAGwQHlh/gEo52If+hmGcDdqGBVifFijdzYmFrFZkIoeEqB+JNLvw7THseK hKFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cVgR+y2rl1A0O/fcIfcloIxbYTjgzf+SX0xSidJWfM4=; b=SR9nXsdBREWNdBMvPjVq9UnKTkrxmZuvFOyziPyXHl0pNQcFS6GWQcQXR0g+biQPXa 2XFDrJj8wzRAHxd/1ItC6U6D3XYWUxO7UWlvBWEeWNsOsaio2EoDFUheIYb642B+Blo6 bybQTdmtBZvT+5T5do3/Vqj1xtKkNIImq5WHws4yTq3Q0i6dLvya4rx9kxGkpMrIvzy5 JvUOPCxomNm8k2/+SMXY+Z9hgFKmQXvDflzzMJhVEBX71AVAH3t9PaAsLcNaXSGasLPE PH4/zW1lpwXKeiSEsTXoFsG3Hw+Kj5Ohj2ynAQHNtsFDmplKNpzrGziCBcrx43Krzj53 OAtw== X-Gm-Message-State: AOAM532n6dX2QM2W1BrXS89vk8o2wGx49ptURDK5VI6LkUeih9ZExF17 3NJxxN41NBrNmvOtxI9Sd+B4lFqcT5IJ/IsGAzE= X-Received: by 2002:a05:620a:12d2:: with SMTP id e18mr27821595qkl.437.1593026848420; Wed, 24 Jun 2020 12:27:28 -0700 (PDT) MIME-Version: 1.0 References: <2020062414452752504112@gmail.com> In-Reply-To: <2020062414452752504112@gmail.com> From: Andrii Nakryiko Date: Wed, 24 Jun 2020 12:27:17 -0700 Message-ID: Subject: Re: tools/bpf: build failed with defconfig(x86_64) on v5.6 and v5.7 To: Li Xinhai Cc: bpf , linux-kernel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 23, 2020 at 11:46 PM Li Xinhai wrote: > > - information of machine > Linux localhost.localdomain 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10= 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux > > - configurations > make defconfig > make kvmconfig > > - failed logs on v5.6 > ``` > LINK /mnt/build/1_build/05_build_v5.6/bpf/bpftool//libbpf/libbpf.a > LINK /mnt/build/1_build/05_build_v5.6/bpf/bpftool/bpftool > DESCEND runqslower > GEN /mnt/build/0_code/0_linux/linux/tools/bpf/runqslower/.output/b= pf_helper_defs.h > make[4]: *** No rule to make target '/mnt/build/0_code/0_linux/linux/tool= s/include/linux/build_bug.h', needed by '/mnt/build/0_code/0_linux/linux/to= ols/bpf/runqslower/.output/staticobjs/libbpf.o'. Stop. > make[3]: *** [Makefile:183: /mnt/build/0_code/0_linux/linux/tools/bpf/run= qslower/.output/staticobjs/libbpf-in.o] Error 2 > make[2]: *** [Makefile:79: .output/libbpf.a] Error 2 > make[1]: *** [Makefile:119: runqslower] Error 2 > make: *** [Makefile:68: bpf] Error 2 > ``` > > - failed logs on v5.7 > ``` > In file included from /mnt/build/0_code/0_linux/linux/tools/include/linux= /build_bug.h:5, > from /mnt/build/0_code/0_linux/linux/tools/include/linux= /kernel.h:8, > from /mnt/build/0_code/0_linux/linux/kernel/bpf/disasm.h= :10, > from /mnt/build/0_code/0_linux/linux/kernel/bpf/disasm.c= :8: > /mnt/build/0_code/0_linux/linux/kernel/bpf/disasm.c: In function =E2=80= =98__func_get_name=E2=80=99: > /mnt/build/0_code/0_linux/linux/tools/include/linux/compiler.h:37:38: war= ning: nested extern declaration of =E2=80=98__compiletime_assert_0=E2=80=99= [-Wnested-externs] > _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > ^~~~~~~~~~~~~~~~~~~~~ > /mnt/build/0_code/0_linux/linux/tools/include/linux/compiler.h:16:15: not= e: in definition of macro =E2=80=98__compiletime_assert=E2=80=99 > extern void prefix ## suffix(void) __compiletime_error(msg); \ > ^~~~~~ > /mnt/build/0_code/0_linux/linux/tools/include/linux/compiler.h:37:2: note= : in expansion of macro =E2=80=98_compiletime_assert=E2=80=99 > _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > ^~~~~~~~~~~~~~~~~~~ > /mnt/build/0_code/0_linux/linux/tools/include/linux/build_bug.h:39:37: no= te: in expansion of macro =E2=80=98compiletime_assert=E2=80=99 > #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > ^~~~~~~~~~~~~~~~~~ > /mnt/build/0_code/0_linux/linux/tools/include/linux/build_bug.h:50:2: not= e: in expansion of macro =E2=80=98BUILD_BUG_ON_MSG=E2=80=99 > BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) > ^~~~~~~~~~~~~~~~ > /mnt/build/0_code/0_linux/linux/kernel/bpf/disasm.c:20:2: note: in expans= ion of macro =E2=80=98BUILD_BUG_ON=E2=80=99 > BUILD_BUG_ON(ARRAY_SIZE(func_id_str) !=3D __BPF_FUNC_MAX_ID); > ^~~~~~~~~~~~ > ``` > This one I've seen and I have no idea why this is happening (suddenly) and how to fix that. > and > ``` > LINK /mnt/build/0_code/0_linux/linux/tools/bpf/runqslower/.output/l= ibbpf.a > GEN vmlinux.h > BPF runqslower.bpf.o > In file included from runqslower.bpf.c:3: > .output/vmlinux.h:5:15: error: attribute 'preserve_access_index' is not s= upported by '#pragma clang attribute' > #pragma clang attribute push (__attribute__((preserve_access_index)), app= ly_to =3D record) > ^ > .output/vmlinux.h:98607:15: error: '#pragma clang attribute pop' with no = matching '#pragma clang attribute push' > #pragma clang attribute pop > ^ > 2 errors generated. > make[2]: *** [Makefile:57: .output/runqslower.bpf.o] Error 1 > make[1]: *** [Makefile:119: runqslower] Error 2 > make: *** [Makefile:68: bpf] Error 2 > ``` > This just means you don't have recent-enough Clang on your system. You need Clang 10 at least. > On this same machine and with same configuration, I've tried v5.4 and v5.= 5, no failures. > >