From: "Michal Suchánek" <msuchanek@suse.de>
To: Thorsten Leemhuis <linux@leemhuis.info>
Cc: Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Rainer Fiebig <jrf@mailbox.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: -next build error due to "kbuild: Leave objtool binary around with 'make clean'"
Date: Mon, 2 Mar 2026 20:43:57 +0100 [thread overview]
Message-ID: <aaXofbe_5QGYYuMB@kitsune.suse.cz> (raw)
In-Reply-To: <03045f41-fe4c-44ff-b01c-6e325d82255a@leemhuis.info>
On Mon, Mar 02, 2026 at 08:18:17PM +0100, Thorsten Leemhuis wrote:
> On 2/28/26 06:40, Nathan Chancellor wrote:
> > The difference between 'make clean' and 'make mrproper' is documented in
> > 'make help' as:
> >
> > clean - Remove most generated files but keep the config and
> > enough build support to build external modules
> > mrproper - Remove all generated files + config + various backup files
> >
> > After commit 68b4fe32d737 ("kbuild: Add objtool to top-level clean
> > target"), running 'make clean' then attempting to build an external
> > module with the resulting build directory fails with
> >
> > $ make ARCH=x86_64 O=build clean
> >
> > $ make -C build M=... MO=...
> > ...
> > /bin/sh: line 1: .../build/tools/objtool/objtool: No such file or directory
> >
> > as 'make clean' removes the objtool binary.
> >
> > Split the objtool clean target into mrproper and clean like Kbuild does
> > and remove all generated artifacts with 'make clean' except for the
> > objtool binary, which is removed with 'make mrproper'.
>
> Thx for fixing this regression, sadly this caused my daily -next rpm
> builds for Fedora to fail on x86_64 during a "make mrproper":
>
> ""
> kernel.spec:2485: InitBuildVars: Copy files
> + /usr/bin/make -s 'HOSTCFLAGS=-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 ' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' -j32 mrproper
> find: cannot delete ‘/builddir/build/BUILD/kernel-7.0.0-build/kernel-next-20260302/linux-7.0.0-0.0.next.20260302.121.vanilla.fc42.x86_64/tools/objtool/.check.o.cmd’: No such file or directory
> find: cannot delete ‘/builddir/build/BUILD/kernel-7.0.0-build/kernel-next-20260302/linux-7.0.0-0.0.next.20260302.121.vanilla.fc42.x86_64/tools/objtool/.elf.o.cmd’: No such file or directory
> [and many more like these]
> ""
> For the full build log, see:
> https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-42-x86_64/10183736-next-next-all/builder-live.log.gz
>
> This is almost exactly the rpm spec file that is used in Fedora rawhide.
> The sections that causes this looks like this:
>
> """
> %{log_msg "InitBuildVars: Copy files"}
> %{make} %{?_smp_mflags} mrproper
And how would find -delete fail?
Does that mean that the files in question are broken links?
Does that mean in the clean phase these erren't broken?
When did they break?
Or does the objtool_clean run multiple times in parallel, once through
the clean target, and once as dependency of the mrproper target?
Thanks
Michal
next prev parent reply other threads:[~2026-03-02 19:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 5:40 [PATCH] kbuild: Leave objtool binary around with 'make clean' Nathan Chancellor
2026-02-28 7:27 ` Nicolas Schier
2026-02-28 11:08 ` Peter Zijlstra
2026-02-28 17:29 ` Josh Poimboeuf
2026-03-02 19:18 ` -next build error due to "kbuild: Leave objtool binary around with 'make clean'" Thorsten Leemhuis
2026-03-02 19:43 ` Michal Suchánek [this message]
2026-03-02 20:49 ` Nathan Chancellor
2026-03-03 5:51 ` Thorsten Leemhuis
2026-03-05 0:36 ` [PATCH] kbuild: Leave objtool binary around with 'make clean' Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aaXofbe_5QGYYuMB@kitsune.suse.cz \
--to=msuchanek@suse.de \
--cc=jpoimboe@kernel.org \
--cc=jrf@mailbox.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox