Summary: Building fails to build
                    phobos when built with multiple jobs.
           Product: D
           Version: D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Steven Schveighoffer <> 2012-03-15 
05:30:08 PDT ---
Phobos's posix.mak has a rule:

        $(MAKE) -C $(DRUNTIME_PATH) -f posix.mak MODEL=$(MODEL)

which builds druntime if it's not already built.  However, this *also* builds
.di files for druntime's src/import.

But none of the rules in phobos make any ddoc output depend on druntime.  So if
I go to a clean phobos (with a clean dependent druntime), and do make -f
posix.mak html, it fails with the following error:

-Df../ std/algorithm.d
std/c/string.d(12): Error: module string is in file 'core/stdc/string.d' which
cannot be read

But if I make -f posix.mak release html, it works, because then druntime is
first built.

Now, this is not necessarily a problem, because
builds phobos using release html.  However, it builds with multiple jobs (-j
4).  It also cleans out druntime before building.  So what ends up happening
is, druntime is a requirement for the release target, so running make for
druntime consumes one job.  But it's not a requirement for the ddoc tasks, so
it starts building those tasks.  If it gets to a ddoc file (such as
std_algorithm.html) which requires druntime imports *before* druntime has
finished building, the whole build fails.

This *might not* fail on other systems, depending on how fast druntime builds
(it's a race condition).  But I think all ddoc files should depend on

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to