Bug 833529 - pkg-config nss --libs gives wrong arguments - causes build failures
Summary: pkg-config nss --libs gives wrong arguments - causes build failures
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nss
Version: rawhide
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
Assignee: Elio Maldonado Batiz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-19 16:54 UTC by Rich Megginson
Modified: 2013-03-02 18:15 UTC (History)
5 users (show)

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:
Clone Of:
Environment:
Last Closed: 2013-03-02 18:15:05 UTC


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

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.


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