[R] make error R-5.1 on sun solaris

Dan Powers dpowers at mail.la.utexas.edu
Fri Jul 13 15:38:30 CEST 2007


Thanks. 
I am working (making some progress) on two installations (different sun's).
I am working to get the system admins to install the right libraries and
compilers to get the job done.
Cheers,
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
-----Original Message-----
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] 
Sent: Thursday, July 12, 2007 12:00 AM
To: Peter Dalgaard
Cc: dpowers at mail.la.utexas.edu; 'R-Help'
Subject: Re: [R] make error R-5.1 on sun solaris

You are asked for a C99 compiler and configure normally finds one: mixing 
declarations and code is valid C99.

Unless something has been done with environment variables (e.g. in 
config.site) this gcc is very old.  configure should come up with 
'gcc -std=gnu99'.  Re-ordering the code will help (but it may need to go 
below the next #ifdef block too), but a gcc update would be a very good 
idea as gcc on Sparc has been buggy up to about 3.4.x.

Note too that --without-iconv is undesirable and should not be necessary 
as libiconv can be installed as a preload on Solaris (8 and 10, so 
presumably also 9).


On Thu, 12 Jul 2007, Peter Dalgaard wrote:

> 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.
>>
>
> ______________________________________________
> 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.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list