Build fails ( Mac OSx 10.8.2, gcc 4.6.3, swig 2.0.9) :
xs/Roots_wrap.1.15.c:3283:7: error: void function '_wrap_gsl_root_fdfs
+olver_fdf_set' should not return a value [-Wreturn-type]
xs/Roots_wrap.1.15.c:3840:7: error: void function '_wrap_gsl_root_fdfs
+olver_set' should not return a value [-Wreturn-type]
Same problem was reported here a long time ago on other systems, therefore it doesn't seem to be an OSx specific problem.
Thanks for your help.
A quick response by Rob on Perlmonks http://www.perlmonks.org/index.pl?node_id=1015131 opened my eyes. the two returns above should be XSRETURN. I made the changes in the version from the CPAN tarball and the build succeeded.
I intended to make a pull request here, but the .c files are not included in the xs directory (am I missing something?).
Thanks for reporting this @aixtal . The *.c files are all autogenerated by SWIG from the corresponding *.i files in the swig/ directory. SWIG is only required for developers using the Git repo. If you download a CPAN tarball, all the files are already generated and "end users" just compile the appropriate XS code for their version of GSL.
I believe the bug comes from here:
Note that GSL_NAN is a macro that expands to (gsl_nan()) .
I just fixed that in 93cc517 . Please let me know how that works for you!
Great! All tests pass. Many thanks.