[Issue 7714] New: Building d-programming-language.org fails to build phobos when built with multiple jobs.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 15 05:29:57 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7714

           Summary: Building d-programming-language.org 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
        AssignedTo: nobody at puremagic.com
        ReportedBy: schveiguy at yahoo.com


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

$(DRUNTIME) :
        $(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:

../d-programming-language.org/std.ddoc
-Df../d-programming-language.org/web/phobos/std_algorithm.html 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 d-programming-language.org
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
$(DRUNTIME).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list