This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v4] When using the Mozilla NSS library for cryptography, include the NSPR header files


Hello Florian.

On Sat, 11/06/2016 at 15.44 +0200, Florian Weimer wrote:
> On 06/11/2016 01:55 PM, Guido Trentalancia wrote:
> > Such approach suffers the same problem as the {nss,nspr}-config
> > scripts: you need to use pkg-config data from both NSS *and* NSPR
> > in
> > order to get all the needed header files' paths.
> 
> This shouldn't be a problem because pkg-config knows about
> dependenciesÂ
> and will reflect their requirements in the generated command
> lines.ÂÂIfÂ
> it does not, it's a bug in the distribution-provided .pc files.

No, the .pc files that are usually provided by distributions for NSS
only indicate /usr/include/nss3 and don't indicate that
/usr/include/nspr for NSPR is also needed.

That's why I posted the patch (which, for some reason, hasn't been
applied yet).

I suppose NSS/NSPR have not been originally designed to work as
standalone libraries, and the adaptation provided by most distributions
(as {nss,nspr}-config scripts and .pc files) is "buggy" in the sense
that you mean.

NSS header files include NSPR header files by using a relative and not
an absolute path, so the NSPR header files' path MUST be supplied by
also calling nspr-config and/or by also sourcing the nspr.pc file !

> The larger problem is that we do not particularly care about nss, weÂ
> want freebl, and at least Fedora doesn't provide a separate .pc file
> forÂ
> that.ÂÂI suppose I could have that fixed for Fedora, but I don't
> knowÂ
> how painful the process is for other distributions.

There is no need for a separate .pc file for freebl. The problem is
common to other sub-packages that are usually created by distributions:
they include NSPR files by using a relative path while at the same time
their .pc file only provides the path to NSS header files.

The patch that I provided fixes such problem and I recommend you to
commit it !

Regards,

Guido


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]