On 02/22/2015 02:09 PM, Richard W.M. Jones wrote:
On Sat, Feb 21, 2015 at 03:50:16PM -0800, Susi Lehtola wrote:
Because libgsl is no longer linked to a CBLAS library, packages
linking to GSL need to also link to a CBLAS library, ATLAS probably
being the best candidate since OpenBLAS is not available for all
Fedora architectures. The following trick should be enough to handle
the link

%if 0%{?fedora} > 20 || 0%{?rhel} > 6
export LIBS="-lgsl -L%{_libdir}/atlas -lsatlas"
%else
export LIBS="-lgsl L%{_libdir}/atlas -lcblas -latlas"
%endif

Ugh, scrap that. This is only on Fedora 22 and rawhide, so only the former version applies. So, the link argument just has to be changed from "-lgsl" to "-lgsl -L%{_libdir}/atlas -lsatlas".

I'm not really sure I understood all of that, but anyway.

ocaml-gsl appears to use the output of `gsl-config --libs` which in
effect means that it's using on x86-64: '-lgsl -lgslcblas -lm'

Yes, a lot of packages seem to be just happily linking to gslcblas, since it seems a lot of people are not aware of the huge performance benefits of using optimized libraries.

It's possible to override this by exporting GSL_CBLAS_LIB to a value
like the one above.

However my questions is why doesn't `gsl-config --libs` appear to
produce the optimal link command?

That is a good question.

Also it looks like to use atlas, spec files would need an additional:

   BuildRequires: atlas-devel

Yes, if you want to link to ATLAS, you need the additional buildrequire.

Proposed patch for ocaml-gsl.spec attached.

Looks good.
--
Susi Lehtola
Fedora Project Contributor
jussileht...@fedoraproject.org
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Reply via email to