[R] building R 1.7.0 with gcc 3.2.3 on Solaris

Paul Gilbert pgilbert at bank-banque-canada.ca
Tue May 13 18:51:30 CEST 2003


It turns out that this problem was caused by compiling gcc on SunOS 5.6 
and then trying to use it on SunOS 5.8. (Sys admins like to compile 
things on 5.6, as the apps then usually run on both 5.6 and 5.8.) With 
gcc compiled and used on SunOS 5.8,  R 1.7.0 compiles and everything 
runs fine. (So far I have only tried R as a 32 bit application.) I still 
need to set LDFLAGS or the C and Fortran don't mix.

Thanks,
Paul Gilbert

Peter Dalgaard BSA wrote:
> Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
> 
>>On Fri, 9 May 2003, Paul Gilbert wrote:
>>
>>>With gcc 3.2.3 on SunOS 5.8 and R 1.7.0, configure fails for me unless I 
>>>set LDFLAGS ( LDFLAGS=-L/apps/asd/unix/gnu/gcc/3.2.3/SunOS5.8/lib ). 
>>
>>It works here with gcc installed in /usr/local/lib.  
> 
> >>With that set it appears that configure succeeds (i.e. no error messages
 >>>on the console), but config.log contains messages
 >>>
 >>>configure:4099: checking for gcc option to accept ANSI C
 >>>configure:4160: gcc  -c -g -O2 -I/usr/local/include conftest.c >&5
 >>>In file included from configure:4124:
 >>>/usr/include/sys/stat.h:258: syntax error before "blksize_t"
 >>>/usr/include/sys/stat.h:262: syntax error before '}' token
 >>>/usr/include/sys/stat.h:318: syntax error before "blksize_t"
 >>>/usr/include/sys/stat.h:319: conflicting types for `st_blocks'
 >>>/usr/include/sys/stat.h:259: previous declaration of `st_blocks'
 >>>/usr/include/sys/stat.h:322: syntax error before '}' token
 >>>configure:4163: $? = 1
 >>>configure: failed program was:
 >>>| #line 4106 "configure"
 >>>| /* confdefs.h.  */
 >>>|
 >>>| #define PACKAGE_NAME "R"
 >>>| #define PACKAGE_TARNAME "R"
 >>>| #define PACKAGE_VERSION "1.7.0"
 >>>| #define PACKAGE_STRING "R 1.7.0"

> A longshot: This sort of thing happens if you accidentally mix
> multiple versions of gcc. Are you sure you don't also need to put
> /apps/asd/unix/gnu/gcc/3.2.3/SunOS5.8/bin or so at the head of your
> PATH so as not to pick up another gcc?
>




More information about the R-help mailing list