Bug 1292324 - pkg-config doesn't find some programs compiled by source
pkg-config doesn't find some programs compiled by source
Status: NEW
Product: Fedora
Classification: Fedora
Component: pkgconfig (Show other bugs)
25
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Matthias Clasen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-16 22:41 EST by bryant
Modified: 2016-11-24 09:44 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description bryant 2015-12-16 22:41:08 EST
Description of problem:
Compiling libserialport, libsigrok, and opencv and then running `make install` does not result in packages that can be found by pkg-config.


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


How reproducible:
always


Steps to Reproduce:
1. Run `make install` after compiling any of the above listed packages
2. Try to find them with pkg-config `pkg-config --modversion libserialport`

Actual results:
No package 'XXXX' found.


Expected results:
0.1.1

Basically there is software out there that defaults to installing .pc files to /usr/local/lib/pkgconfig. This works on Debian, which searches these paths for pkg-config - /usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

Right now Fedora only searches /usr/lib64/pkgconfig and /usr/share/pkgconfig

From the bug report to Sigrok linked below, it was suggested that the folders searched for pkg-config files be expanded in Fedora. It should definitely at least include /usr/local/lib/pkgconfig, which is in use by at least 3 projects. It would be wise to include it's 64-bit equivalent /usr/local/lib64/pkgconfig as well if we do.



Additional info:
Sigrok bug 712: http://sigrok.org/bugzilla/show_bug.cgi?id=712
Comment 1 Christophe Fergeau 2015-12-17 06:28:28 EST
Debian indeed passes
-with-pc-path=/usr/local/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

to pkg-config configure while the fedora package is using

--with-pc-path=%{_libdir}/pkgconfig:%{_datadir}/pkgconfig
(and has been using this since the introduction of this package 10 years ago)

The fedora man page for pkg-config is saying
« On  most  systems,  pkg-config  looks  in /usr/lib/pkgconfig, /usr/share/pkgconfig, /usr/local/lib/pkgconfig and /usr/local/share/pkgconfig for these files. »

Imo we could just change this, this should not have a huge impact.
Comment 2 bryant 2015-12-18 01:25:07 EST
So what's the next step then? I'm not familiar with how this process works with Fedora. I could make a patch if I knew where that setting was kept in a source repo. I haven't done anything like this for Fedora yet.
Comment 3 Christophe Fergeau 2015-12-18 05:13:11 EST
https://fedoraproject.org/wiki/Package_maintenance_guide?rd=Using_Fedora_GIT should have all the gory details.
Short summary would be to use
fedpkg clone -a pkgconfig
fedpkg local #(for a test build)

I have some basic patch locally, not sure what to do though with /usr/local/lib VS /usr/local/lib64. Would be more logical to do lib64 on x86_64, but what you expect is that it looks in lib.
Comment 4 bryant 2015-12-18 12:24:44 EST
Cool, so youll be able to submit a patch for this?

I don't have anything in /use/local/lib64 if that helps any. It looks like these projects are all 32-bit by default. I would not add lib64 for now, as it doesn't seem to be a problem for anyone at least.
Comment 5 bryant 2016-01-08 00:30:03 EST
@Christophe Any updates on a patch for this?
Comment 6 Fedora End Of Life 2016-11-24 09:17:28 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

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