Bug 833529

Summary: pkg-config nss --libs gives wrong arguments - causes build failures
Product: [Fedora] Fedora Reporter: Rich Megginson <rmeggins>
Component: nssAssignee: Elio Maldonado Batiz <emaldona>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: rawhideCC: emaldona, kdudka, kengert, nkinder, rrelyea
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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: Environment:
Last Closed: 2013-03-02 18:15:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix for nss-util
none
Fix for nss-softokn
none
Fix for nss none

Description Rich Megginson 2012-06-19 16:54:08 UTC
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:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Nathan Kinder 2012-06-19 17:16:32 UTC
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 17:19:48 UTC
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-21 00:52:53 UTC
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 05:14:25 UTC
Created attachment 593350 [details]
Fix for nss-util

Comment 6 Elio Maldonado Batiz 2012-06-21 05:15:09 UTC
Created attachment 593351 [details]
Fix for nss-softokn

Comment 7 Elio Maldonado Batiz 2012-06-21 05:15:51 UTC
Created attachment 593352 [details]
Fix for nss

Comment 8 Elio Maldonado Batiz 2012-06-21 05:19:32 UTC
nspr is fine.

Comment 9 Elio Maldonado Batiz 2012-06-21 18:13:08 UTC
(In reply to comment #8)
> nspr is fine.
No, a similar fix was needed there also.

Comment 10 Elio Maldonado Batiz 2013-03-02 18:15:05 UTC
This has been fixed for quite some time, closing it.