mmottl / gsl-ocaml

OCaml bindings to the GSL (GNU Scientific Library).
Other
36 stars 10 forks source link

Link the blas library after gsl #38

Closed jamesjer closed 4 months ago

jamesjer commented 4 months ago

I did a test build of gsl-ocaml 1.25.0 for Fedora Rawhide and got a library that was linked with gsl, but not with any blas library, so there are unresolved symbols. There are multiple factors involved:

When the blas library is linked, it doesn't resolve any symbols, since gsl-ocaml itself does not directly use them. Because of -Wl,--as-needed, the blas library is therefore not linked into the final ELF object.

This PR moves the blas library after -lgsl so that it is used to resolve symbols in libgsl.

mmottl commented 4 months ago

Thanks for the patch!