[R] make error R-5.1 on sun solaris
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Thu Jul 12 00:08:15 CEST 2007
Dan Powers wrote:
> I hope this is enough information to determine the problem. Thanks in
> advance for any help.
>
> Configure goes ok (I think)
>
> ./configure --prefix=$HOME --without-iconv
>
>
> R is now configured for sparc-sun-solaris2.9
>
> Source directory: .
> Installation directory: /home/dpowers
>
> C compiler: gcc -g -O2
> Fortran 77 compiler: f95 -g
>
> C++ compiler: g++ -g -O2
> Fortran 90/95 compiler: f95 -g
> Obj-C compiler: -g -O2
>
> Interfaces supported: X11
> External libraries: readline
> Additional capabilities: NLS
> Options enabled: shared BLAS, R profiling, Java
>
> Recommended packages: yes
>
> Make ends after the gcc..
>
> make
> .
> .
> .
>
> gcc -I. -I../../src/include -I../../src/include -I/usr/openwin/include
> -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c system.c -o system.o
> system.c: In function `Rf_initialize_R':
> system.c:144: parse error before `char'
> system.c:216: `localedir' undeclared (first use in this function)
> system.c:216: (Each undeclared identifier is reported only once
> system.c:216: for each function it appears in.)
> *** Error code 1
> make: Fatal error: Command failed for target `system.o'
> Current working directory /home/dpowers/R-2.5.1/src/unix
> *** Error code 1
> make: Fatal error: Command failed for target `R'
> Current working directory /home/dpowers/R-2.5.1/src/unix
> *** Error code 1
> make: Fatal error: Command failed for target `R'
> Current working directory /home/dpowers/R-2.5.1/src
> *** Error code 1
> make: Fatal error: Command failed for target `R'
>
>
> I have tried setting localedir directly in configure options, but get the
> same error.
>
> Any ideas?
>
>
Hmm, which version of gcc is this? The problem seems to be around line
144 which reads
140 Rstart Rp = &rstart;
141 cmdlines[0] = '\0';
142
143 #ifdef ENABLE_NLS
144 char localedir[PATH_MAX+20];
145 #endif
146
147 #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)
148 {
149 struct rlimit rlim;
I seem to remember that it used to be non-kosher to mix declarations
and ordinary code like that, but the current compiler doesn't seem to
care (I do have #define ENABLE_NLS 1 in Rconfig.h, as I assume you do
too). Could you perhaps try moving line 141 down below #endif?
> Thanks,
> Dan
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Daniel A. Powers, Ph.D.
> Department of Sociology
> University of Texas at Austin
> 1 University Station A1700
> Austin, TX 78712-0118
> phone: 512-232-6335
> fax: 512-471-1748
> dpowers at mail.la.utexas.edu
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list