Support for C99 complex type required

b. f. bf1783 at
Mon Feb 7 19:37:40 UTC 2011

> For more than a decade now it was possible to install the statistical
> program R ( 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
> 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.
> 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?
> 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.

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.

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.


More information about the freebsd-standards mailing list