[Rd] R-devel on FreeBSD: Support for C99 complex type is required
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sun Feb 6 18:24:59 CET 2011
On Sun, 6 Feb 2011, Rainer Hurling wrote:
> On 06.02.2011 16:22 (UTC+1), Prof Brian Ripley wrote:
>> On Sun, 6 Feb 2011, Rainer Hurling wrote:
>>
>>> Today I tried two build R-devel_2011-02-06.tar.gz from sources on
>>> FreeBSD 9.0-CURRENT (amd64) with gcc-4.5.2 and I got the following
>>> messages when configuring:
>>>
>>>
>>> ./configure
>>> [..SNIP..]
>>> checking whether C99 double complex is supported...
>>> checking complex.h usability... yes
>>> checking complex.h presence... yes
>>> checking for complex.h... yes
>>> checking for double complex... yes
>>> checking whether cexp exists and is declared... no
>>> checking whether clog exists and is declared... no
>>> checking whether csqrt exists and is declared... yes
>>> checking whether cpow exists and is declared... no
>>> checking whether ccos exists and is declared... no
>>> checking whether csin exists and is declared... no
>>> checking whether ctan exists and is declared... no
>>> checking whether cacos exists and is declared... no
>>> checking whether casin exists and is declared... no
>>> checking whether catan exists and is declared... no
>>> checking whether ccosh exists and is declared... no
>>> checking whether csinh exists and is declared... no
>>> checking whether ctanh exists and is declared... no
>>> checking whether cacosh exists and is declared... no
>>> checking whether casinh exists and is declared... no
>>> checking whether catanh exists and is declared... no
>>> configure: error: Support for C99 complex type is required.
>>> [..script stops here..]
>>>
>>> Until 2.12.1 this works for me. In the NEWS file of 2.13.0 I found in
>>> the INSTALLATION section:
>>>
>>> 'A C99 compiler is now required, and more C99 language features will
>>> be used in the R sources.'
>>
>> But that was against R 2.12.0!
>
> Yes, but emulation code was not removed until R-2.13.0?
Not really: there was an alternative not using C99 double complex
prior to R-devel (there is no 'R-2.13.0').
>>> What exactly characterizes a C99 compiler? Does gcc-4.5.2 belongs to
>>> this?
>>
>> Yes with flag -std=c99, but it also needs a runtime complying with C99.
>> Those missing functions are part of C99.
>
> Probably a stupid question because I am not a programmer: Is this 'runtime
> complying with C99' a compilers binary or something else?
The C99 standard requires more than a compiler. It is usual (but not
compulsory) to provide the runtime support in libraries such as libc
and libm: so on Linux these functions are in glibc, on Windows most
are in MSVCRT.dll and some in libmingwex.a ....
>>> Are the special arguments or knobs to consider? Any other ideas?
>>>
>>> Please let me know if more infos are needed.
>>
>> I think this is really a FreeBSD support question. In 2011, an OS really
>> should have support for a 1999 standard. Darwin, a FreeBSD derivative,
>> does and its help page says
>
> Hmm, on FreeBSD I really have no other piece of software which complains
> about lack of C99.
Maybe you use no other piece of software relying on C99's complex
functions?
>> 4th Berkeley Distribution December 11, 2006 4th Berkeley Distribution
>
> In 2006 we had already Darwin 8.x in Mac OS X 10.4.
>
>> which suggests that is part of BSD.
>>
>> We are not going to put back the emulation code used: we simply don't
>> have the resources to fix up its problems (nor do we have a platform
>> which needs it). The alternative I will look into is allowing R to be
>> compiled without support for complex arithmetic.
>
> Ok, I understand. This seems consistent. I will try to contact FreeBSD
> support about it. Please do not change back the behaviour for FreeBSD
> (towards emulation code) until this is clarified.
As I said, we are never going to do that. The usual Open Source way
to solve problems like this is for substitute functions to be provided
on the deficient platform. We do that for several functions that used
not to be common: see src/main/Makefile.
>>> Thanks in advance for any help,
>>> Rainer Hurling
>
> Thanks for answering and clearing this up,
> Rainer Hurling
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list