wellposed / hblas

haskell bindings for blas and lapack
www.wellposed.com
BSD 3-Clause "New" or "Revised" License
49 stars 19 forks source link

use `pkgconfig-depends` instead of `extra-libraries` #38

Closed dmanam closed 7 years ago

dmanam commented 8 years ago

pkgconfig-depends works better on many systems and allows automatic usage of OpenBLAS when it is installed in pkg-config as blas

cartazio commented 8 years ago

Cool! Could you explain to me why / how this helps and under what circumstances?

Basically what sort of environments does this make a difference ? I genuinely don't know. And most importantly, help me understand how this faciltates or supports being zero config.

So what works better this way in eg Debian or what distro under what circumstances? Please be concrete.

On Thursday, September 8, 2016, dlahoti notifications@github.com wrote:

pkgconfig-depends works better on many systems and allows automatic usage

of OpenBLAS when it is installed in pkg-config as blas

You can view, comment on, or merge this pull request online at:

https://github.com/wellposed/hblas/pull/38 Commit Summary

  • use pkgconfig-depends instead of extra-libraries

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wellposed/hblas/pull/38, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAQwoNaC1WUklmb2mVSX8IZJpOABQ3dks5qoEaggaJpZM4J4P7a .

dmanam commented 8 years ago

I'm not sure about Debian, but in Gentoo, at least, OpenBLAS, reference BLAS, and Intel MKL all create /usr/lib/pkgconfig/blas.pc so that pkg-config --libs blas will link with whichever implementation you have installed, whether or not it actually supplies libblas.so. As the Cabal file is currently written, you need libblas.so, and there's no way to link against MKL.

Without patching the .cabal file, Gentoo has to detect which BLAS implementation is installed and set the correct flag, which is a PITA.

cartazio commented 8 years ago

i'll get this merged in soon, which hopefully shall be this hac phi weeekend. I appreciate your patience

cartazio commented 7 years ago

I'll have a go at adding this in the next day or so, master should be in more runnable / useful state now, that change aside, could you please confirm (still need to poke at when i can assume pkgconfig is avaialabe etc, cause i really really want zero config happiness by default :) )

cartazio commented 7 years ago

i'm going to have to reject this PR for now... unless you can show me how to get the travis CI builds to accept package config I can't test linux with this change :)