Mozilla can't be built against system/vendor NSPR with "nspr.pc" configuration.

NEW
Assigned to

Status

--
trivial
9 years ago
9 years ago

People

(Reporter: pka, Assigned: wtc)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
Modern FOSS packages typically provide their development configuration in "pkg-config" files at /usr/lib{,/ARCH}/pkgconfig/*.pc. 

The elder approach of supplying special configuration script ( like /usr/bin/MYPKG-config ) is obsolete and deprecated.

Aged packages, like vanilla NSPR, supply both /usr/lib/pkgconfig/nspr.pc and backward-compatible /usr/bin/nspr-config.

And, in particular, the main Mozilla autoconf script (comm-1.9.1/configure.in) is hardwired to "nspr-config" script.

However, some vendors and distribution builders may choose not to include obsolete /usr/bin/MYPKG-config's in the development packages where *.pc configuration exists.

On such systems giving --with-system-nspr option to "configure" breaks build. At some early point "configure" outputs:

| checking for nspr-config... no
| checking for NSPR - version >= 4.8.0... no

this still does not break build, but silently ignores system NSPR and attempts to build the bundled NSPR. But a bit later:

| configuring in js/src
| ...
| configure: error: --with-system-nspr and --with-nspr-libs/cflags are mutually exclusive.
Stop.

So, Mozilla configuration should be updated:

1) to respect "nspr.pc" as well as nspr-config
2) to stop build with error message if --with-system-nspr requested, but not found. This is because "configure" shouldn't fool the user pretending the request completed successfully.

Please, pay attention to the fact, that the NSPR-checking macro exists in at least 4 places in the Mozilla tree:

bash$ find . -name nspr.m4
./mozilla/nsprpub/config/nspr.m4
./mozilla/build/autoconf/nspr.m4
./mozilla/js/src/build/autoconf/nspr.m4
./directory/c-sdk/config/autoconf/nspr.m4

Comment 1

9 years ago
This is a script provided by NSPR itself. The other parts of the tree just use it.
Assignee: nobody → wtc
Component: Build Config → NSPR
Product: Core → NSPR
QA Contact: build-config → nspr
Version: 1.9.1 Branch → 4.4
(Assignee)

Comment 2

9 years ago
Ben: this is a bug about mozilla/configure.  It says that when
--with-system-nspr is specified, mozilla/configure should be able
to use either nspr.pc or nspr-config, preferring nspr.pc, and
mozilla/configure should fail if neither nspr.pc nor nspr-config
can be found.
Assignee: wtc → nobody
Component: NSPR → Build Config
Product: NSPR → Core
QA Contact: nspr → build-config
Version: 4.4 → 1.9.1 Branch

Comment 3

9 years ago
Yes, and this is a feature request for nsprpub/config/nspr.m4. Mozilla just copies the file that NSPR provides for this purpose.
Assignee: nobody → wtc
Component: Build Config → NSPR
Product: Core → NSPR
QA Contact: build-config → nspr
Version: 1.9.1 Branch → 4.3
(Reporter)

Comment 4

9 years ago
This issue has low importance. One day the nspr.pc would be touched for other reason, it would be fortunate moment to fix this issue too.
Severity: normal → trivial
You need to log in before you can comment on or make changes to this bug.