Closed
Bug 271929
(Rest_the_camel!)
Opened 20 years ago
Closed 20 years ago
Remove config/build-list.pl, config/purge-old-headers.pl, and .headerlist from the build process
Categories
(SeaMonkey :: Build Config, defect)
SeaMonkey
Build Config
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: engel, Unassigned)
Details
Attachments
(2 files)
|
8.48 KB,
patch
|
Details | Diff | Splinter Review | |
|
55.61 KB,
application/x-zip
|
Details |
Remove the perl scripts config/build-list.pl and config/purge-old-headers.pl and
the temporary .headerlist from the build process.
These scripts originate from Bug 59454, Comment 17. They have the following
purpose. If the header "header.h" is moved from module_1 to module_2, the build
system should ensure that the copy in "dist/include/module_1/header.h" is removed.
The current build cycle works as follows.
1) Initially, there is no .headerlist in dist/include/module_1/, effectively
marking all files in dist/include/module_1/ for deletion.
2) During the build, all encountered headers in module_1 (including those
resulting from .idl files) are nsinstalled to dist. Then, "build-list.pl"
adds the corresponding filenames to dist/include/module_1/.headerlist.
3) Finally, "purge-old-headers.pl" removes all files in dist/include/module_1/
which are not marked in .headerlist. It also removes .headerlist itself.
In summary, all headers which are not nsinstalled will be removed.
Thus, the build procedure can be substantially simplified by just
1) Initially, run "rm -rf dist/include".
2) As before, nsinstall all encountered headers to dist/include/module_1.
| Reporter | ||
Updated•20 years ago
|
Alias: Rest_the_camel!
| Reporter | ||
Comment 1•20 years ago
|
||
implying to also "cvs remove config/purge-old-headers.pl"
(note: config/build-list.pl is still needed to build the list of libraries)
Comment 2•20 years ago
|
||
does nsinstall preserve the timestamp of the .h files? because otherwise, I
suspect this will triggere a full rebuild on each make, which would be undesirable.
| Reporter | ||
Comment 3•20 years ago
|
||
Thank you for commenting so quickly. I completely agree, a full rebuild must
not be tolerated. However, I do not think that full rebuilds will be triggered
with the proposed patch.
Since the current build system avoids full rebuilds, we can just compare the
cases where there is already a header in dist/include (current code) with the
case where the header has been deleted (proposed code). As far as I have
understood, nsinstall basically runs in two different modes.
i) When nsinstall is run in copy-mode and if there is already a file in the dist
directory, it will be removed before copying,
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/config/nsinstall.c&rev=3.24&root=/cvsroot#178
So both the current and the proposed code create a new file and there is no
difference in mtime handling or in performance.
ii) In symlink-mode, nsinstall keeps a symlink if it already exists (current
code), otherwise a new link is created (proposed code).
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/config/nsinstall.c&rev=3.24&root=/cvsroot#435
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/config/nsinstall.c&rev=3.24&root=/cvsroot#442
Since for |make|, the mtime of the link target is relevant, there is no
difference between current and proposed code. Regarding performance, the
cost is |readlink()| (current) vs. |symlink()| (new).
Thus, I think that there are no additional rebuilds. Performance of nsinstall
should not be significantly decreased (leading to an overall faster compilation,
since the perl scripts are not run).
IIRC, under the old nmake build system, win32 used makecopy.exe which did not
preserve timestamps so removing $(DIST)/include would cause a full rebuild.
That's no longer the case.
The only problem I see with the 'rm -rf' solution is that it will erase
everything under $(DIST)/include rather than just the headers in the directories
with .headerlist. It's not a big deal for our in-tree modules but other
applications that build on top of our tree, it may be a problem since
$(DIST)/include will no longer be preserved between build cycles.
| Reporter | ||
Comment 5•20 years ago
|
||
I see. Building an application on top of mozilla with `make application; make
mozilla' would be ok, however, the dist/include would be incomplete. So one
must use `make mozilla; make application' for a successful build and a complete
dist/include.
Similarly, a lone `make mozilla' would be bad while a lone `make application' is
fine.
PS: cls, thank you for the historical background!
| Reporter | ||
Updated•20 years ago
|
Attachment #167155 -
Flags: review?(cls)
Attachment #167155 -
Flags: review?(cls) → review?(bsmedberg)
Comment 6•20 years ago
|
||
I am inclined to WONTFIX this bug. I don't particularly like the .headerlist
files, but I think that rm -rf dist/include is worse, and it does affect
build-on-top applications.
Is there any reason to do this other than build simplification and perhaps some
small time savings?
| Reporter | ||
Comment 7•20 years ago
|
||
bsmedberg: Could you please explain how |rm -rf dist/include| "affects
build-on-top applications" and give the shell build commands (e.g,
|./configure-app; make this; make that;|) which would be broken by the current
patch? This would be very helpful regarding this and future efforts on dealing
with .headerlists.
The main reason for this bug is indeed build simplification. (Since the current
build system uses several somewhat obscure and non-standard mechanisms, I think
that simplifications are good.)
However, if there is a realistic scenario which would be badly broken by this
patch, I would strongly support WONTFIXing this bug.
| Reporter | ||
Comment 8•20 years ago
|
||
Currently, there seems little interest in this issue. BSD written me that he
doesn't "want to change the build system at this point unless there is a
definite benefit being provided."
I think that a great benefit would result from reducing the complexity of
mozilla's build system, since this would significantly reduce the entry barrier
for tinkering with mozilla. However, the proposed change is only a small step
into this direction and so the benefit of the proposed solutions is small. I
agree that this issue has a low priority.
Consequently, I follow Comment 6 and mark this bug as WONTFIX. Please reopen if
resources for reviewing become available.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
Comment 9•20 years ago
|
||
OK, I've decided to go ahead and do this... I'll be watching the tinderbox cycle
times to see whether it significantly hurts build time.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Comment 10•20 years ago
|
||
Landed on trunk.
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta2
Updated•20 years ago
|
Attachment #167155 -
Flags: review?(benjamin)
Comment 11•20 years ago
|
||
For whatever reason, this patch is not correct. My Win32 builds are constantly
ending up in horked states because of this patch. For some reason, dist/include
is not getting rebuilt correctly, so I have to manually 'make export' in various
subdirectories in order to get my build working again. It has come to the point
that I am afraid to type 'make -f client.mk build' anymore. Am I the only one
seeing this problem? I'm pulling my hair out over this change :-(
Comment 12•20 years ago
|
||
BTW, I'm experiencing this problem while building XULRunner/LibXUL. Maybe the
problem only impacts that build, because others have said that they aren't
seeing this. I certainly haven't seen a problem while building firefox on
linux. And, biesi says that seamonkey on linux is fine too.
Comment 13•20 years ago
|
||
It appears to me as though 'make export' never happens in
toolkit/components/startup before we start compiling in toolkit/xre :-(
Comment 14•20 years ago
|
||
Ok, nevermind. I think the problem has nothing to do with this patch actually.
The LIBXUL build code was doing |echo "make export" make export|, which is a
bit of an oops ;-)
Updated•20 years ago
|
Target Milestone: mozilla1.8beta2 → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•