grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] readd build dependency for startup_raw.S


From: Mike Gilbert
Subject: Re: [PATCH v1] readd build dependency for startup_raw.S
Date: Wed, 16 Aug 2023 21:43:25 -0400

On Wed, Aug 16, 2023 at 3:33 PM Glenn Washburn
<development@efficientek.com> wrote:
>
> Hi Olaf,
>
> There's an extra 'd' in read in the subject line.
>
> On Wed, 16 Aug 2023 11:55:01 +0200
> Olaf Hering <olaf@aepfle.de> wrote:
>
> > startup_raw.S includes a generated file, and used to have a dependency
> > in the Makefile to make sure the generated file exists prior
> > compilation. This dependency was removed, and as a result building
> > startup_raw.S randomly fails:
> >
> > ../../20230814T181249.4fdcb339b/grub-core/boot/i386/pc/startup_raw.S:129:10:
> >  fatal error: rs_decoder.h: No such file or directory
> >   129 | #include <rs_decoder.h>
> >       |          ^~~~~~~~~~~~~~
> > compilation terminated.
> > make: *** [Makefile:34654:
> > boot/i386/pc/lzma_decompress_image-startup_raw.o] Error 1
>
> I don't see this error when building any of the targets that I test.
> This includes i386-pc, which I'm assuming this error comes from (if not
> which?). Are you running make if -jN where N > 1? Does rs_decoder.h
> exist in the fail build directory? (its a generated file) What compiler
> and version are you using?

This is almost certainly a race condition with parallel make jobs. It
might also be possible to trigger it with make --shuffle so that the
build order of targets is randomized.

> When I look at the contents of
> ./grub-core/boot/i386/pc/.deps-core/lzma_decompress_image-startup_raw.Po
> in a successful build directory, I see that GCC figured out that
> rs_decoder.h is a dependency. So I'm not seeing yet why your build is
> failing, but the below change *should* be unnecessary.

I think the .Po files are relevant only for incremental builds -- they
let the build system detect which files need to be updated when
headers are modified.

For an initial clean build, the .Po files will not exist. Any
dependency on generated source files would need to be declared
explicitly.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]