[R] compile R on Solaris 9

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed May 3 10:34:22 CEST 2006


On Tue, 2 May 2006, Brian O'Gorman wrote:

> I can't  make R on a Solaris 9 box. Does anyone have any suggestions? Thanks 
> in advance.

Looks like the effect of some header you are including from Solaris9. Try
adding

#undef open

near the top of src/main/connections.c, after fcntl.h is included.

Looking at Solaris 8 headers, there is in fcntl.h

/* large file compilation environment setup */
#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
#ifdef __PRAGMA_REDEFINE_EXTNAME
#pragma redefine_extname        open    open64
#pragma redefine_extname        creat   creat64
#else
#define open                    open64
#define creat                   creat64
#endif
#endif  /* !_LP64 && _FILE_OFFSET_BITS == 64 */

so this will probably be avoided if you configure with --disable-largefile
However, it is not being reported on other Solaris setups.


> <3>-> make
> `Makedeps' is up to date.
> `libbz2.a' is up to date.
> `Makedeps' is up to date.
> `libpcre.a' is up to date.
> `Makedeps' is up to date.
> `libz.a' is up to date.
> ../../../src/include/libintl.h is unchanged
> ../../../include/libintl.h is unchanged
> `localecharset.h' is up to date.
> `Makedeps' is up to date.
> `libintl.a' is up to date.
> `Makedeps' is up to date.
> `libappl.a' is up to date.
> `Makedeps' is up to date.
> `libnmath.a' is up to date.
> `Makedeps' is up to date.
> `libunix.a' is up to date.
> `Makedeps' is up to date.
> gcc -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre 
> -I. -I../../src/include -I../../src/include -I/usr/local/include 
> -DHAVE_CONFIG_H   -g -O2 -c connections.c -o connections.o
> connections.c: In function `init_con':
> connections.c:381: structure has no member named `open64'
> connections.c: In function `newfile':
> connections.c:639: structure has no member named `open64'
> connections.c: In function `newfifo':
> connections.c:785: structure has no member named `open64'
> connections.c: In function `do_fifo':
> connections.c:837: structure has no member named `open64'
> connections.c: In function `newpipe':
> connections.c:919: structure has no member named `open64'
> connections.c: In function `do_pipe':
> connections.c:978: structure has no member named `open64'
> connections.c: In function `newgzfile':
> connections.c:1114: structure has no member named `open64'
> connections.c: In function `do_gzfile':
> connections.c:1163: structure has no member named `open64'
> connections.c: In function `newbzfile':
> connections.c:1295: structure has no member named `open64'
> connections.c: In function `do_bzfile':
> connections.c:1341: structure has no member named `open64'
> connections.c: In function `newclp':
> connections.c:1582: structure has no member named `open64'
> connections.c: In function `newtext':
> connections.c:1818: structure has no member named `open64'
> connections.c: In function `newouttext':
> connections.c:1974: structure has no member named `open64'
> connections.c: In function `do_sockconn':
> connections.c:2094: structure has no member named `open64'
> connections.c: In function `do_unz':
> connections.c:2145: structure has no member named `open64'
> connections.c: In function `do_open':
> connections.c:2192: structure has no member named `open64'
> connections.c: In function `do_readLines':
> connections.c:2462: structure has no member named `open64'
> connections.c: In function `do_writelines':
> connections.c:2556: structure has no member named `open64'
> connections.c: In function `do_readbin':
> connections.c:2692: structure has no member named `open64'
> connections.c: In function `do_writebin':
> connections.c:2895: structure has no member named `open64'
> connections.c: In function `do_readchar':
> connections.c:3140: structure has no member named `open64'
> connections.c: In function `do_writechar':
> connections.c:3212: structure has no member named `open64'
> connections.c: In function `switch_or_tee_stdout':
> connections.c:3390: structure has no member named `open64'
> connections.c: In function `do_url':
> connections.c:3622: structure has no member named `open64'
> connections.c: In function `gzcon_open':
> connections.c:3673: structure has no member named `open64'
> connections.c: In function `do_gzcon':
> connections.c:3969: structure has no member named `open64'
> connections.c:3987: structure has no member named `open64'
> *** Error code 1
> make: Fatal error: Command failed for target `connections.o'
> Current working directory /apps/R/R-patched/src/main
> *** Error code 1
> make: Fatal error: Command failed for target `R'
> Current working directory /apps/R/R-patched/src/main
> *** Error code 1
> make: Fatal error: Command failed for target `R'
> Current working directory /apps/R/R-patched/src
> *** Error code 1
> make: Fatal error: Command failed for target `R'
>
>

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