Closed Bug 729067 Opened 8 years ago Closed 8 years ago
.in changes LDFLAGS before calling js/src/configure
Bug 720621 introduced a pair of export/unset calls on LDFLAGS, which clears its variable, so configure ran like: LDFLAGS="..." make -f client.mk build won't work for js/src/configure. While we could just fix this one case, I propose more radical solution which makes already existing variable preserving stronger.
Comment on attachment 599088 [details] [diff] [review] fix v1.0 I tend to agree, here, but I prefer to get some more eyes on this thing. (Ted or Kyle, whoever comes first)
Comment on attachment 599088 [details] [diff] [review] fix v1.0 Review of attachment 599088 [details] [diff] [review]: ----------------------------------------------------------------- Seems reasonable enough to me.
Attachment #599088 - Flags: review?(khuey) → review+
Thanks for reviews, pushed to m-i: https://hg.mozilla.org/integration/mozilla-inbound/rev/e80c939cc639
Backed out for failing to build on all platforms. It may have just needed a clobber, but without a green try run I was hesitant to just clobber/retrigger, since in the meantime we could have had 10 other csets land all burning. https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=e80c939cc639 https://hg.mozilla.org/integration/mozilla-inbound/rev/7dda043db571
Thanks for taking care of the backout. It looks it needs a clobber, I've pushed the patch to try to make sure: https://tbpl.mozilla.org/?tree=Try&rev=6c9bfdf51a1f
It came out that clobbering would not be enough. libffi's configure script is invoked in a bit hackish way for MSVC, so we need to make sure CFLAGS and LDFLAGS are cleared before its invocation. The attached patch is green on try: https://tbpl.mozilla.org/?tree=Try&rev=832cada4b207
Comment on attachment 602297 [details] [diff] [review] fix v1.0 Review of attachment 602297 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/configure.in @@ +5382,5 @@ > # Use a wrapper script for cl and ml that looks more like gcc. > # autotools can't quite handle an MSVC build environment yet. > ac_configure_args="$ac_configure_args LD=link CPP=\"cl -nologo -EP\" SHELL=sh.exe" > + export LDFLAGS= > + export CFLAGS= In practice, what were the flags before your patch, and what are they after? I can't tell if this is harmful without knowing that.
They are exactly the same before and after the patch for me and contain LDFLAGS and CFLAGS that are the result of running js's configure script. These are values I get on MSVC build: LDFLAGS="-LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE -SAFESEH" CFLAGS="-TC -nologo -W3 -Gy -Fd$(COMPILE_PDBFILE) -we4553" The difference is that with my patch, these values get exported by top level configure, so js/src/configure modifies exported values and thus they are visible to libffi's configure. The more I think about it, the less I like the idea of exporting these values. Perhaps avoiding the export/unset calls in the first place is the right way to go after all... I will attach an alternative patch.
The patch that avoids export/unset calls around nspr configure. Since it was introduced for Android as part of bug 720621, I can't test it locally. If we decided to go with this patch, is try build enough for testing?
Comment on attachment 602307 [details] [diff] [review] alternative patch Arguably, we should be doing that for all variables. As for testing, NSPR_LDFLAGS is only set if using Android NDK >= r6b, and our build infrastructure uses r5c, so try won't tell you if that actually works.
My last attempt didn't work, because nspr configure can't handle ./configure CFLAGS="..." syntax. I think it's because of ancient autoconf-2.13 used, but I'm not sure (my experiments suggest that's the reason, it's hard to find any info about it). Thus, I'm back to the solution from comment 6. I will attach a patch that follows the same pattern, but does not export variables on their own. So, if these variables are exported for some reason, we'd behave correctly, but don't export them unless needed. The patch succeeded on try: https://tbpl.mozilla.org/?tree=Try&rev=32ea1f054c62
Attachment #605716 - Flags: review?(mh+mozilla) → review+
Thanks for the review. https://hg.mozilla.org/integration/mozilla-inbound/rev/e1c3e2d27ffc
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.