Arsen Arsenović <ar...@aarsen.me> writes:

> Regstrapped on x86_64-pc-linux-gnu.  I've also checked the generated
> dependency files are correct by hand and "instrumented" the build to
> fail if two dependency files are the same, by doing the following:
>
>   DPOSTCOMPILE = ! test -f $(DEPFILE).Po && mv ...
>
> ... and confirmed no further conflicts of this sort happen.
>
> OK for trunk?
> ---------- >8 ----------
> Currently, the dependency files for root-file.o and common-file.o were
> both d/.deps/file.Po, which would cause parallel builds to fail
> sometimes with:
>
>   make[3]: Leaving directory 
> '/var/tmp/portage/sys-devel/gcc-14.1.1_p20240511/work/build/gcc'
>   make[3]: Entering directory 
> '/var/tmp/portage/sys-devel/gcc-14.1.1_p20240511/work/build/gcc'
>   mv: cannot stat 'd/.deps/file.TPo': No such file or directory
>   make[3]: *** 
> [/var/tmp/portage/sys-devel/gcc-14.1.1_p20240511/work/gcc-14-20240511/gcc/d/Make-lang.in:421:
>  d/root-file.o] Error 1 shuffle=131581365
>
> Also, this means that dependencies of one of root-file or common-file
> are missing when developing.  After this patch, those two files get
> assigned dependency files d/.deps/d-root-file.o.Po and
> d/.deps/d-common-file.o.Po respectively.
>
> There are other files with similar conflicts (mangle-package.o,
> visitor-package.o for instance).

I'm also seeing this for some degrees of parallelism
(x86_64-pc-linux-gnu -j64, sparc-sun-solaris2.11 -j64 and -j96, not
i386-pc-solaris2.11 -j28), always for visitor-package.o.

I can confirm that your patch fixes the problem.

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to