Red Hat Bugzilla – Bug 1292324
pkg-config doesn't find some programs compiled by source
Last modified: 2016-11-24 09:44:50 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):
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`
No package 'XXXX' found.
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.
Sigrok bug 712: http://sigrok.org/bugzilla/show_bug.cgi?id=712
Debian indeed passes
to pkg-config configure while the fedora package is using
(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.
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.
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.
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.
@Christophe Any updates on a patch for this?
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'
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.