qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* "make clean" after "git pull" runs configure before cleaning.
@ 2024-11-14 23:10 Rob Landley
  2024-11-14 23:33 ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Landley @ 2024-11-14 23:10 UTC (permalink / raw)
  To: qemu-devel, pbonzini, Alex Bennée, Thomas Huth

Apparently because:

../meson.build:1:0: ERROR: Meson version is 0.59.3 but project requires 
 >=1.5.0
A full log can be found at 
/home/landley/qemu/qemu/build/meson-logs/meson-log.txt
/home/landley/qemu/qemu/build/pyvenv/bin/meson setup --reconfigure 
/home/landley/qemu/qemu
WARNING: Regenerating configuration from scratch.
Reason: Coredata file 
'/home/landley/qemu/qemu/build/meson-private/coredata.dat' references 
functions or classes that don't exist. This probably means that it was 
generated with an old version of meson.
DEPRECATION: "pkgconfig" entry is deprecated and should be replaced by 
"pkg-config"

(And then 30 screens more data...)

Seems a _bit_ awkward to do that (and potentially fail on a random new 
dependency) just to delete it all again?

And I dunno what it's saying about the meson version, "aptitude show 
meson" in my devuan daedalus ("debian bookworm" fork) says version 
1.0.1-5 which is nowhere near 0.59.3 or 1.5.0?  QEMU built fine with it 
last week, and after yet another ./configure it seems to be chugging 
along building the new -rc0 tag for the moment...

Rob


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "make clean" after "git pull" runs configure before cleaning.
  2024-11-14 23:10 "make clean" after "git pull" runs configure before cleaning Rob Landley
@ 2024-11-14 23:33 ` Paolo Bonzini
  2024-11-15 21:15   ` Rob Landley
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2024-11-14 23:33 UTC (permalink / raw)
  To: Rob Landley, qemu-devel, Alex Bennée, Thomas Huth

On 11/15/24 00:10, Rob Landley wrote:
> Seems a _bit_ awkward to do that (and potentially fail on a random new 
> dependency) just to delete it all again?

That's just how Make works.  If it finds that Makefile is old, it first 
regenerates Makefile and only then looks at the target.  See "How 
Makefiles Are Remade" in GNU Make's manual: "After reading in all 
makefiles 'make' will consider each as a goal target, in the order in 
which they were processed, and attempt to update it. [...] After all 
makefiles have been checked, if any have actually been changed, 'make' 
starts with a clean slate and reads all the makefiles over again".

> And I dunno what it's saying about the meson version

QEMU bundles a copy of Meson because it needs a very new one.

Paolo



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "make clean" after "git pull" runs configure before cleaning.
  2024-11-14 23:33 ` Paolo Bonzini
@ 2024-11-15 21:15   ` Rob Landley
  2024-11-15 21:45     ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Landley @ 2024-11-15 21:15 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, Alex Bennée, Thomas Huth

On 11/14/24 17:33, Paolo Bonzini wrote:
> On 11/15/24 00:10, Rob Landley wrote:
>> Seems a _bit_ awkward to do that (and potentially fail on a random new 
>> dependency) just to delete it all again?
> 
> That's just how Make works.

Linux and busybox and so on use make, and I've never seen "make clean" 
trigger a "make defconfig" there.

(Or do you mean "Make" is different from "gmake" the way "kbuild" is 
different from "make" and you distinguish your build system from the 
make command by capitalizing it? Alas the last time I understood 
everything qemu was doing was probably 2008, pace of change got too fast 
sometime after dyngen was replaced by tcg...)

> If it finds that Makefile is old, it first 
> regenerates Makefile and only then looks at the target.

I'm pretty sure the make command doesn't internally know how to run the 
configure script, the Makefile would have to include plumbing to make 
that decision, and it at least LOOKS like it's trying not to in the top 
level Makefile line 336:

   # Don't try to regenerate Makefile or configure
   # We don't generate any of them
   Makefile: ;
   configure: ;

I note that if you run "make clean" twice in a row, it doesn't re-run 
configure in between. It's only when a stale target exists, which seems 
to involve dependencies making a decision. (The file NOT existing 
doesn't trigger action, but the file being "old" does.)

>  See "How 
> Makefiles Are Remade" in GNU Make's manual:

I've read it, albeit not recently. (I have a probably post-1.0 todo item 
to write a gmake compatible make for toybox, long story.)

> "After reading in all 
> makefiles 'make' will consider each as a goal target, in the order in 
> which they were processed, and attempt to update it. [...] After all 
> makefiles have been checked, if any have actually been changed, 'make' 
> starts with a clean slate and reads all the makefiles over again".

So it's an artifact of the way you're using make, and hard to fix then?

*shrug* I'd use 'git clean -fdx' instead but I'm not sure how that 
interacts with multiple submodules.

>> And I dunno what it's saying about the meson version
> 
> QEMU bundles a copy of Meson because it needs a very new one.

Ok.

> Paolo

Rob


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "make clean" after "git pull" runs configure before cleaning.
  2024-11-15 21:15   ` Rob Landley
@ 2024-11-15 21:45     ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2024-11-15 21:45 UTC (permalink / raw)
  To: Rob Landley; +Cc: qemu-devel, Alex Bennée, Thomas Huth

[-- Attachment #1: Type: text/plain, Size: 2287 bytes --]

Il ven 15 nov 2024, 22:15 Rob Landley <rob@landley.net> ha scritto:

> On 11/14/24 17:33, Paolo Bonzini wrote:
> > On 11/15/24 00:10, Rob Landley wrote:
> >> Seems a _bit_ awkward to do that (and potentially fail on a random new
> >> dependency) just to delete it all again?
> >
> > That's just how Make works.
>
> Linux and busybox and so on use make, and I've never seen "make clean"
> trigger a "make defconfig" there.
>

Yeah, they don't have a separate (and lengthy) configure phase. But they
might invoke some rules in a more hidden way if something changes in
scripts/. I don't know, Kbuild is black magic.

(Or do you mean "Make" is different from "gmake" the way "kbuild" is
> different from "make" and you distinguish your build system from the
> make command by capitalizing it?


No, I meant "any implementation of the POSIX utility".

> If it finds that Makefile is old, it first
> > regenerates Makefile and only then looks at the target.
>
> I'm pretty sure the make command doesn't internally know how to run the
> configure script, the Makefile would have to include plumbing to make
> that decision


It does, the chain is config-host.mak <- configure. The special processing
of Makefiles extends to all includes ("all Makefiles" in the GNU manual).

and it at least LOOKS like it's trying not to in the top level Makefile
> line 336:
>
>    # Don't try to regenerate Makefile or configure
>    # We don't generate any of them
>    Makefile: ;
>    configure: ;
>

Makefile and configure are not generated but other included files are. Most
likely the one you're hitting is config-host.mak..

I note that if you run "make clean" twice in a row, it doesn't re-run
> configure in between. It's only when a stale target exists, which seems
> to involve dependencies making a decision.


... and the second time, it is not stale anymore.

(The file NOT existing doesn't trigger action, but the file being "old"
> does.)
>

config-host.mak is only cleaned by distclean, not clean.

So it's an artifact of the way you're using make, and hard to fix then?
>

Maybe not too hard, I suppose one could strip the includes if make goals
are only of the form %clean.

Paolo

*shrug* I'd use 'git clean -fdx' instead but I'm not sure how that
> interacts with multiple submodules.
>

[-- Attachment #2: Type: text/html, Size: 4728 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-15 21:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14 23:10 "make clean" after "git pull" runs configure before cleaning Rob Landley
2024-11-14 23:33 ` Paolo Bonzini
2024-11-15 21:15   ` Rob Landley
2024-11-15 21:45     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).