Closed Bug 553252 Opened 14 years ago Closed 4 years ago

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

Categories

(NSPR :: NSPR, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: grapvar, Assigned: wtc)

Details

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
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
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
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
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

This was fixed in bug 1641775

Status: NEW → RESOLVED
Closed: 4 years ago
QA Contact: jjones
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.