[R] compile problems on solairs 8

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Wed Jan 15 16:06:26 CET 2003


On Wed, 15 Jan 2003, Yuelin Li wrote:

> I had similar problems but finally successfully compiled R-1.6.2 
> on Solaris 8 after changing some variables in config.site.  I 
> think R's error messages about X11 come from the compiler, not 
> from the libraries within R source. 

They clearly come from the use of X11R5 include files!

>  My customizations may not 
> solve your problem, but they may be worth a try.
> 
> The biggest difficulty is to tell ./configure where to look for 
> compilers, libraries and standard include files.  This is done by 
> changing variables in ./config.site before you run ./configure.
> 
> I have a standard Solaris 8 installation, which includes 
> gcc-2.95.2 under /opt/sfw/bin.  Also found there are gmake, g++, 

If that's true (and it is not for our installation) I do advise upgrading
the compiler to at least 2.95.3 and probably 3.2 (3.2.1 generating code
that fails with R on 32-bit Solaris 2.7 at least).
http://www.sunfreeware.com has all three for Solaris 8.

> etc.  The /usr/ucb/cc compiler should not be used because the 
> standard Solaris 8 does not have all the libraries.

It should not be used, period.

> There are two steps:
> 
>   1. make sure your PATH includes /opt/sfw/bin, mine is:
>   
>   PATH =/usr/sbin:/usr/bin:/usr/local/bin:\
>   /usr/local/sbin:/usr/dt/bin:/usr/openwin/bin:\
>   /bin:/usr/ucb:/opt/sfw/bin:/opt/sfw/lib:/opt/teTeX/bin:
> 
>   2. comment out and change these variables in ./config.site
>   CC=/opt/sfw/bin/gcc
>   
>   CPPFLAGS="-I/opt/sfw/include -I/opt/sfw/include/readline 
> -I/usr/local/include"
>   
>   LDFLAGS="-L/opt/sfw/lib -L/usr/lib -L/usr/local/lib 
> -L/opt/sfw/share/aclocal -L/opt/sfw/share/autoconf 
> -L/opt/sfw/share/automake -L/opt/sfw/share/awk
>   
>    TCLTK_LIBS="-L/opt/sfw/lib -L/usr/local/lib 
> -L/opt/sfw/share/aclocal -L/opt/sfw/share/autoconf 
> -L/opt/sfw/share/automake -L/opt/sfw/share/awk"
>    
>    TCLTK_CPPFLAGS="-I/opt/sfw/include -I/opt/sfw/include/readline 
> -I/usr/local/include"
> 
>    MAKE=/opt/sfw/bin/gmake
>   
> Some of the paths are redundant but I have not explored which 
> ones can be omitted.  These changes work fine since R-1.5.1.

All you appear to need are CPPFLAGS and LDFLAGS="-L/opt/sfw/lib
-L/usr/local/lib", as you should be setting the path to yout tclconfig.sh
with the configure flags.



> 
> Then you run ./configure and make as usual. 
> 
> Please let me know if it works on your machine.  
> 
> Yuelin Li.
> 
> ----------
>    
>   Hello,
>   
>   I am having a problem compiling R versions 1.6.1 or .16.2 on a 
> Solaris 8
>   machine.  It sees to have problems with an X11 module.  Here is 
> the
>   relevant output:
>   
>   make[4]: Entering directory 
> `/pkg-ling/src/R-1.6.2/src/modules/X11'
>   gcc -I. -I../../../src/include -I../../../src/include
>   -I/pkg/X11R5/include -I/usr/local/include -DHAVE_CONFIG_H  
> -fPIC  -g -O2
>   -c dataentry.c -o dataentry.lo
>   dataentry.c: In function `doSpreadKey':
>   dataentry.c:1194: `XK_Page_Up' undeclared (first use in this 
> function)
>   dataentry.c:1194: (Each undeclared identifier is reported only 
> once
>   dataentry.c:1194: for each function it appears in.)
>   dataentry.c:1198: `XK_Page_Down' undeclared (first use in this 
> function)
>   make[4]: *** [dataentry.lo] Error 1
>   make[4]: Leaving directory 
> `/pkg-ling/src/R-1.6.2/src/modules/X11'
>   make[3]: *** [R] Error 2
>   make[3]: Leaving directory 
> `/pkg-ling/src/R-1.6.2/src/modules/X11'
>   make[2]: *** [R] Error 1
>   make[2]: Leaving directory `/pkg-ling/src/R-1.6.2/src/modules'
>   make[1]: *** [R] Error 1
>   make[1]: Leaving directory `/pkg-ling/src/R-1.6.2/src'
>   make: *** [R] Error 1
>   bash-2.02#
>   
>   
>   I have searched the archives without luck and the X libraries 
> are found:
>   
>   checking for X... libraries /pkg/X11R5/lib, headers 
> /pkg/X11R5/include
>   
>   Thanks in advance for your assistance.
>   
>   --Colin Devine
>   
>   ______________________________________________
>   R-help at stat.math.ethz.ch mailing list
>   http://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

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