[R] R compiling on SOLARIS 2.6

Ross Ihaka
Thu, 22 Apr 1999 21:30:46 -0000

On Thu, 22 Apr 1999, Carl Carpenter wrote:

> We here at HGSI have a consultant doing some statistical work for us.
> HGSI bought and installed SAS, but our consultant insists that R and
> Rweb is a better solution. I do not know either package so I do not
> know, hence we are ditching SAS for R and Rweb. Any comments on this
> are welcom.

Gulp.  No I really mean GULP!

Without additional info it is hard to comment.  What is your
application?

> All prereqs for R are installed and checked.
>
> Ran configure script as follows
>
>   ./configure --prefix=/usr/local --x-includes=/usr/openwin/include
> --x-libs=/usr/openwin/lib

Try leaving out the specification of where the X libraries are.
Autoconf is pretty good at figuring things like this out.

Most people I know are using X11R6 now, but I think that openwindows is
current enough for it to do the job.

> Compiling R gives these errors
>
>   make[2]: Leaving directory `/usr/local/R-0.64.0/src/nmath'
>   make[2]: Entering directory `/usr/local/R-0.64.0/src/unix'
>   gcc -g -O2  -I../include -I../../src/include  -c dataentry.c
>   In file included from dataentry.c:24:
>   dataentry.h:22: X11/X.h: No such file or directory
>   dataentry.h:23: X11/Xlib.h: No such file or directory
>   dataentry.h:24: X11/Xutil.h: No such file or directory
>   dataentry.h:25: X11/keysym.h: No such file or directory
>   dataentry.h:26: X11/cursorfont.h: No such file or directory
>   make[2]: *** [dataentry.o] Error 1
>   make[2]: Leaving directory `/usr/local/R-0.64.0/src/unix'
>   make[1]: *** [R] Error 1
>   make[1]: Leaving directory `/usr/local/R-0.64.0/src'
>   make: *** [R] Error 1
>
>
> Anybody have any ideas on how to make R compile cleanly?

The path to the X11 include files is not being set.  Try letting the
configure script discover the location of them.  If that fails, do the
configure and then try setting the correct lines in Makeconf.

My lines on Solaris look like

X_CFLAGS =  -I/usr/local/X11R6/include
X_LIBS =  -L/usr/local/X11R6/lib -R/usr/local/X11R6/lib -lX11
X_PRE_LIBS =  -lSM -lICE
X_EXTRA_LIBS = -lsocket  -lnsl

which suggests that something like

X_CFLAGS =  -I/usr/openwin/include
X_LIBS =  -L/usr/openwin/lib -lX11
X_PRE_LIBS =
X_EXTRA_LIBS = -lsocket  -lnsl

may work under openwindows.

Let us know what happens.  As a last resort we can get you binaries.

	Ross