Closed Bug 604263 Opened 14 years ago Closed 14 years ago

NSPR parallel building chokes on debug windows

Categories

(NSPR :: NSPR, defect, P1)

4.8.7
x86
Windows 7
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: khuey, Assigned: khuey)

References

Details

(Keywords: regression)

Attachments

(2 files, 2 obsolete files)

Attached patch Patch (obsolete) — Splinter Review
PDB files don't have an explicit target in the NSPR makefiles. Thus, when doing a parallel debug build on windows make will error complaining that there is no target to build the PDB. This is not an issue with -j1 because the PDB dependency is after the SHARED_LIB dependency, so by the time the shared library has finished the PDB has been generated as a byproduct. The solution is to make a PDB target that depends explicitly on the shared library. I missed this because | make clean | in mozilla's tree calls make clean in NSPR which doesn't remove the generated binaries/pdbs/etc. I filed Bug 604260 to fix that.
Attachment #483034 - Flags: review?(wtc)
Comment on attachment 483034 [details] [diff] [review] Patch Thanks for the patch. >+# PDBs need to depend on the shared lib to order dependencies properly >+$(SHARED_LIB_PDB):: $(SHARED_LIB) BUG: SHARED_LIB is a typo. It should be SHARED_LIBRARY. Use the single colon (:) rule here. I suggest you add the rule here, next to the similar rule for $(IMPORT_LIBRARY): http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/nsprpub/config/rules.mk&rev=3.77&mark=309#308
Attachment #483034 - Flags: review?(wtc) → review-
Attached patch PatchSplinter Review
Ah, good catch. Comments addressed.
Attachment #483034 - Attachment is obsolete: true
Attachment #483040 - Flags: review?(wtc)
Comment on attachment 483040 [details] [diff] [review] Patch r=wtc. Thanks. Do you have a good way to test this? How did the previous incorrect patch pass your tests?
Attachment #483040 - Flags: review?(wtc) → review+
See the last bit of comment 0. I missed this previously because I wasn't building in a completely clean object dir. If you have a clean objdir and build with a reasonable -jN (I'm using -j4) you'll hit it every time.
Checking in config/rules.mk; /cvsroot/mozilla/nsprpub/config/rules.mk,v <-- rules.mk new revision: 3.78; previous revision: 3.77 done
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
(In reply to comment #4) I know. I'm just wondering why your previous fix with a typo: >+$(SHARED_LIB_PDB):: $(SHARED_LIB) passed your testing.
Because the actual target is irrelevant, all that matters is that we have a target for make to find. It won't try to install anything until all the dependencies have finished, at which point the PDB has been generated.
Note that this still breaks with VC7.1 debug or earlier, since it can't open the PDB file in parallel, and nspr's rules.mk doesn't have the .NOTPARALLEL ifdef.
khuey: should we turn off NSPR parallel builds for VC7.1 or earlier?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: --- → 4.8.7
khuey: can you fix the problem reported by neil in comment 8? Thanks.
OS: Windows 7 → Windows XP
OS: Windows XP → Windows 7
Ah, sorry, that bugmail slipped through the cracks somehow. I'll get to it soon.
khuey: ping. neil: do you know how to fix the problem you reported in comment 8? It seems that we just need to add .NOTPARALLEL.
Attached patch Patch (add .NOTPARALLEL) (obsolete) — Splinter Review
This should be all that's needed, but I don't have an old enough compiler to test.
Attachment #498134 - Flags: review?
Attachment #498134 - Flags: review? → review?(wtc)
Comment on attachment 498134 [details] [diff] [review] Patch (add .NOTPARALLEL) r=wtc. neil: could you please test this patch? >+# Disallow parallel builds with MSVC < 8 khuey: The comment should explain why. You can just quote what neil said in comment 8: Parallel builds break with VC7.1 debug or earlier, since it can't open the PDB file in parallel.
Attachment #498134 - Attachment description: Patch → Patch (add .NOTPARALLEL)
Attachment #498134 - Flags: review?(wtc)
Attachment #498134 - Flags: review?(neil)
Attachment #498134 - Flags: review+
Comment on attachment 498134 [details] [diff] [review] Patch (add .NOTPARALLEL) Yes, this works (although I actually use a slightly enhanced version myself).
Attachment #498134 - Flags: review?(neil) → review+
neil: could you contribute your patch? Thanks.
I edited khuey's a bit and checked it in on the NSPR trunk (NSPR 4.8.7). Checking in rules.mk; /cvsroot/mozilla/nsprpub/config/rules.mk,v <-- rules.mk new revision: 3.79; previous revision: 3.78 done
Attachment #498134 - Attachment is obsolete: true
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Priority: -- → P1
Resolution: --- → FIXED
Version: other → 4.8.7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: