Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp85177rbb; Fri, 23 Feb 2024 12:38:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWKTdaPa1/ZDGT/PLNI1LXFAmOmBwu/xD02W1G29oyya39xaf1bfW/keoyxhHsagMCf6bczFijgHGwwZKtq4Xxzyhjsu3eDfz4kG/cnYw== X-Google-Smtp-Source: AGHT+IE4dCCJDHg5WydfKt8pvxid3nafucPDM32COl5UCag/oXO+0+koDjiNh1KorGZhzkWHy3+7 X-Received: by 2002:a9d:6c12:0:b0:6e4:875e:b34b with SMTP id f18-20020a9d6c12000000b006e4875eb34bmr949324otq.15.1708720719423; Fri, 23 Feb 2024 12:38:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708720719; cv=pass; d=google.com; s=arc-20160816; b=ecLtLTLgqeaakcMf5ahtdlZo19OpMwI1YsDWtH8YUBjht2EEaA2SFUnHRAVSmpy9HE imLUjswuMSiRC0Jj+wZKV/D+x/YNJvv0g5ZifSB12X2CNyhiqQgkgSQygYiKyKLPz2q8 LHPUKXvdeKrjlKKjz74o1LqhrPivttF9cwWYlLNGj9b25HRPKI9T1E0QyBFFh6owbQ/h wk0XqEs20gJLNjLMTCtqJNksoeGHA6cHHQyqUO9HtK2AfnTVT/5IwQTR+cDgA4L1sABB cXw5J04S8Wz5SeMs5FfRUjPcoQUev/Ivm0c0WClKvMdmg5uWIquJDXePspl+ZPGy+/Cs AEag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=GcSK7lktycGUq3TCMwXiTLhn36wJtNMvHXvTtj8Eb6M=; fh=JNMXAqsXhThKk0npdr13W5d3yxTczs3kD7tXYvEmHmE=; b=C0MfSfckAun/qMlCxTd8YOje9ZCRUGwNAuEws/S4215z0zl8mMuRRAJq+V7DrAyHlA plLaI1ip6xlyO6r8rygyg+xMgXQqncBVv3KdosUuSAeWItFu9yrXVHjCF1eZcxo/GVu+ ODOMn6L/D6coDmcN9DYr+MFsapupF2HQqG9gpnO5TVLF+X4uOaYzDun9LpjvxyUruE53 Z5h9KDb/HJxVJ/0DixmxsMloF/qAIlYqQfDSF2S3HDdwWOwuwONoxQIS0aQD7clpF96Y gJ0iVun9BJzqgegsQuzIja7v/RQ8rDPXfA21I5qm4T7mu7f3KAgTiiX1n22RGufc6eHo RSfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-79109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79109-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r201-20020a632bd2000000b005dccf9561c0si12379332pgr.150.2024.02.23.12.38.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:38:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-79109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79109-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D8E86B226FD for ; Fri, 23 Feb 2024 20:35:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34BE9146E76; Fri, 23 Feb 2024 20:34:55 +0000 (UTC) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BB3F10A11; Fri, 23 Feb 2024 20:34:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708720494; cv=none; b=mRUCSLzJD3sVB/UtFQLgxmv2Y7Ph5PzjPdukZRzMzNShVUg+Jd2+dN4Q3Xo7Ml3sIyLwAH/oRqelmzrePfeMsPQDBHAJbGqDlShkquOzwx9GWvfEp57/hr7hsbE91w/CVNCH7fmm7dRduIEZyuGvStixZilr3wgmXtyk90Nuav8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708720494; c=relaxed/simple; bh=rPPJ2L/RRzBV/p4jhRpBz6hSBChY4V2Ci3lmwX/T1Hg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=q3dr9FIj/ojNr41OTRbT6RWf0SUYIvaPMfy+KqawQ+7ozEfejLWV4CaVNqSC9B4B41p6mcluay8A2c0B2I1nR7SzJJA+4n4tf8DXQziK5a6/Zyxq7BOfpw2y7oraUPKPql3xiWOtjiNhnwV8qO1D47akMBapt8YhMk06Un/uPAA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2997cb49711so468083a91.3; Fri, 23 Feb 2024 12:34:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708720492; x=1709325292; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GcSK7lktycGUq3TCMwXiTLhn36wJtNMvHXvTtj8Eb6M=; b=dLajL/0cv/bGP6S5nvXVjNKW9L0Om3naJ9nBiLut53DYT1mNEyxF7avwhi15yruwsj oiSkuvfiScLjv3YuWXmU3x7WmieJzMMIvTuUd49QUgwM6Uio5QfJnvRFXNkl1ZyeW3ej chkORGrJ5ccuMSXXS13hY3ijq0EtYpNPUZFandxJgXz4IuFu5d6lQKLfs8Z5xVR1QGNB ++D91wExL+odTy378SRhSLn5rZFQnZXJpl2FNi6C3i6oT+Wx6UEcy/Lx/ykCiWkNEvZG C/rOJk8pcrrxcCG3Ytqo1hFBlljHVdEqNHnylIcqAa/B5XBf1QqyCbZBmGviP5OH9ZPS OZPA== X-Forwarded-Encrypted: i=1; AJvYcCWDjnBt5vFMVAvKZDP9boRdhjd99YGki59BcFJoW75Yj8e463aV1VgIwVomQDbmPRM6HEbHtRndzSuulpRYK9ges94sOjHzJNYm5N2CVlCNf/rl5oLZRCBD9yNOf/qsGiy1RTtPsp+A1Q== X-Gm-Message-State: AOJu0YzV+cSL9RG7r7ZCAdT7NE7yEihkc8rjKFOQslutISn7c66TWXk/ WDtF1t7hAHE4scRPsMGPp20bpEJIy5wq/KZMwNn3F7Gmpb/wVJpT/CHYI26ybLpNIsJYhDvPVhk GWp72YpKAduuXw3zcbrH77BXiLLZCdpl7ZNg= X-Received: by 2002:a17:90a:420b:b0:29a:4239:6893 with SMTP id o11-20020a17090a420b00b0029a42396893mr1013909pjg.6.1708720492297; Fri, 23 Feb 2024 12:34:52 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240222100656.0a644254@canb.auug.org.au> In-Reply-To: From: Namhyung Kim Date: Fri, 23 Feb 2024 12:34:40 -0800 Message-ID: Subject: Re: [solved] Re: linux-next: build failure after merge of the perf tree To: Arnaldo Carvalho de Melo Cc: Stephen Rothwell , Ian Rogers , Arnaldo Carvalho de Melo , Arnaldo Carvalho de Melo , Linux Kernel Mailing List , Linux Next Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Arnaldo, On Fri, Feb 23, 2024 at 12:11=E2=80=AFPM Arnaldo Carvalho de Melo wrote: > > On Fri, Feb 23, 2024 at 04:50:47PM -0300, Arnaldo Carvalho de Melo wrote: > > On Thu, Feb 22, 2024 at 10:06:56AM +1100, Stephen Rothwell wrote: > > > Hi all, > > > > > > After merging the perf tree, today's linux-next build (native perf) > > > failed like this: > > > > > > util/bpf_skel/augmented_raw_syscalls.bpf.c:329:15: error: invalid app= lication of 'sizeof' to an incomplete type 'struct timespec64' > > > __u32 size =3D sizeof(struct timespec64); > > > ^ ~~~~~~~~~~~~~~~~~~~ > > > util/bpf_skel/augmented_raw_syscalls.bpf.c:329:29: note: forward decl= aration of 'struct timespec64' > > > __u32 size =3D sizeof(struct timespec64); > > > ^ > > > > > > Caused by commit > > > > > > 29d16de26df1 ("perf augmented_raw_syscalls.bpf: Move 'struct timesp= ec64' to vmlinux.h") > > > > > > This is a ppc64 le build. > > > > > > I have used the perf tree from next-20240221 for today. > > > > Ok, finally I managed to secure a ppc64 machine to test this and > > sometimes I reproduce just like you reported, but sometimes I can't do > > it, didn't manage to isolate what is that makes it fail sometimes, make > > -C tools/perf clean, nuking the O=3D target directory, etc, when I > > reproduce it: > > So I think I see the problem, I now left the build directory with a > previous build from torvalds/master, then switched to the > perf-tools-branch and tried to build from there, without first removing > the old build, it fails: > > CLANG /tmp/build/perf-tools-next/util/bpf_skel/.tmp/augmented_raw_sys= calls.bpf.o > util/bpf_skel/augmented_raw_syscalls.bpf.c:329:15: error: invalid applica= tion of 'sizeof' to an incomplete type 'struct timespec64' > 329 | __u32 size =3D sizeof(struct timespec64); > | ^ ~~~~~~~~~~~~~~~~~~~ > util/bpf_skel/augmented_raw_syscalls.bpf.c:329:29: note: forward declarat= ion of 'struct timespec64' > 329 | __u32 size =3D sizeof(struct timespec64); > | ^ > 1 error generated. > make[2]: *** [Makefile.perf:1161: /tmp/build/perf-tools-next/util/bpf_ske= l/.tmp/augmented_raw_syscalls.bpf.o] Error 1 > make[1]: *** [Makefile.perf:264: sub-make] Error 2 > > > Because it will use what was installed before in the build dir: > > [acme@ibm-p9z-16-lp5 perf-tools-next]$ ls -la /tmp/build/perf-tools-next/= util/bpf_skel/vmlinux.h > -rw-r--r--. 1 acme acme 4319 Feb 23 14:59 /tmp/build/perf-tools-next/util= /bpf_skel/vmlinux.h > [acme@ibm-p9z-16-lp5 perf-tools-next]$ > > And that one doesn't have 'struct timespec64': > > [acme@ibm-p9z-16-lp5 perf-tools-next]$ grep timespec64 /tmp/build/perf-to= ols-next/util/bpf_skel/vmlinux.h > [acme@ibm-p9z-16-lp5 perf-tools-next]$ > > If I remove that directory contents: > > [acme@ibm-p9z-16-lp5 perf-tools-next]$ rm -rf /tmp/build/perf-tools-next/ > [acme@ibm-p9z-16-lp5 perf-tools-next]$ mkdir /tmp/build/perf-tools-next/ > [acme@ibm-p9z-16-lp5 perf-tools-next]$ > > And then try to build again: > > make -k O=3D/tmp/build/perf-tools-next/ -C tools/perf install-bin > > It works. > > I reproduced the problem on x86_64, so, on this transition period, the > problem happens, probably we need to robustify the installation of > tools/perf/util/bpf_skel/vmlinux/vmlinux.h in the O=3D target directory, > but if you just make sure the build directory is clean before trying to > build it, this time, it should work, wdyt? Can we add a dependency to the minimal vmlinux.h? Thanks, Namhyung ---8<--- diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 3cecd51b2397..33621114135e 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -1147,7 +1147,7 @@ ifeq ($(VMLINUX_H),) endif endif -$(SKEL_OUT)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) +$(SKEL_OUT)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) $(VMLINUX_H) ifeq ($(VMLINUX_H),) $(QUIET_GEN)$(BPFTOOL) btf dump file $< format c > $@ else