Bug 96941

Summary: pkg-config outputs empty library search path for cblas on Arch
Product: pkg-config Reporter: Roukun <liminglangjun>
Component: srcAssignee: pkg-config
Status: RESOLVED NOTOURBUG QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Roukun 2016-07-15 15:38:09 UTC
On Arch, pkg-config gives redundant '-L' for cblas installed from the official repository.

$ pkg-config --libs cblas 
-L -lcblas -lblas

The '-L' without arguments will potentially break the building of any program that uses 
pkg-config to find the search paths for cblas. It seems that GCC treats '-lcblas' as the
argument of '-L' and thus the final executable will not get linked to cblas.

Additional info:
* pkg-config: 0.29.1, gcc: 6.1.1
Comment 1 Dan Nicholson 2016-08-22 22:08:03 UTC
Can you show the contents of cblas.pc?
Comment 2 Roukun 2016-08-24 03:17:27 UTC
(In reply to Dan Nicholson from comment #1)
> Can you show the contents of cblas.pc?

prefix=
libdir=

Name: lapacke
Description: C Standard Interface to BLAS Linear Algebra PACKage
Version: 3.6.1
URL: http://www.netlib.org/lapack/
Libs: -L -lcblas
Requires: blas
Comment 3 Dan Nicholson 2016-08-24 03:55:30 UTC
Well, it looks like pkg-config is doing what it was asked to do and the bug is in the construction of cblas.pc. You see the Libs: -L, right? Maybe we could add code to check that there was actually an argument, but that hasn't been needed to this point. Sorry, but I think the bug is somewhere else.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.