Hi,

Two problems exist regarding PDL::Lib::GSL built against gsl-2.x.

Firstly, the C prototype for gsl_sf_ellint_D (found in PDL/Lib/GSL/SF/ellint/gsl_sf_ellint.pd) has changed. I successfully used the attached patch to gsl_sf_ellint.pd to build against both gsl-2.0 and gsl-1.16.

The patch makes use of the gsl-config command to determine the gsl version in use. This strikes me as a little unorthodox but, since the Makefile.PL also makes use of the gsl-config command, I figure it's ok ..... not sure. (I don't think the Makefile.PL necessarily *depends* upon the output of gsl-config commands, so we perhaps shouldn't assume that gsl-config is always going to be available.)

Secondly, PDL/Lib/GSL/SF/legendre/gsl_sf_legendre.pd uses functions that are deprecated and may be removed in a future gsl release. With gsl-2.0, these deprecated functions are (oddly, imo) *unavailable by default*. If one wants them to be available in the gsl-2.0 library then one has to build the library without defining GSL_DISABLE_DEPRECATED. (I've been doing this by, prior to running 'make', removing the #define of that symbol in the top-level config.h that configure creates. There may be a better way.)

However, owing to a bug, there's an additional step required with gsl-2.0 (but not with gsl-2.1, which fixes the bug). With gsl-2.0 source, it's also necessary to change line 138 of multifit/fdjac.c from:

 status = fdjac(x, fdf, f, J)
to:
 status = fdjac(x, NULL, fdf, f, J)

At time of writing gsl-2.1 has not been released, but should become available in the next day or two.

I think it's unlikely that package managers are going to release a gsl-2.x that does not define GSL_DISABLE_DEPRECATED - hence the deprecated functions would be *unavailable* to users of these libraries. And this means that now is probably a good time for some capable person to rewrite the PDL::Lib::GSL source such that both deprecated functions and their replacements are available as needed.

Anyway ... just a "heads up".

Should I also file a bug report ? (If so, where's the best place for it ?)

Cheers,
Rob

Attachment: gsl_sf_ellint.pd.diff
Description: Binary data

------------------------------------------------------------------------------
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to