MantisBT - CMake
View Issue Details
0013834CMakeCMakepublic2013-01-04 07:252013-06-03 09:05
Gert Wollny 
Alexey Ozeritsky 
normalmajoralways
closedno change required 
LinuxGentoo
CMake 2.8.10.2 
 
0013834: FindBLAS doesn't trust pkg-config and may, therefore, fail
FindBLAS first tries to locate the BLAS libraries by using pkg-config. However, instead of trusting the returned information, it then tries to locate all libraries given in the returned string within the returned library directory.

When on Gentoo ACML is selected to provide BLAS, this strategy fails, because apart from the acml libraries, libgfortran and libpthread are reported by phk-config and these libraries are not located within the given library directory, since they are in the default library search path.
on Gentoo:

eselect blas set acml-gfortran-openmp

Add to CmakeLists.txt:

FIND_PACKAGE(BLAS)

run cmake

Make Error at /usr/share/cmake/Modules/FindBLAS.cmake:58 (message):
  Something is wrong in your pkg-config file - lib gfortran not found in
  /opt/acml4.4.0/gfortran64_mp/lib
Instead of searching for the libraries, FindBLAS should either just trust pkg-config, or try to link a simple program that requires a BLAS function.

No tags attached.
Issue History
2013-01-04 07:25Gert WollnyNew Issue
2013-01-04 09:03Brad KingAssigned To => Alexey Ozeritsky
2013-01-04 09:03Brad KingStatusnew => assigned
2013-01-05 02:20Rolf Eike BeerNote Added: 0031984
2013-01-05 02:20Rolf Eike BeerStatusassigned => resolved
2013-01-05 02:20Rolf Eike BeerResolutionopen => no change required
2013-01-08 07:35Gert WollnyNote Added: 0032000
2013-01-08 07:35Gert WollnyStatusresolved => feedback
2013-01-08 07:35Gert WollnyResolutionno change required => reopened
2013-01-08 08:01Rolf Eike BeerNote Added: 0032001
2013-01-08 08:04Rolf Eike BeerNote Added: 0032002
2013-01-08 08:04Rolf Eike BeerStatusfeedback => resolved
2013-01-08 08:04Rolf Eike BeerResolutionreopened => no change required
2013-06-03 09:05Robert MaynardNote Added: 0033181
2013-06-03 09:05Robert MaynardStatusresolved => closed

Notes
(0031984)
Rolf Eike Beer   
2013-01-05 02:20   
This bug is invalid: the pkg-config support is added by a Gentoo patch, vanilla CMake doesn't have it. In fact I asked the Gentoo folks to push that fix upstream but the answer was something like "Gentoo is the only distro that ships pkg-config files for BLAS, so noone but us needs this". Another instance of crappy Gentoo patches breaking CMake. Please report at their bug tracker.
(0032000)
Gert Wollny   
2013-01-08 07:35   
Reopened on the Gentoo developers request.

Actually my general experience with Gentoo developers is that they always prefer to get fixes applied upstream.

I reported the bug in Gentoo,
https://bugs.gentoo.org/show_bug.cgi?id=450386 [^]
and this is exactly what Michael Palimaka commented there: That he would happily work with you to incorporate this and other patches.

In the specific case of BLAS they Gentoo developers are actually asking the upstream developers of BLAS packages to include pkg-config files and set up trackers for pkg-config files that are not yet available form upstream.
(0032001)
Rolf Eike Beer   
2013-01-08 08:01   
He can find me as Dakon in #cmake on Freenode where we can sort this out.
(0032002)
Rolf Eike Beer   
2013-01-08 08:04   
Closing bug, as this is still a Gentoo issue. Please open a new bug if someone has a patch to provide the pkg-config functionality (it is a feature request then).

Everything else can either be discussed on cmake-developers@cmake.org or in #cmake on Freenode as it isn't related to this bug itself.
(0033181)
Robert Maynard   
2013-06-03 09:05   
Closing resolved issues that have not been updated in more than 4 months.