mmottl / gsl-ocaml

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

Fix to compile with current version of GSL (1.16). #6

Closed vkni closed 9 years ago

vkni commented 9 years ago

Dear Markus,

I just checked out gsl-ocaml and tried to compile. Unfortunately it failed.

Here is the fix for my machine (ALT Linux Sisyphus, ocaml 4.02.2, gcc 5.1.1, libgsl-1.16 (current)). I am not sure the fix is correct, but I still think that I have to notify you. :-)

Thanks for you work, Andrey.

Chris00 commented 9 years ago

It seems several other Linux distributions have currently version 1.16 of the GSL too. Also the README is claims compatibility with 1.16.

mmottl commented 9 years ago

@vkni Thanks for the patch! I trust that you have tested the compatibility of this patch with version 1.16. I'll make a release soon.

mmottl commented 9 years ago

@vkni Ok, I was a little too fast accepting the patch, it breaks on Mac OS X and probably on most platforms. Maybe I should have inquired more carefully what the error was.

Here is the issue: the upcoming GSL version 1.17 will change the API of gsl_sf_ellint_D_e by dropping an unneeded parameter (see http://git.savannah.gnu.org/cgit/gsl.git/tree/specfunc/gsl_sf_ellint.h). This was reflected in the code before your patch. The official version 1.16 should still work fine, too.

I've just checked the source RPM on ALT Linux, and even though it is labeled with version 1.16, it already contains the latest not-yet-released API! This is apparently not the official version 1.16. I'm afraid, but I don't know how to address this. I think ALT Linux should not diverge in version labeling from the official GSL releases.

Please let me know whether you see an easy way of fixing this. Otherwise, I'd rather undo the patch again. It would seem rather laborious to support diverging versions on different platforms.

vkni commented 9 years ago

That's what I meant, when I wrote that am not sure. :-) Sorry for confusion. I've solved the problem via rpm patch feature for our distribution only.

So, please undo the patch and forgive me. :-)

mmottl commented 9 years ago

@vkni All is forgiven :)