Repository navigation
cmake: fix FindLAPACKE picking openblas.pc over lapacke.pc - #7421
Conversation
echoix
left a comment
There was a problem hiding this comment.
Makes sense with the intention written out in the header of the file
nilason
left a comment
There was a problem hiding this comment.
Sorry for late reaction, been travelling. Make sense, thanks!
|
With your changes, I get compilation error message under Gentoo GNU/Linux (with enabled lapack USE flag) Successful compilation log without your changes: |
Do you have openblas installed? |
Yes I have. |
That explains why it used to work, because it ended up using openblas, even though the |
I had trouble configuring GRASS with cmake and this PR is what my AI suggested. It solved the problem for me.
AI summary
When both
lapacke.pcandopenblas.pcare present,_search_lapacke_pkgsoverwritesLAPACKE_PKGCONFIGon every iteration, soopenblas(last in the list) always wins. On Debian/Ubuntu the openblas-pthread variant doesn't ship LAPACKE symbols, so theLAPACKE_dgesvcheck links onlylibopenblas.soand fails:Add
break()so the first match wins, matching the documented "lapacke and openblas... in that order" priority.