Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp73665rbb; Fri, 23 Feb 2024 12:11:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUpuafi/kecHM8WA155K/4aXlRgCCJs5/uUlkOrkjbMuSZL1nWeBfH/g0Yhh0AFrlvbOqoATM7w32JfN14ayzOUhmQcUT79nJwdTOyp4g== X-Google-Smtp-Source: AGHT+IEbI+YR0zoi4JHrAtoIE8NRvGDV2dj7S7vK2vC39fgagXzNMtvu+CwVADE4p4wmoUFG2bR2 X-Received: by 2002:a05:6402:3596:b0:565:965f:b0f3 with SMTP id y22-20020a056402359600b00565965fb0f3mr382319edc.31.1708719085190; Fri, 23 Feb 2024 12:11:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708719085; cv=pass; d=google.com; s=arc-20160816; b=GHQwI9bTli64qCdXnkKV9CMNRZopNBOKxzocgn5P9RtUKXcrY+ijE20Q7p/HF4RP93 xeVlT9TZe9cP+sRaXczFBmLrmpAuIU0aqYn+Q/RzAdWuTFjQU2OMckC9TfpdK97qrwah 3nY+pISTYqdo8TJjYDEQ7Xag79PtjYa4ZL1aloJAOzFsDcu4wX80n+oO+di50aQsKEkV c212uGA85hU6ew0qicVBJRnO7puvHL9gUx2AEhdLPFr/3aq9ZO1D5Z4a2b57NMW6SUiH dDL45jA4ycnu2NDh4ewWUUu8Kqhx0+20s00H3Ba0xDP6n4R1I1TfMj1zf5OnJ+P9pfhD yDhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QfA36riYgcQIBKLjdZhtvNbq89n2gYLTYybvou+JH90=; fh=/4j2SR5jXB8wBjdJSMd77M+DZhoifW3zU5XVVlC91LY=; b=c1yxCXqpgkeeaevAisWTyRKOjWJlC0ESibDM39NTd8H/P53wgYjEYUgehn96OqT12y mOmqDGYKf+5EZZ8c4AUm+c8nrMQfLegHnT3i8pbV0srv8ee85OCwo1/vdzohUaA7HZBr In9x694WiQEgmO6Xq2qrCtxqDriYKEJUdJdyUqWW6P/tD1Vzvb/cJPRXQZHkqc3MDVRx hbOZ2JP+6zgkOVyaahGiOsN4SIITb8yrYL2RQ024KuXhLcLRjm8r3PdcXRvnV7+nbLaO msxbV8bTaP0vmDRM3VkIrj2fepgPJWDijo2cz6MDBz/gDpXCQ+Qw5JAkmouQDcxX3Y/Z wvAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="D4Dzo/hR"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79078-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79078-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h9-20020a05640250c900b005657afaef57si617771edb.351.2024.02.23.12.11.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79078-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="D4Dzo/hR"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79078-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79078-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EB3871F25203 for ; Fri, 23 Feb 2024 20:11:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E8C0146E6D; Fri, 23 Feb 2024 20:11:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D4Dzo/hR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5130F14532B; Fri, 23 Feb 2024 20:11:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708719077; cv=none; b=HKufukxxwMYFvABCYuAnIG6PnKAP4/SQsjVQnQj80vQjOnXicK5HYQsQj8CLSVE4jO+5RFc0x8FgvyoDckZWUmdZkfMeZddLNAbAtG+66/OueJhMivvnh+f3Y0n2/H+hkp6fJ3MtDvqqk9XsDB/z1CtF15RMwfqldb0kjsnNFBY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708719077; c=relaxed/simple; bh=8xW8KxDODeymUb/1hXcdxwew9busA4V8Q9f//wMlheM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Kk28qlQOaJnQrcenqrxg7XxmIdcQ9wqViCvj9Kkit+EKZAkj28ESa/oMxw0PpiRO8YVU98Ud4AiMgFCi3SL7f4dNEI38Mm7g2CaFU6d3RNQgq/5k02ZwPmPXCQces676yc5mPFFmAzqCm5LhC/diku0JSgQf+jPW3e/wnzgvk1o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D4Dzo/hR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B516C433F1; Fri, 23 Feb 2024 20:11:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708719076; bh=8xW8KxDODeymUb/1hXcdxwew9busA4V8Q9f//wMlheM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D4Dzo/hR20xvmO1jr//XhxqGK+erueAvuoFuJSeFYPgharDdWH+fn1b98im3Ih947 WQCSHZvzOjGy+RO1SuZ0JGRgIvoWiTkYfRBUgPkx34e/EHfVUX68vsfw3iwyMnWaHT ZUf88//1z8rxOInhdHTGVf3E/rZwsulCKNfmHdktkxydNE0H8nLemZSanWN/pB9o3y oL5haI2bgF6C5ImYaWESo3f6Cp94gfjgVF78vNlpC7kQ8gUWIZpJV449M3zOyvsjWG 6wWD7aw5YSgK7ZsZve6n6TPM+xy7zgCdgU0BGjpbse14cFtdJdrh6jJ9ftzoXWdR/c thKsoeztjbWoA== Date: Fri, 23 Feb 2024 17:11:13 -0300 From: Arnaldo Carvalho de Melo To: Stephen Rothwell , Ian Rogers Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Arnaldo Carvalho de Melo , Linux Kernel Mailing List , Linux Next Mailing List Subject: [solved] Re: linux-next: build failure after merge of the perf tree Message-ID: References: <20240222100656.0a644254@canb.auug.org.au> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 application of 'sizeof' to an incomplete type 'struct timespec64' > > __u32 size = sizeof(struct timespec64); > > ^ ~~~~~~~~~~~~~~~~~~~ > > util/bpf_skel/augmented_raw_syscalls.bpf.c:329:29: note: forward declaration of 'struct timespec64' > > __u32 size = sizeof(struct timespec64); > > ^ > > > > Caused by commit > > > > 29d16de26df1 ("perf augmented_raw_syscalls.bpf: Move 'struct timespec64' 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= 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_syscalls.bpf.o util/bpf_skel/augmented_raw_syscalls.bpf.c:329:15: error: invalid application of 'sizeof' to an incomplete type 'struct timespec64' 329 | __u32 size = sizeof(struct timespec64); | ^ ~~~~~~~~~~~~~~~~~~~ util/bpf_skel/augmented_raw_syscalls.bpf.c:329:29: note: forward declaration of 'struct timespec64' 329 | __u32 size = sizeof(struct timespec64); | ^ 1 error generated. make[2]: *** [Makefile.perf:1161: /tmp/build/perf-tools-next/util/bpf_skel/.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-tools-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=/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= target directory, but if you just make sure the build directory is clean before trying to build it, this time, it should work, wdyt? Ian, ideas? - Arnaldo