Bug 833529 - pkg-config nss --libs gives wrong arguments - causes build failures
pkg-config nss --libs gives wrong arguments - causes build failures
Product: Fedora
Classification: Fedora
Component: nss (Show other bugs)
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Elio Maldonado Batiz
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-19 12:54 EDT by Rich Megginson
Modified: 2013-03-02 13:15 EST (History)
5 users (show)

See Also:
Fixed In Version: nss-3.13.5-3.fc18, nss-softokn-3.13.5-2.fc18, nss-util-3.13.5-3.fc18, nspr-4.9.1-3.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-02 13:15:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix for nss-util (1.15 KB, patch)
2012-06-21 01:14 EDT, Elio Maldonado Batiz
no flags Details | Diff
Fix for nss-softokn (1.30 KB, patch)
2012-06-21 01:15 EDT, Elio Maldonado Batiz
no flags Details | Diff
Fix for nss (1.14 KB, patch)
2012-06-21 01:15 EDT, Elio Maldonado Batiz
no flags Details | Diff

  None (edit)
Description Rich Megginson 2012-06-19 12:54:08 EDT
Description of problem:
Platform: rawhide
nss-devel version: 3.13.5-1.fc18

pkg-config nss --libs gives this output:

/usr/lib64/nss3 -L -L/usr/lib64/nspr4 -lssl3 -lsmime3 ... other libraries ...

The 389-ds-base build passes "/usr/lib64/nss3 -L -L/usr/lib64/nspr4" to the linker and the linker errors out.  I think it should be "-L/usr/lib64/nss3" instead.

This is urgent as this issue is preventing building 389-ds-base in rawhide which is needed ASAP for IPA 3.0 Beta

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 2 Nathan Kinder 2012-06-19 13:16:32 EDT
I played around with the nss package config files and figured out the problem.  For some reason, pkg-config does not like a space after the "-L" option and the actual libdir on the "Libs" line.  We currently do this in nss.pc and nss-util.pc:

    Libs: -L {$libdir}/nss3 ...

If you change this to remove the space as follows, the pkg-config --libs output will be correct:

    Libs: -L{$libdir}/nss3 ...

This only seems to affect nss.pc and nss-util.pc.  The nss-softokn.pc file does not have the problematic space in it.
Comment 3 Rich Megginson 2012-06-19 13:19:48 EDT
This problem affects any .pc file that has a requirement on nss or nss-util too - for example, svrcore.pc
Comment 4 Elio Maldonado Batiz 2012-06-20 20:52:53 EDT
We fixed the unwanted space and the tools don't complain but there is still a another bug there. The libraries are NOT nested in /usr/lib{64}/nss3, they go in /usr/lib{64} as customary. Only headers are nested inside /usr/incude/nss3. Kaie caught this mistake while reviewing some analogous changes on nspr for rhel. Fixes for nspr, nss-util, nss-softokn, and nss will be coming.
Comment 5 Elio Maldonado Batiz 2012-06-21 01:14:25 EDT
Created attachment 593350 [details]
Fix for nss-util
Comment 6 Elio Maldonado Batiz 2012-06-21 01:15:09 EDT
Created attachment 593351 [details]
Fix for nss-softokn
Comment 7 Elio Maldonado Batiz 2012-06-21 01:15:51 EDT
Created attachment 593352 [details]
Fix for nss
Comment 8 Elio Maldonado Batiz 2012-06-21 01:19:32 EDT
nspr is fine.
Comment 9 Elio Maldonado Batiz 2012-06-21 14:13:08 EDT
(In reply to comment #8)
> nspr is fine.
No, a similar fix was needed there also.
Comment 10 Elio Maldonado Batiz 2013-03-02 13:15:05 EST
This has been fixed for quite some time, closing it.

Note You need to log in before you can comment on or make changes to this bug.