public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/106162] libstdc++v3: bits/largefile-config.h.tmp: No such file or directory race condition
Date: Fri, 01 Jul 2022 20:49:26 +0000	[thread overview]
Message-ID: <bug-106162-4-jK44zKCo8n@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106162-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106162

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Sergei Trofimovich from comment #0)
> There is a race condition when (I speculate) libstdcv++v3 is built in
> parallel from different 'make' processes. Perhaps for c++98 | c++11 | x++17
> instances?

There are no such instances. It is built separately for each multilib, but each
of those has its own $host_builddir

> 
> From libstdc++-v3/include/Makefile.am:
> 
>   # This header is not installed, it's only used to build libstdc++ itself.
>   ${host_builddir}/largefile-config.h: ${CONFIG_HEADER}
>         @rm -f $@.tmp
>         @-grep 'define _DARWIN_USE_64_BIT_INODE' ${CONFIG_HEADER} >> $@.tmp
>         @-grep 'define _FILE_OFFSET_BITS' ${CONFIG_HEADER} >> $@.tmp
>         @-grep 'define _LARGE_FILES' ${CONFIG_HEADER} >> $@.tmp
>         @mv $@.tmp $@
> 
> As a result 'bits/largefile-config.h' rule gets executed in parallel and

I don't see how that's possible. It's a prerequisite of c++config.h which is
built once per multilib, and parallel make processes will coordinate to only
build the prereq once.

Are you 100% sure you didn't actually run multiple make processes yourself, e.g
by using & instead of && in a shell command?

  parent reply	other threads:[~2022-07-01 20:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 18:10 [Bug libstdc++/106162] New: " slyfox at gcc dot gnu.org
2022-07-01 18:11 ` [Bug libstdc++/106162] " slyfox at gcc dot gnu.org
2022-07-01 20:49 ` redi at gcc dot gnu.org [this message]
2022-07-01 20:51 ` redi at gcc dot gnu.org
2022-07-01 20:54 ` redi at gcc dot gnu.org
2022-07-01 21:29 ` redi at gcc dot gnu.org
2022-07-01 21:40 ` slyfox at gcc dot gnu.org
2022-07-01 21:43 ` cvs-commit at gcc dot gnu.org
2022-07-01 21:43 ` redi at gcc dot gnu.org
2022-07-01 21:43 ` redi at gcc dot gnu.org
2022-07-07 20:39 ` cvs-commit at gcc dot gnu.org
2022-07-07 23:33 ` cvs-commit at gcc dot gnu.org
2022-07-07 23:37 ` redi at gcc dot gnu.org
2022-07-23 11:30 ` cvs-commit at gcc dot gnu.org
2022-07-23 17:35 ` redi at gcc dot gnu.org

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=bug-106162-4-jK44zKCo8n@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).