NSPR should use UNIFIED_SOURCES
Categories
(NSPR :: NSPR, enhancement)
Tracking
(Not tracked)
People
(Reporter: away, Assigned: away)
References
Details
Attachments
(4 files, 2 obsolete files)
1.74 KB,
patch
|
KaiE
:
review+
KaiE
:
checked-in+
|
Details | Diff | Splinter Review |
962 bytes,
patch
|
KaiE
:
review+
KaiE
:
checked-in+
|
Details | Diff | Splinter Review |
3.98 KB,
patch
|
Details | Diff | Splinter Review | |
4.38 KB,
patch
|
KaiE
:
review+
KaiE
:
checked-in+
|
Details | Diff | Splinter Review |
In a build log I happened to notice a large number of non-unified files coming from https://searchfox.org/mozilla-central/source/config/external/nspr/pr/moz.build
Two small fixes for issues that only showed up in a unified build:
-
_MD_win32_map_connect_error in reality returns void
-
_pr_test_ipv6_socket is a PR_IMPLEMENT, so the declaration needs PR_EXTERN.
I'm quite pleased that only two files needed hand-holding. \o/
Updated•5 years ago
|
Comment 4•5 years ago
|
||
David, could you please add a reference that explains the meaning of unified sources?
(In reply to Kai Engert (:kaie:) from comment #4)
David, could you please add a reference that explains the meaning of unified sources?
Sure, here's one: https://lists.mozilla.org/pipermail/dev-platform/2013-November/001998.html
Some projects also refer to them as unity or jumbo builds: https://groups.google.com/a/chromium.org/d/msg/chromium-dev/ThDAjO7fTro/nXX8kJFBAgAJ
Updated•5 years ago
|
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
I can uplift an NSPR 4.21 snapshot into mozilla-inbound soon, and can include the moz.build changes at the same time, if you want.
(In reply to Kai Engert (:kaie:) from comment #7)
I can uplift an NSPR 4.21 snapshot into mozilla-inbound soon, and can
include the moz.build changes at the same time, if you want.
Works for me, thanks!
Pushed by kaie@kuix.de: https://hg.mozilla.org/integration/mozilla-inbound/rev/5b4cd1f37414 Use UNIFIED_SOURCES in NSPR, r=glandium
Comment 10•5 years ago
|
||
Backed out 2 changesets (Bug 1526010, Bug 1520646) mass mochitest failures UPGRADE_NSPR_RELEASE CLOSED TREE
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=227179183&repo=mozilla-inbound&lineNumber=9761
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=227179103&repo=mozilla-inbound&lineNumber=4887
Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/42763a2bd75901be5380580a9817c06a4c9a8a2a
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 11•5 years ago
|
||
Oh, oops, I accidentally typed this on the other bug in the push. Pasting it here for completeness:
Kai, unless you can see some other reason for the failure within the NSPR code changes, then I think it's likely that the unified build patch revealed some additional subtle issues that only came up at runtime. I'll look more into it...
Comment 12•5 years ago
|
||
David, it should be fine to have the "NSPR repo fixes" changes in the mozilla tree, while not yet having the "moz.build changes", right?
(If yes, I can uplift the NSPR beta snapshot again, and let you handle the build changes on your own, separately. You might want to use a separate bug in the firefox build system component for that.)
Updated•5 years ago
|
Assignee | ||
Comment 13•5 years ago
|
||
(In reply to Kai Engert (:kaie:) from comment #12)
David, it should be fine to have the "NSPR repo fixes" changes in the
mozilla tree, while not yet having the "moz.build changes", right?(If yes, I can uplift the NSPR beta snapshot again, and let you handle the
build changes on your own, separately. You might want to use a separate bug
in the firefox build system component for that.)
To answer your question very narrowly: yes, it should be safe to land the first patch containing the NSPR repo fixes by itself.
But: is it ok if I take some time to diagnose the failures first? If the investigation turns up more issues that need to be fixed on the NSPR side, I would be sad to have to wait potentially another 5 months for the next merge.
Comment 14•5 years ago
|
||
David, no need to worry, I don't want to declare a release yet! We have rougly 4 weeks until the end of the current 6 weeks cycle, I'd like to release NSPR 4.21 at the end of the current dev cycle, maybe around March 4th.
The reason I'd like to uplift the current NSPR snapshot into m-i is for testing it in nightly FF builds, but it's fine to make more changes.
Assignee | ||
Comment 15•5 years ago
|
||
The cause of the test failures was w32poll.c, which wanted a custom value of FD_SETSIZE used during its include of winsock.h
But in the process of investigating this, I set FILES_PER_UNIFIED_FILE = 999
to tease out other latent issues by maximizing the amount of crowdedness/interference in the unified translation units, and I'll add the additional fixes for those issues here too.
Assignee | ||
Comment 16•5 years ago
|
||
Updates some more declarations to match their definitions.
Assignee | ||
Comment 17•5 years ago
|
||
Here's the updated moz.build, though I'm not quite sure what to do about this process-wise. I guess once we have the NSPR bits in place I can do this in a separate build system bug like you said.
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Comment on attachment 9043476 [details] [diff] [review] More NSPR repo fixes https://hg.mozilla.org/projects/nspr/rev/40ce5d162994
Updated•5 years ago
|
Assignee | ||
Comment 19•5 years ago
|
||
Kai, I have one more issue that I was getting ready to work around on the moz.build side, but actually now I'm wondering if it is a code problem.
unix.c defines its own _pr_rename_lock in addition to the ptio.c one:
https://searchfox.org/mozilla-central/search?q=_pr_rename_lock&redirect=false
But nothing in unix.c refers to it meaningfully (just Init and Cleanup). Was there intended to be some use of this variable (in which case I'll de-unify that file so the two variables don't interfere with each other) or should the unix one simply be removed?
Comment 20•5 years ago
|
||
Let's reopen if this isn't done.
unix.c defines its own _pr_rename_lock in addition to the ptio.c one:
https://searchfox.org/mozilla-central/search?q=_pr_rename_lock&redirect=falseBut nothing in unix.c refers to it meaningfully (just Init and Cleanup).
I see additional uses _MD_rename, _MD_mkdir, _MD_Open
Both files the variable is declared "static", that means it isn't visible outside the scope of the file.
Why do you consider that variable problem?
Was there intended to be some use of this variable
I don't know the history. But it seems it's indeed being used, or do I miss anything?
(in which case I'll de-unify
do you mean, rename it? Why would it be necessary, it the variables are static?
that file so the two variables don't interfere with each other)
Because both are defined static, I'd assume they don't interfere?
Assignee | ||
Comment 21•5 years ago
|
||
(In reply to Kai Engert (:kaie:) from comment #20)
I see additional uses _MD_rename, _MD_mkdir, _MD_Open
Oh, sorry, I didn't see those in the "uses" section.
Because both are defined static, I'd assume they don't interfere?
During the unification process, the two files are concatenated into a single .c file, and (TIL) the C language will silently allow the redefinition, so they become the same variable. Scary.
So I'll need to remove one of those two files from the unified set.
Comment 22•5 years ago
|
||
I suggest to simply rename the variable in one of the files.
Assignee | ||
Comment 23•5 years ago
|
||
Comment 24•5 years ago
|
||
Comment on attachment 9045489 [details] [diff] [review] Rename unix.c's _pr_rename_lock to avoid unified-build conflict with ptio.c. https://hg.mozilla.org/projects/nspr/rev/202055079f59
Assignee | ||
Comment 25•5 years ago
|
||
Thanks Kai. Knock on wood, that should be all the NSPR changes that we need. I'll land the moz.build separately as you suggested.
Description
•