Closed Bug 463339 Opened 16 years ago Closed 16 years ago

JS engine build system doesn't update existing libmozjs.so in depend builds.

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jst, Assigned: jimb)

Details

(Keywords: fixed1.9.1)

Attachments

(2 files)

Doing a depend build of Firefox copies libmozjs.so into dist/bin in the obj dir, making a change in the JS engine source and rebuilding doesn't update the libmozjs.so file in the obj directory. There's a dist/bin directory in js/src as well as in the top of the firefox object directory, so I don't know if that's part of the confusion or not. Also, seems like we'd want there to be a symbolic link in the dist/bin directory, rather than a copy of the file. This is biting developers, so we should attempt to fix this ASAP.
Does it work to 'cd $objdir/config/js; make' after doing the build in $objdir/js/src?
(Not as a proper fix, of course; just to work around.)
Sadly, no. Deleting libmozjs.so out of the proper dist/bin directory and re-making in js/src and js/src/config does not put the file back into the dist/bin directory.
Duh, yes, making in config/js (as opposed to js/src/config) does indeed copy the file into the right place.
A directory's 'libs' target should create symlinks in the top-level dist/bin and dist/lib directories to the libraries (and any other generated files) in the build tree, so that when one has changed sources in $src/js/src, simply running 'make' in $obj/js/src and then re-running $obj/dist/bin/firefox will pick up the new libraries. The js/src/Makefile.in 'install' target has many double-colon rules with commands; we'd like to use these all in two circumstances: . For 'make install' in a stand-alone js/src build. Since we're following GNU behavior, this should copy the files it's installing. . For 'make libs' in an in-tree js/src build. To interact properly with the rest of the Mozilla build system, this should create symlinks as explained above. To accomplish this, we use plain old $(INSTALL) in all the install targets, have js/src/Makefile.in set NSDISTMODE to copy (to get the GNU behavior), and then have config/js/Makefile.in override that (to get the Mozilla in-tree behavior).
Attachment #348103 - Flags: review?(benjamin)
Ben, you were concerned with my use of NSDISTMODE in the original 97954 patch; I think the attached patch is suggesting going back to something that resembles this behavior, so I wanted you to review it. I've put my rationale in the comments, with more details in the log message; what do you think?
Attachment #348103 - Flags: review?(benjamin) → review+
Attachment #348103 - Flags: approval1.9.1b2?
Attachment #348103 - Flags: approval1.9.1b2? → approval1.9.1b2+
Whiteboard: checkin-needed
Pushed baff98e6d9ec
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 348103 [details] [diff] [review] Bug 463339: Have js/src use symlinks when installing in dist. We're closing up for beta2 and this hasn't landed yet, so we'll hold off until after we branch.
Attachment #348103 - Flags: approval1.9.1b2-
Attachment #348103 - Flags: approval1.9.1b2+
Attachment #348103 - Flags: approval1.9.1?
(unless this blocks, at which point someone should mark it as such)
Assignee: jim → nobody
Component: JavaScript Engine → Build Config
QA Contact: general → build-config
Comment on attachment 348103 [details] [diff] [review] Bug 463339: Have js/src use symlinks when installing in dist. a191=beltzner
Attachment #348103 - Flags: approval1.9.1? → approval1.9.1+
I'm testing a revised patch for this now.
[minor revision; see handling of NSDISTMODE.] A directory's 'libs' target should create symlinks in the top-level dist/bin and dist/lib directories to the libraries (and any other generated files) in the build tree, so that when one has changed sources in $src/js/src, simply running 'make' in $obj/js/src and then re-running $obj/dist/bin/firefox will pick up the new libraries. The js/src/Makefile.in 'install' target has many double-colon rules with commands; we'd like to use these all in two circumstances: . For 'make install' in a stand-alone js/src build. Since we're following GNU behavior, this should copy the files it's installing. . For 'make libs' in an in-tree js/src build. To interact properly with the rest of the Mozilla build system, this should create symlinks as explained above. To accomplish this, we use plain old $(INSTALL) in all the install targets, have js/src/Makefile.in set NSDISTMODE to copy (to get the GNU behavior), and then have config/js/Makefile.in override that (to get the Mozilla in-tree behavior).
Attachment #351283 - Flags: review?(benjamin)
Whiteboard: checkin-needed
Assignee: nobody → jim
Attachment #351283 - Flags: review?(benjamin) → review+
Landed in Mozilla Central, changeset 1fa974797b0c.
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
I don't think this bug needs to be landed in 1.9.1, as the problem ended up being fixed in a different way by bug 471188: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/27a7287e4809
Keywords: fixed1.9.1
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: