Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Use Devel::PPPort to support older Perls #37

Closed
leto opened this Issue Sep 18, 2011 · 1 comment

Comments

Projects
None yet
1 participant
Owner

leto commented Sep 18, 2011

Bug report from @sisyphus:

The use of the Newx() function in the following files means that Math-GSL-0.26 fails to build on perl-5.8.0:

xs\Chebyshev_wrap.1.11.c
xs\Chebyshev_wrap.1.12.c
xs\Chebyshev_wrap.1.13.c
xs\Chebyshev_wrap.1.14.c
xs\Chebyshev_wrap.1.15.c
xs\Deriv_wrap.1.11.c
xs\Deriv_wrap.1.12.c
xs\Deriv_wrap.1.13.c
xs\Deriv_wrap.1.14.c
xs\Deriv_wrap.1.15.c
xs\Diff_wrap.1.11.c
xs\Diff_wrap.1.12.c
xs\Diff_wrap.1.13.c
xs\Diff_wrap.1.14.c
xs\Diff_wrap.1.15.c
xs\Integration_wrap.1.11.c
xs\Integration_wrap.1.12.c
xs\Integration_wrap.1.13.c
xs\Integration_wrap.1.14.c
xs\Integration_wrap.1.15.c
xs\Min_wrap.1.11.c
xs\Min_wrap.1.12.c
xs\Min_wrap.1.13.c
xs\Min_wrap.1.14.c
xs\Min_wrap.1.15.c
xs\Roots_wrap.1.11.c
xs\Roots_wrap.1.12.c
xs\Roots_wrap.1.13.c
xs\Roots_wrap.1.14.c
xs\Roots_wrap.1.15.c

I just worked around it by replacing 'Newx' with 'New' - and, of course, providing the additional (unused) integer argument that 'New' requires at the beginning of its argument list. That way the same file is usable for all perls, as the later perls still understand New(). I couldn't find any significant performance hit using New instead of Newx.

Another option would be to instead #include ppport.h.
Not entirely sure of the procedure there. I think you install the latest Devel::PPPort, then run 'Devel::PPPort::WriteFile();' to create ppport.h.
Then, I think, you distribute that ppport.h with the Math::GSL source, and have the affected C files '#include "ppport.h"'.

Owner

leto commented Oct 3, 2016

I think it is reasonable to not support 5.8.0, because

  • it adds a large maintenance burden
  • we support all the other Perl 5.8.x releases
  • that software was released over 14 years ago

I will update our Build.PL to reflect this, because it actually lists 5.8.0 instead of 5.8.1 currently.

@leto leto closed this Oct 3, 2016

@leto leto added a commit that referenced this issue Oct 3, 2016

@leto leto We don't actually support 5.8.0
More details here: #37
2173e2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment