Closed Bug 620788 Opened 14 years ago Closed 13 years ago

Do not silently fall back to bundled NSS/NSPR if system ones can't be used

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla2.0b12

People

(Reporter: jeremyhu, Assigned: mounir)

References

Details

Attachments

(1 file, 2 obsolete files)

I'm building 4.0b8 the same way as 4.0b7, but configure is failing now with:

configure: error: --with-system-nspr and --with-nspr-libs/cflags are mutually exclusive.
See 'configure --help'.
configure: error: ./configure failed for js/src

but I did not pass in --with-nspr-libs/cflags.  You can see the full set of options below.  The only nspr options are --with-system-nspr --with-nspr-prefix=/opt/local


shell command " cd "/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_devel_xulrunner-devel/work/mozilla-central" && ./configure --prefix=/opt/local --with-xulrunner-stub-name=xulrunner-stub --disable-static --enable-shared --with-distribution-id=org.macports --enable-default-toolkit=cairo-gtk2 --x-includes=/opt/local/include --x-libraries=/opt/local/lib --with-system-nspr --with-nspr-prefix=/opt/local --with-system-nss --with-nss-prefix=/opt/local --with-system-bzip2=/opt/local --with-system-jpeg=/opt/local --with-system-zlib=/opt/local --enable-system-lcms --enable-system-cairo --enable-system-sqlite --with-default-mozilla-five-home=/opt/local/lib/xulrunner-devel --enable-oji --enable-plugins --enable-mathml --enable-extensions="default,spellcheck" --enable-permissions --enable-cookie --enable-image-decoders=all --enable-image-encoder=all --enable-canvas --enable-jsd --disable-xpctools --enable-crypto --enable-pango --enable-svg --enable-svg-renderer=cairo --enable-xinerama --with-pthreads --enable-postscript --enable-safe-browsing --disable-crashreporter --enable-optimize='-O2' --disable-prebinding --enable-strip --enable-install-strip --disable-debug --disable-installer --disable-updater --disable-pedantic --disable-tests --disable-mochitest --disable-necko-wifi --enable-libxul --enable-gnomevfs --enable-gnomeui " returned error 1
Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details)
Paul: any chance this is fallout from your configure sync-up?
(In reply to comment #1)
> Paul: any chance this is fallout from your configure sync-up?

Doesn't look like it. I think what's happening here is that top-level configure is adding --with-nspr-libs and --with-nspr-cflags to js/src/configure.in. It would do this if the NSPR check fails. I can reproduce this error with 4.8.4 (it checks for 4.8.6):

checking for NSPR - version >= 4.8.6... no


Jeremy: what version of nspr are you using? Does the configure check for NSPR succeed? if so, can we see your config.log?
nspr is version 4.8.6.

it's actually checking for 4.8.7 (which hasn't been released yet to http://ftp.mozilla.org/pub/mozilla.org/nspr/releases) ... ditto for nss:

checking for nspr-config... /opt/local/bin/nspr-config
checking for NSPR - version >= 4.8.7... no
checking for nss-config... /opt/local/bin/nss-config
checking for NSS - version >= 3.12.9... no
I'm guessing this will "just work" once nspr and nss get bumped.
Ah. We should at least make this fail in a more useful way, then. FWIW, the NSS/NSPR versions were bumped in bug 599324. I don't think we really needed the NSPR bump, but apparently we took it anyway.
Attached patch Patch v1 (obsolete) — Splinter Review
This make configure fails if --with-system-ns{s,pr} is set but the version is too old.

Why don't we always fail if the user asked for the system library and we can't use it? It seems very confusing for the user to silently fall back on the bundled library.
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #509114 - Flags: review?(khuey)
Comment on attachment 509114 [details] [diff] [review]
Patch v1

I agree that silently ignoring the specified option is bad.  Please make the same changes to js/src/'s copy of these files.
Attachment #509114 - Flags: review?(khuey) → review+
Attached patch Patch v2 (obsolete) — Splinter Review
Re-requesting a review just to be sure.
Attachment #509114 - Attachment is obsolete: true
Attachment #509134 - Flags: review?(khuey)
Attachment #509134 - Flags: approval2.0?
Severity: major → normal
OS: Mac OS X → All
Hardware: x86 → All
Summary: 4.0b8 regression: configure incorrectly errors, reporting --with-system-nspr and --with-nspr-libs/cflags are mutually exclusive → Do not silently fall back to bundled NSS/NSPR if system ones can't be used
js/src has copies of build/autoconf/foo.m4 too.
Attached patch Patch v2.1Splinter Review
Attachment #509134 - Attachment is obsolete: true
Attachment #509138 - Flags: review?(khuey)
Attachment #509138 - Flags: approval2.0?
Attachment #509134 - Flags: review?(khuey)
Attachment #509134 - Flags: approval2.0?
Comment on attachment 509138 [details] [diff] [review]
Patch v2.1

Er, ignore that last one.

r=me
Attachment #509138 - Flags: review?(khuey) → review+
Attachment #509138 - Flags: approval2.0? → approval2.0+
Pushed:
http://hg.mozilla.org/mozilla-central/rev/10c5b6239ce3
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b12
Blocks: 802365
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: