[Rd] R compilation problem on 64 bit SunOS (PR#13898)

uwe_f_mayer at yahoo.com uwe_f_mayer at yahoo.com
Fri Aug 21 03:00:10 CEST 2009

Full_Name: Uwe F. Mayer
Version: 2.9.1
OS: SunOS myhost 5.10 Generic_120012-14 i86pc i386 i86pc Solaris
Submission from: (NULL) (

With the change of the NLS handling from 2.9.0 to 2.9.1 the compilation breaks,
even as I do specifically not request nls.


gcc -v 
Using built-in specs.
Target: x86_64-pc-solaris2.10
Configured with: ../../src/gcc-4.4.0/configure
--with-mpfr=/usr/local/opt/x86_64-pc-solaris2.10 --disable-nls
--enable-languages=c,c++,fortran -with-gnu-as --without-gnu-ld
--with-ld=/usr/ccs/bin/ld --with-as=/usr/sfw/bin/gas CC='gcc -m64' CXX='g++
-m64' CFLAGS='-m64 -g -O2' CXXFLAGS='-m64 -g -O2' LDFLAGS=-m64
Thread model: posix
gcc version 4.4.0 (GCC) 

R version: 2.9.1 (2009-06-29)

R configuration
--exec-prefix=/usr/local/opt/x86_64-pc-solaris2.10/R-2.9.1 --disable-nls
--without-recommended-packages --with-readline --with-gnu-ld CC="gcc -m64
-L/usr/local/opt/x86_64-pc-solaris2.10/lib" F77="gfortran -m64" CXX="g++ -m64"
FC="gfortran -m64" LIBnn=lib64 LD=/usr/local/opt/x86_64-pc-solaris2.10/bin/ld

The last compilation step throwing the error:

gcc -m64 -I/usr/local/opt/x86_64-pc-solaris2.10/include
-L/usr/local/opt/x86_64-pc-solaris2.10/lib -std=gnu99 -I. -I../../src/include
-I../../../../src/R-2.9.1/src/include -I/usr/openwin/include
-I/usr/local/include -DHAVE_CONFIG_H    -g -O2 -c
../../../../src/R-2.9.1/src/unix/system.c -o system.o
In file included from /usr/include/locale.h:50,
                 from ../../../../src/R-2.9.1/src/unix/system.c:36:
/usr/include/libintl.h:62: error: expected identifier or '(' before 'unsigned'

The contents of /usr/include/libintl.h, line62:

extern char *ngettext(const char *, const char *, unsigned long int);

The same error happens to several other files (datetime.c, main.c, platform.c
util.c), all of which with the exception of the last one have not even changed
since 2.9.0. I compiled 2.9.0. in a parallel tree, copied the corresponding .o
files over, and got the resulting version to run.

More information about the R-devel mailing list