This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4] When using the Mozilla NSS library for cryptography, include the NSPR header files
- From: Guido Trentalancia <guido at trentalancia dot net>
- To: Florian Weimer <fweimer at redhat dot com>, Mike Frysinger <vapier at gentoo dot org>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Sat, 11 Jun 2016 18:18:48 +0200
- Subject: Re: [PATCH v4] When using the Mozilla NSS library for cryptography, include the NSPR header files
- Authentication-results: sourceware.org; auth=none
- References: <1464696577 dot 24965 dot 16 dot camel at trentalancia dot net> <1464698125 dot 24965 dot 18 dot camel at trentalancia dot net> <1464717048 dot 2379 dot 43 dot camel at trentalancia dot net> <1464722725 dot 2379 dot 62 dot camel at trentalancia dot net> <20160611060459 dot GK4053 at vapier dot lan> <1465646157 dot 29507 dot 49 dot camel at trentalancia dot net> <08ea32c3-f5cb-2fa0-6a40-f04dc663acc5 at redhat dot com>
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