Re: [Rd] Building R 2.4.1 on IRIX

From: Peter Dalgaard <P.Dalgaard_at_biostat.ku.dk>
Date: Thu 18 Jan 2007 - 16:44:24 GMT

Atro Tossavainen wrote:
> Hi,
>
> I've got the latest MIPS compilers that are C99 aware (7.4.4).
>
> "configure" finishes with:
>
> R is now configured for mips-sgi-irix6.5
>
> Source directory: .
> Installation directory: /afs/bi/v/@sys/apps/stats/R/2.4.1
>
> C compiler: cc -c99 -OPT:IEEE_NaN_inf=ON -g
> Fortran 77 compiler: f77 -OPT:IEEE_NaN_inf=ON -g
>
> C++ compiler: CC -OPT:IEEE_NaN_inf=ON -g
> Fortran 90/95 compiler: f90 -g
>
> Interfaces supported: X11
> External libraries: readline
> Additional capabilities: PNG, JPEG, NLS
> Options enabled: shared BLAS, R profiling
>
> Recommended packages: yes
>
> Building R 2.4.1, I stumble across the following error in
> src/main/complex.c:
>
> cc -c99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I. -I../../src/include -I../../src/include -I/afs/bi/p/include -DHAVE_CONFIG_H -OPT:IEEE_NaN_inf=ON -g -c complex.c -o complex.o
>
> cc-1143 cc: ERROR File = /usr/include/complex.h, Line = 176
> Declaration is incompatible with "double cabs(struct __cabs_s)" (declared at
> line 667 of "/usr/include/math.h").
>
> static inline double cabs (double complex z) {return __c99_cabs(z); }
> ^
>
> cc-1143 cc: ERROR File = /usr/include/complex.h, Line = 178
> Declaration is incompatible with "long double cabsl(struct __cabsl_s)"
> (declared at line 528 of "/usr/include/math.h").
>
> static inline long double cabsl (long double complex z) {return __c99_cabsl(z);}
> ^
>
> 2 errors detected in the compilation of "complex.c".
> gmake[3]: *** [complex.o] Error 2
>
>
> All ideas for fixing this would be welcome. I'm not subscribed to the
> mailing list, so personal copies would be appreciated, but I will be
> monitoring the web archives of the list to catch responses posted to
> the list only.
>
It looks like two system include files are getting into a dogfight. You might want to investigate whether you can reproduce the issue with a smaller source file, possibly dropping some of the -I directories in that cc command line, and submit the issue to the vendor if you get convinced that the issue is not actually an R one.

If this is the case, your best hope is if you can make cc less picky about such redefinitions.

-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri Jan 19 04:26:49 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 18 Jan 2007 - 18:31:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.