Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-08 Thread Rainer Hurling

On 07.02.2011 23:45 (UTC+1), Prof Brian Ripley wrote:

A follow-up on this.

Cygwin has recently[*] added support for C99 complex math, taken from
NetBSD with code that is very similar to that from Steven Moshier
available via http://www.moshier.net/c9x_readme.html.

That code isn't entirely right, especially not at the cuts on the
inverse functions where C99 mandates what cut is used (and neither glibc
nor Mac OS X have it correct).

I would expect that the current R-devel (I mean an SVN checkout now)
should build on your platform, substituting the missing functions by
ones based on earlier code. There may be a few more tweaks required, but
I have corrected several errors in the versions FreeBSD would have used
in R 2.12.1.


On FreeBSD 9.0-CURRENT (amd64) I have done a

  svn co https://svn.r-project.org/R/trunk r-devel/R

and after that

  configure --without-recommended-packages

The configure script does not complain any more about missing C99 
complex support. I was able to build and install R (without recommended 
packages).


Starting R and doing examples on ?complex seems to work correct.

sessionInfo()
R version 2.13.0 Under development (unstable) (2011-02-08 r54279)
Platform: x86_64-unknown-freebsd9.0 (64-bit)
locale:
[1] de_DE.ISO8859-15/de_DE.ISO8859-15/C/C/de_DE.ISO8859-15/de_DE.ISO8859-15
attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base
loaded via a namespace (and not attached):
[1] tools_2.13.0

Thank you very much for this work. Will it exist in some way in the next 
release?



[*] AFAICS not yet released in Cygwin, but in newlib 1.19.0.



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-08 Thread Prof Brian Ripley

On Tue, 8 Feb 2011, Rainer Hurling wrote:


On 07.02.2011 23:45 (UTC+1), Prof Brian Ripley wrote:

A follow-up on this.

Cygwin has recently[*] added support for C99 complex math, taken from
NetBSD with code that is very similar to that from Steven Moshier
available via http://www.moshier.net/c9x_readme.html.

That code isn't entirely right, especially not at the cuts on the
inverse functions where C99 mandates what cut is used (and neither glibc
nor Mac OS X have it correct).

I would expect that the current R-devel (I mean an SVN checkout now)
should build on your platform, substituting the missing functions by
ones based on earlier code. There may be a few more tweaks required, but
I have corrected several errors in the versions FreeBSD would have used
in R 2.12.1.


On FreeBSD 9.0-CURRENT (amd64) I have done a

 svn co https://svn.r-project.org/R/trunk r-devel/R

and after that

 configure --without-recommended-packages

The configure script does not complain any more about missing C99 complex 
support. I was able to build and install R (without recommended packages).


Starting R and doing examples on ?complex seems to work correct.

sessionInfo()
R version 2.13.0 Under development (unstable) (2011-02-08 r54279)
Platform: x86_64-unknown-freebsd9.0 (64-bit)
locale:
[1] de_DE.ISO8859-15/de_DE.ISO8859-15/C/C/de_DE.ISO8859-15/de_DE.ISO8859-15
attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base
loaded via a namespace (and not attached):
[1] tools_2.13.0

Thank you very much for this work. Will it exist in some way in the next 
release?


Just to be clear, the next release will almost certainly be 2.12.2 
(currently R-patched).  That will use pre-C99 complex as 2.12.1 did, 
but with several bugs fixed.  Then we would expect a 2.13.0 in April, 
and that will require C99 complex in the compiler plus some version of 
the current substitutes for csin etc.


My sysadmins have updated a FreeBSD virtual machine for me (to 
8.2-rc3): hopefully I will be able to test R-devel on it in future.


--
Brian D. Ripley,  rip...@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, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-08 Thread Rainer Hurling

On 08.02.2011 22:10 (UTC+1), Prof Brian Ripley wrote:

On Tue, 8 Feb 2011, Rainer Hurling wrote:

On 07.02.2011 23:45 (UTC+1), Prof Brian Ripley wrote:

A follow-up on this.

Cygwin has recently[*] added support for C99 complex math, taken from
NetBSD with code that is very similar to that from Steven Moshier
available via http://www.moshier.net/c9x_readme.html.

That code isn't entirely right, especially not at the cuts on the
inverse functions where C99 mandates what cut is used (and neither glibc
nor Mac OS X have it correct).

I would expect that the current R-devel (I mean an SVN checkout now)
should build on your platform, substituting the missing functions by
ones based on earlier code. There may be a few more tweaks required, but
I have corrected several errors in the versions FreeBSD would have used
in R 2.12.1.


On FreeBSD 9.0-CURRENT (amd64) I have done a

svn co https://svn.r-project.org/R/trunk r-devel/R

and after that

configure --without-recommended-packages

The configure script does not complain any more about missing C99
complex support. I was able to build and install R (without
recommended packages).

Starting R and doing examples on ?complex seems to work correct.

sessionInfo()
R version 2.13.0 Under development (unstable) (2011-02-08 r54279)
Platform: x86_64-unknown-freebsd9.0 (64-bit)
locale:
[1]
de_DE.ISO8859-15/de_DE.ISO8859-15/C/C/de_DE.ISO8859-15/de_DE.ISO8859-15
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_2.13.0

Thank you very much for this work. Will it exist in some way in the
next release?


Just to be clear, the next release will almost certainly be 2.12.2
(currently R-patched). That will use pre-C99 complex as 2.12.1 did, but
with several bugs fixed. Then we would expect a 2.13.0 in April, and
that will require C99 complex in the compiler plus some version of the
current substitutes for csin etc.


Sorry, my last question was imprecise. Of course I meant 2.13.x.


My sysadmins have updated a FreeBSD virtual machine for me (to 8.2-rc3):
hopefully I will be able to test R-devel on it in future.


Wow, that's interesting. Please let me know if I could test something on 
FreeBSD 9.0-CURRENT (the amd64 development version).


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-07 Thread Prof Brian Ripley

A follow-up on this.

Cygwin has recently[*] added support for C99 complex math, taken from 
NetBSD with code that is very similar to that from Steven Moshier 
available via http://www.moshier.net/c9x_readme.html.


That code isn't entirely right, especially not at the cuts on the 
inverse functions where C99 mandates what cut is used (and neither 
glibc nor Mac OS X have it correct).


I would expect that the current R-devel (I mean an SVN checkout now) 
should build on your platform, substituting the missing functions by 
ones based on earlier code.  There may be a few more tweaks required, 
but I have corrected several errors in the versions FreeBSD would have 
used in R 2.12.1.


[*] AFAICS not yet released in Cygwin, but in newlib 1.19.0.

--
Brian D. Ripley,  rip...@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, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-06 Thread Rainer Hurling
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.'


What exactly characterizes a C99 compiler? Does gcc-4.5.2 belongs to 
this? Are the special arguments or knobs to consider? Any other ideas?


Please let me know if more infos are needed.

Thanks in advance for any help,
Rainer Hurling

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-06 Thread Prof Brian Ripley

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!


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.



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


4th Berkeley Distribution  December 11, 2006 4th Berkeley Distribution

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.



Thanks in advance for any help,
Rainer Hurling


--
Brian D. Ripley,  rip...@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, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-06 Thread Rainer Hurling

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?


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?



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.



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.



Thanks in advance for any help,
Rainer Hurling


Thanks for answering and clearing this up,
Rainer Hurling

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-06 Thread Murray Stokely
On Sun, Feb 6, 2011 at 8:50 AM, Rainer Hurling rhur...@gwdg.de wrote:
 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.

FreeBSD is planning on switching to a different compiler, llvm/clang,
and so the version of gcc is stale, but still it should be more than
sufficient to support C99.  FreeBSD started a C99 effort a decade ago
and I haven't heard from this initiative in a long time as I thought
it was completed.

http://www.freebsd.org/projects/c99/index.html

There is I believe experimental support for llvm/clang built into
FreeBSD 9, so you could try compiling with that instead of gcc.

 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.

Yes, please mail freebsd-standa...@google.com

I haven't looked at what autoconf is testing exactly but I suspect
simply another argument must be provided in the autoconf script to get
it to pull up the C99 math functions its looking for.

  - Murray

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-06 Thread Murray Stokely
On Sun, Feb 6, 2011 at 9:24 AM, Murray Stokely mur...@stokely.org wrote:
 Yes, please mail freebsd-standa...@google.com

Ugh, that should be freebsd-standa...@freebsd.org of course.  Silly brain-o.

- Murray

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-06 Thread Prof Brian Ripley

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,  rip...@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, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-06 Thread Prof Brian Ripley

On Sun, 6 Feb 2011, Murray Stokely wrote:


On Sun, Feb 6, 2011 at 8:50 AM, Rainer Hurling rhur...@gwdg.de wrote:

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.


FreeBSD is planning on switching to a different compiler, llvm/clang,
and so the version of gcc is stale, but still it should be more than
sufficient to support C99.  FreeBSD started a C99 effort a decade ago
and I haven't heard from this initiative in a long time as I thought
it was completed.

   http://www.freebsd.org/projects/c99/index.html


Hmm, the line

Implement new functions that appear in complex.h.

is marked as 1/2 done, 2008.


There is I believe experimental support for llvm/clang built into
FreeBSD 9, so you could try compiling with that instead of gcc.


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.


Yes, please mail freebsd-standa...@google.com

I haven't looked at what autoconf is testing exactly but I suspect
simply another argument must be provided in the autoconf script to get
it to pull up the C99 math functions its looking for.


Maybe, but it is looking in complex.h, where the C99 standard says 
these must be (unconditionally).




 - Murray



--
Brian D. Ripley,  rip...@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, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-06 Thread Rainer Hurling

On 06.02.2011 18:24 (UTC+1), Murray Stokely wrote:

On Sun, Feb 6, 2011 at 8:50 AM, Rainer Hurlingrhur...@gwdg.de  wrote:

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.


FreeBSD is planning on switching to a different compiler, llvm/clang,
and so the version of gcc is stale, but still it should be more than
sufficient to support C99.  FreeBSD started a C99 effort a decade ago
and I haven't heard from this initiative in a long time as I thought
it was completed.

 http://www.freebsd.org/projects/c99/index.html


As far as I understand these initiative was/is for the built in gcc 
4.2.1. When building a port newer ones like 4.5.3 can be used. The newer 
gcc versions made a lot of progress, see


http://gcc.gnu.org/gcc-4.2/c99status.html

http://gcc.gnu.org/gcc-4.5/c99status.html

Especially the complex support in complex.h of version 4.2.1 is broken.


There is I believe experimental support for llvm/clang built into
FreeBSD 9, so you could try compiling with that instead of gcc.


This is not an option at the moment, because I have to work with my 
system (desktop).



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.


Yes, please mail freebsd-standa...@google.com


I will mail freebsd-standa...@freebsd.org as you suggested.


I haven't looked at what autoconf is testing exactly but I suspect
simply another argument must be provided in the autoconf script to get
it to pull up the C99 math functions its looking for.


Perhaps there is a way to use gcc's 4.5.3 C99 functionality instead of 
4.2.1 ones. The c99 wrapper at /usr/bin/c99 enforces the use of the 
built in compiler (hardcoded path).



   - Murray


Thanks for the answer,
Rainer

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-06 Thread Rainer Hurling

On 06.02.2011 18:24 (UTC+1), Prof Brian Ripley wrote:

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').


Sorry for the naming, R-devel of course.


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 


Ok, so only changing the compiler might be not enough. We have to try out.


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?


That is possible. But I have more than 1300 ports (FreeBSD packages) 
installed. And some of them are quite sophisticated.



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.


I had a look at src/main/complex.c. There is a comment which describes 
the failure for gcc 4.2.1 on some systems.


This gives me the idea that perhaps FreeBSD is using the wrong complex.h 
file. The old one is in /usr/include, the newer one (4.5.3) in 
/usr/local/lib/gcc45/include/c++. But obviously the older header is 
used. I have to clear up this.



Thanks in advance for any help,
Rainer Hurling


Thanks for answering and clearing this up,
Rainer Hurling


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel