Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 450386 - dev-util/cmake: FindBLAS patch doesn't correctly use pkg-config results and may fail
Summary: dev-util/cmake: FindBLAS patch doesn't correctly use pkg-config results and m...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
Depends on:
Reported: 2013-01-05 14:01 UTC by Gert Wollny
Modified: 2014-05-08 22:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Gert Wollny 2013-01-05 14:01:41 UTC
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. 

Reproducible: Always

Steps to Reproduce:
1. eselect blas set acml-gfortran-openmp

2. Add to CmakeLists.txt: 


3. run cmake 

Actual Results:  
Make Error at /usr/share/cmake/Modules/FindBLAS.cmake:58 (message):
  Something is wrong in your pkg-config file - lib gfortran not found in

Expected Results:  
cmake runs without error since a blas implementation was found

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.

The Bug was first reported upstream, were I was told that this is a purely Gentoo specific issue:
Comment 1 Michael Palimaka (kensington) gentoo-dev 2013-01-07 17:30:52 UTC
Could you please re-open the upstream bug (since they do not allow comments on closed bugs)? 

I don't know who said the statement they are quoting, but we are always keen to work with upstream to integrate our patches.

> In fact I asked the Gentoo folks to push that fix upstream
I am happy to personally work with upstream to ingrate the patch in question (as well as any of the many others we unfortunately are keeping to ourselves.)
Comment 2 Gert Wollny 2013-01-08 12:36:44 UTC
Reopened upstream as requested.
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2013-03-09 21:17:34 UTC
This is a purely Gentoo issue since we replace FindBLAS.cmake.
Comment 4 Johannes Huber gentoo-dev 2013-11-24 00:42:19 UTC
We had several updates on cmake and the patch in meantime. Is this still valid?
Comment 5 Johannes Huber gentoo-dev 2014-05-08 22:50:57 UTC
(In reply to Johannes Huber from comment #4)
> We had several updates on cmake and the patch in meantime. Is this still
> valid?