Closed
Bug 604263
Opened 14 years ago
Closed 14 years ago
NSPR parallel building chokes on debug windows
Categories
(NSPR :: NSPR, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
4.8.7
People
(Reporter: khuey, Assigned: khuey)
References
Details
(Keywords: regression)
Attachments
(2 files, 2 obsolete files)
750 bytes,
patch
|
wtc
:
review+
|
Details | Diff | Splinter Review |
1.01 KB,
patch
|
Details | Diff | 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 1•14 years ago
|
||
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-
Assignee | ||
Comment 2•14 years ago
|
||
Ah, good catch. Comments addressed.
Attachment #483034 -
Attachment is obsolete: true
Attachment #483040 -
Flags: review?(wtc)
Comment 3•14 years ago
|
||
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+
Assignee | ||
Comment 4•14 years ago
|
||
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.
Comment 5•14 years ago
|
||
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
Comment 6•14 years ago
|
||
(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.
Assignee | ||
Comment 7•14 years ago
|
||
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.
Comment 8•14 years ago
|
||
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.
Comment 9•14 years ago
|
||
khuey: should we turn off NSPR parallel builds for VC7.1
or earlier?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: --- → 4.8.7
Comment 10•14 years ago
|
||
khuey: can you fix the problem reported by neil in comment 8?
Thanks.
OS: Windows 7 → Windows XP
Updated•14 years ago
|
OS: Windows XP → Windows 7
Assignee | ||
Comment 11•14 years ago
|
||
Ah, sorry, that bugmail slipped through the cracks somehow. I'll get to it soon.
Comment 12•14 years ago
|
||
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.
Assignee | ||
Comment 13•14 years ago
|
||
This should be all that's needed, but I don't have an old enough compiler to test.
Attachment #498134 -
Flags: review?
Assignee | ||
Updated•14 years ago
|
Attachment #498134 -
Flags: review? → review?(wtc)
Comment 14•14 years ago
|
||
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 15•14 years ago
|
||
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+
Comment 16•14 years ago
|
||
neil: could you contribute your patch? Thanks.
Comment 17•14 years ago
|
||
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
Updated•14 years ago
|
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 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.
Description
•