Bug 20333 - pkg-config does not look in /usr/local for packages
Summary: pkg-config does not look in /usr/local for packages
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal minor
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: advisory MGA5-64-OK MGA5-32-OK
Keywords: PATCH, validated_update
Depends on:
Blocks:
 
Reported: 2017-02-22 17:19 CET by Stephen Brokenshire
Modified: 2017-03-25 17:57 CET (History)
7 users (show)

See Also:
Source RPM: pkgconfig
CVE:
Status comment:


Attachments
pkg-config patch to add directories to --with-pc-path (1.51 KB, patch)
2017-02-22 17:19 CET, Stephen Brokenshire
Details | Diff

Description Stephen Brokenshire 2017-02-22 17:19:01 CET
Created attachment 8975 [details]
pkg-config patch to add directories to --with-pc-path

Description of problem:

When running a configure script to try and install a package not included in Mageia's repositories, pkg-config does not look in /usr/local to see if a dependency has been installed.

Other operating systems such as Debian and OpenSuSE include the /usr/local directories in their built versions of pkg-config by default. However on the other end SLAX does not.

Version-Release number of selected component (if applicable):
0.28-4
(used 0.29-1 source package)

How reproducible:

Every time I run pkg-config to query the status of a package installed in /usr/local no results are returned and does not appear in the list when doing pkg-config --list-all unless I override it with the PKG_CONFIG_PATH variable.

Steps to Reproduce:

0. To get the paths pkg-config uses enter pkg-config --variable pc_path pkg-config
1. Manually compile a recently released package and install into /usr/local (SFML for example)
2. Enter pkg-config --list-all or pkg-config --modversion sfml-all

The attached patch changes the RPM specification file by adding directories to the configure --with-pc-path parameter and creation of the directories and symbolic links as needed in /usr/local. It adds /usr/local/(arch)/pkgconfig, /usr/local/(arch)/pkgconfig/32 and /usr/local/share/pkgconfig.

I accept that I could use PKG_CONFIG_PATH everytime I run configure but as Debian and OpenSuSE include the /usr/local paths for pkg-config I'm not sure if not including /usr/local is "a feature and not a bug" with Mageia. As this would only apply to developers and those installing their own software in /usr/local, this would be a minor bug.
Comment 1 Marja Van Waes 2017-02-22 21:00:08 CET
Assigning to all packagers collectively, since there is no registered maintainer for this package.

If it is decided to apply this patch, it should probably be done for Cauldron, too.

Keywords: (none) => PATCH
CC: (none) => luigiwalser, marja11, thierry.vignaud
Assignee: bugsquad => pkg-bugs
Source RPM: (none) => pkgconfig

Comment 2 Jani Välimaa 2017-02-23 17:41:52 CET
Pushed new pkgconfig [1] to core/updates_testing for mga5 which should fix the issue. Updated Cauldron pkg also.

Pkgconfig pkg doesn't ship directories under /usr/local/, but pkg-config should find files under it. Please test.

[1] pkgconfig-0.28-4.1.mga5

CC: (none) => jani.valimaa
Assignee: pkg-bugs => qa-bugs

Comment 3 Jani Välimaa 2017-02-23 17:51:14 CET
Pushed new version [1] which adds one more search directory, /usr/local/lib/pkgconfig, for 64bit systems.

[1] pkgconfig-0.28-4.2.mga5
Comment 4 Lewis Smith 2017-02-25 20:17:31 CET
Advisory made from comments 0, 2, 3.

CC: (none) => lewyssmith
Whiteboard: (none) => advisory

Comment 5 Stephen Brokenshire 2017-02-26 21:06:39 CET
Tested new pkgconfig with the new search directories.

All good on my end! It is now picking up the packages from the directories in /usr/local.
Comment 6 Marja Van Waes 2017-02-26 21:15:02 CET
(In reply to Stephen Brokenshire from comment #5)
> Tested new pkgconfig with the new search directories.
> 
> All good on my end! It is now picking up the packages from the directories
> in /usr/local.

Thanks for the feedback. Which version did you test? 
pkgconfig-0.28-4.2.mga5.i586 or
pkgconfig-0.28-4.2.mga5.x86_64 ?
Comment 7 Stephen Brokenshire 2017-02-26 21:21:12 CET
I've tested pkgconfig-0.28-4.2.mga5.x86_64.
Lewis Smith 2017-02-27 08:33:33 CET

Whiteboard: advisory => advisory MGA5-64-OK

Comment 8 Dave Hodgins 2017-03-25 02:10:53 CET
On i586, using 'strace pkg-config --cflags --libs /usr/lib/pkgconfig/xorg-mouse.pc 2>&1|grep /usr/local' confirms it's now checking /usr/local.

Validating the update

Keywords: (none) => validated_update
Whiteboard: advisory MGA5-64-OK => advisory MGA5-64-OK MGA5-32-OK
CC: (none) => davidwhodgins, sysadmin-bugs

Comment 9 Mageia Robot 2017-03-25 17:57:28 CET
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2017-0014.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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