www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: schveiguy yahoo.com


--- Comment #0 from Steven Schveighoffer <schveiguy 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: -------
Mar 15 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7714



--- Comment #1 from Steven Schveighoffer <schveiguy yahoo.com> 2012-03-15
05:34:29 PDT ---
(In reply to comment #0)

 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

Somehow, I cut off the full compile line. This should be: ../dmd.2.058/src/dmd -m32 -d -c -o- -version=StdDdoc -I../druntime.2.058/import ../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 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 15 2012