Hi Jeff,
Please keep gsl list in cc, especially since I'm not maintainer and it's
probably useful for Patrick et al. to see your emails (not to mention
other users).
On 01/30/2014 10:33 PM, Mandel Jeff E MD MS wrote:
Predictive spell checking munged the text; that should be "isfinite",
"gsl_finite", …
Jeff
Begin forwarded message:
*From: *Jeff E Mandel <[email protected]
<mailto:[email protected]>>
*Subject: **Re: [Bug-gsl] finite deprecated in OSX, iOS*
*Date: *January 30, 2014 6:27:28 AM EST
*To: *Peter Johansson <[email protected] <mailto:[email protected]>>
Configure completes; it fails during Make. I can trace it down to a
single compiler level, for instance:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-I.. -I/usr/include/ -c gsl-1.16/poly/balance.c -o
gsl-1.16/poly/balance.o
*balance.c:57:24: **error: **'gsl_finite' is unavailable: not
available on iOS*
if (s == 0.0 || !gsl_finite(s))
This looks very wrong. It looks like the compiler thinks that gsl_finite
is not available. My guess is that it's the deprecation of finite() that
somehow pollutes and effects gsl_finite() too. It's hard to know though
because I cannot find any definition of macro __OSX_AVAILABLE_BUT_DEPRECATED
* ^*
*../gsl/gsl_sys.h:45:5: note: *function has been explicitly marked
unavailable here
int gsl_finite (const double x);
* ^*
And this is not true; the GSL developers has not marked gsl_finite as
unavailable. Again it seems like the compiler is very confused, and
typically this kind of compiler confusion is caused by the preprocessor
and macros trespassing and affecting unexpected parts of the code.
1 error generated.
make[2]: *** [balance.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
will emit that error. If I go into balance.c and replace the calls to
finite() with infinite(), t compiles. I also had to do this for the
gel_finite() calls, but when I did this for every occurrence in gsl,
it succeeded in Make.
Yes, that makes sense. As Patrick explained in other email, your fix is
not acceptable to go into GSL though because the reason gsl_finite
exists is to support both modern systems with isfinite and ancient
systems with finite().
The config.h you provided indicates that on your systems the configure
script has detected that you have a function isfinite() but not a
finite(). Hopefully Patrick's last modification fixes you problem
(please try) but I doubt it because it only changes things cquad.c which
should not influence your problems compiling 'balance.c'. If it doesn't
work, it might help if you could find a definition of
__OSX_AVAILABLE_BUT_DEPRECATED or if you could attach the output from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-E -I.. -I/usr/include/ gsl-1.16/poly/balance.c
Cheers,
Peter
Jeff
On Jan 29, 2014, at 10:55 PM, Peter Johansson <[email protected]
<mailto:[email protected]>> wrote:
Hi Jeff,
On 01/30/2014 11:50 AM, Jeff E Mandel wrote:
I’m trying to compile GSL with Xcode 5.02 (clang) on Mavericks for
iosphoneos and iosphonesimulator. It fails due to deprecation of
finite. On further investigation:
%grep -R unavailable gsl-1.16
…
gsl-1.16/config.log:conftest.c:59:10: error: 'finite' is
unavailable: not available on iOS
…
This message says that the configure script has detected that finite
is not available. It will therefore not #define HAVE_DECL_FINITE in
generated 'config.h.'.
Can you please give some more details on the error you get. Does
configure go through or abort? If it's at compilation time you get
an error, what is the error message from the compiler? Can you
please attach config.h, which should be in you top directory.
Cheers,
Peter
--
Peter Johansson