Support for C99 complex type required
Rainer Hurling
rhurlin at gwdg.de
Mon Feb 7 21:17:33 UTC 2011
On 07.02.2011 20:02 (UTC+1), b. f. wrote:
>> For more than a decade now it was possible to install the statistical
>> program R (http://cran.r-project.org/) from the sources, even without
>> patching. Since fortran was removed from the system, lang/gcc44 or
>> lang/gcc45 has to be installed before. In addition a nice port exists
>> for years now: math/R.
>>
>> With the new development version of R
>>
>> ftp://ftp.stat.math.ethz.ch/Software/R/R-devel.tar.gz
>>
>> the configure script stops complaining about missing C99 complex types.
>> This is reproducable with only untaring the sources and starting
>> configure script in R-devel with ./configure.
>>
>> There was a discussion on the R-devel mailing list about it. The
>> developers came to the conclusion that there is no support for complex
>> functions complied with C99 standard in FreeBSD.
>>
>> http://gcc.gnu.org/gcc-4.2/c99status.html
>>
>> As far as I can see (I am not a programmer) FreeBSD is using the old c99
>> wrapper file in /usr/bin. Am I right that lang/gcc45 should support such
>> complex functions?
>>
>> http://gcc.gnu.org/gcc-4.5/c99status.html
>>
>> Is there any way to get access to C99 complex functions of gcc-4.5.3 or
>> newer at least within a port?
>
> I am the math/R maintainer, and I do not subscribe to this list,
> although I occasionally read it. Therefore it would be better to ask
> me directly regarding questions about R, even if they are an
> appropriate, in a wider sense, for this list.
b.f., thank you very much for answering and sorry for not contacting you
directly or at least via CC.
Building R from sources works for me longer than a decade now without
any trouble. R-devel (pre 2.13.0) is the first version complaining about
missing C99 complex support. I asked about it on R-devel@ and after some
discussion with several developers Murray Stokely advised me to open a
thread at freebsd-standards@, so I did.
At the time I opened this thread I wanted to ask in a more general way
for C99 complex support. I used R as an example for my problem.
> Yes, you can use some of the C99 complex machinery, enough to satisfy
> R, which provides crude implementations of some of it if you have no
> support for it otherwise (in, e.g., src/main/complex.c). But you
> should use lang/gcc4* and the appropriate compiler flags -- if you are
> using /usr/bin/c99, you are using the wrong compiler suite. The port
> sets USE_FORTRAN=yes, which points R in the right direction. If you
> are not a programmer, why not just use the port? Or, if you really
> need the development version, why not use the port as a basis for your
> own locally-patched port? Generally speaking, you cannot expect to
> build software that is largely developed on other platforms without
> some modifications.
I like your port, but for some reason I prefer to build from sources.
Over the years I found some smaller problems in upcoming versions of R,
which could worked out with help from R developers before the release.
I never expected that every new or upcoming release of R should work out
of the box. But if I find a problem which prevents me from building such
a version on FreeBSD, I take a look, eventually contact R-help@ or
R-devel@ and always over the last 13 years we found a solution. Several
times this led to some little new or special code in the R sources.
> In any event, I too would like to see better support in the base
> system for C99 math, which is being used by an increasing number of
> software packages.
It seems, in particular through the eyes of R developers, that FreeBSD
is one of the last bigger OS leaking C99 complex support (Windows has,
Linux has, Mac OS X has ...).
Are you already working on a port for upcoming (hopefully in spring)
R-2.13.0?
> b.
Thanks again,
Rainer
More information about the freebsd-standards
mailing list