rt
2010-Feb-22 19:11 UTC
[Rd] Compiling R on Linux with SunStudio 12.1: "wide-character type" problems
I am trying to compile R on Linux using SunStudio. Configure flags are mostly as suggested in the R install guide. CC=/opt/sun/sunstudio12.1/bin/suncc CFLAGS="-g -xc99 -xlibmil -xlibmieee" MAIN_CFLAGS=-g SHLIB_CFLAGS=-g CPPFLAGS="-I. -I/opt/sun/sunstudio12.1/prod/include -I/opt/sun/sunstudio12.1/prod/include/cc" CPPFLAGS+="-I/opt/sun/sunstudio12.1/prod/include/cc/sys -I/usr/local/include" F77=/opt/sun/sunstudio12.1/bin/sunf95 FFLAGS="-g -O -libmil " SAFE_FFLAGS="-g -libmil" CPICFLAGS=-Kpic FPICFLAGS=-Kpic SHLIB_LDFLAGS=-shared LDFLAGS=-L/opt/sun/sunstudio12.1/lib/386 CXX=/opt/sun/sunstudio12.1/bin/sunCC CXXFLAGS="-g -xlibmil -xlibmieee" CXXPICFLAGS=-Kpic SHLIB_CXXLDFLAGS="-G -lCstd" FC=/opt/sun/sunstudio12.1/bin/sunf95 FCFLAGS=$FFLAGS FCPICFLAGS=-Kpic MAKE=dmake R install guide also indicates that: "The OS needs to have enough support for wide-character types: this is checked at configuration. Specifically, the C99 functionality of headers wchar.h and wctype.h, types wctans_t and mbstate_t and functions mbrtowc, mbstowcs, wcrtomb, wcscoll, wcstombs, wctrans, wctype, and iswctype." Configure stops with the following error message: checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking for iconv... in libiconv checking whether iconv accepts "UTF-8", "latin1" and "UCS-"... yes checking for iconvlist... yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking wctype.h usability... yes checking wctype.h presence... yes checking for wctype.h... yes checking whether mbrtowc exists and is declared... yes checking whether wcrtomb exists and is declared... yes checking whether wcscoll exists and is declared... yes checking whether wcsftime exists and is declared... yes checking whether wcstod exists and is declared... yes checking whether mbstowcs exists and is declared... yes checking whether wcstombs exists and is declared... yes **checking whether wctrans exists and is declared... no checking whether iswblank exists and is declared... no checking whether wctype exists and is declared... no checking whether iswctype exists and is declared... no configure: error: Support for MBCS locales is required.* Relevant parts of config.log are as follows: configure:39472: checking whether iswctype exists and is declared configure:39510: /opt/sun/sunstudio12.1/bin/suncc -o conftest -g -xc99 -xlibmil -xlibmieee -m32 -I. -I/opt/sun/sunstudio12.1/prod/include -I/opt/sun/sunstudio12.1/prod/include/cc-I/opt/sun/sunstudio12.1/prod/include/cc/sys -I/usr/local/include -L/opt/sun/sunstudio12.1/lib/386 -L/usr/local/lib conftest.c -ldl -lm -liconv >&5 *"/usr/include/wctype.h", line 112: syntax error before or at: __wc "/usr/include/wctype.h", line 195: syntax error before or at: towlower "/usr/include/wctype.h", line 302: syntax error before or at: towupper_l "/usr/include/wctype.h", line 302: syntax error before or at: __wc "/usr/include/wctype.h", line 310: syntax error before or at: towctrans_l "/usr/include/wctype.h", line 310: syntax error before or at: __wc cc: acomp failed for conftest.c configure:39516: $? = 1 configure: failed program was: | /* confdefs.h. */ *| #define PACKAGE_NAME "R" ........ ........ *| #include <wctype.h> *| | #ifdef F77_DUMMY_MAIN | | # ifdef __cplusplus | extern "C" | # endif | int F77_DUMMY_MAIN() { return 1; } | | #endif *| int | main () | { | #ifndef iswctype | char *p = (char *) iswctype; | #endif | | ; | return 0; | } configure:39534: result: no configure:39710: error: Support for MBCS locales is required.* I am not sure if this is a Linux issue or if it is a SunStudio issue. Has anybody tried to compile R on Linux using SunStudio? Thanks in advance, Russ [[alternative HTML version deleted]]
Martyn Plummer
2010-Feb-23 10:18 UTC
[Rd] Compiling R on Linux with SunStudio 12.1: "wide-character type" problems
Russ, This is a known issue with Sun Studio on Linux and was fixed by Brian Ripley in January. If you download R-patched.tar.gz from here: ftp://ftp.stat.math.ethz.ch/Software/R/ then it should work for you. Martyn On Mon, 2010-02-22 at 13:11 -0600, rt wrote:> I am trying to compile R on Linux using SunStudio. Configure flags are > mostly as suggested in the R install guide. > > CC=/opt/sun/sunstudio12.1/bin/suncc > CFLAGS="-g -xc99 -xlibmil -xlibmieee" > MAIN_CFLAGS=-g > SHLIB_CFLAGS=-g > CPPFLAGS="-I. -I/opt/sun/sunstudio12.1/prod/include > -I/opt/sun/sunstudio12.1/prod/include/cc" > CPPFLAGS+="-I/opt/sun/sunstudio12.1/prod/include/cc/sys > -I/usr/local/include" > F77=/opt/sun/sunstudio12.1/bin/sunf95 > FFLAGS="-g -O -libmil " > SAFE_FFLAGS="-g -libmil" > CPICFLAGS=-Kpic > FPICFLAGS=-Kpic > SHLIB_LDFLAGS=-shared > LDFLAGS=-L/opt/sun/sunstudio12.1/lib/386 > CXX=/opt/sun/sunstudio12.1/bin/sunCC > CXXFLAGS="-g -xlibmil -xlibmieee" > CXXPICFLAGS=-Kpic > SHLIB_CXXLDFLAGS="-G -lCstd" > FC=/opt/sun/sunstudio12.1/bin/sunf95 > FCFLAGS=$FFLAGS > FCPICFLAGS=-Kpic > MAKE=dmake > > R install guide also indicates that: "The OS needs to have enough support > for wide-character types: this is checked at configuration. Specifically, > the C99 functionality of headers wchar.h and wctype.h, types wctans_t and > mbstate_t and functions mbrtowc, mbstowcs, wcrtomb, wcscoll, wcstombs, > wctrans, wctype, and iswctype." > Configure stops with the following error message: > > checking iconv.h usability... yes > checking iconv.h presence... yes > checking for iconv.h... yes > checking for iconv... in libiconv > checking whether iconv accepts "UTF-8", "latin1" and "UCS-"... yes > checking for iconvlist... yes > checking wchar.h usability... yes > checking wchar.h presence... yes > checking for wchar.h... yes > checking wctype.h usability... yes > checking wctype.h presence... yes > checking for wctype.h... yes > checking whether mbrtowc exists and is declared... yes > checking whether wcrtomb exists and is declared... yes > checking whether wcscoll exists and is declared... yes > checking whether wcsftime exists and is declared... yes > checking whether wcstod exists and is declared... yes > checking whether mbstowcs exists and is declared... yes > checking whether wcstombs exists and is declared... yes > **checking whether wctrans exists and is declared... no > checking whether iswblank exists and is declared... no > checking whether wctype exists and is declared... no > checking whether iswctype exists and is declared... no > configure: error: Support for MBCS locales is required.* > > Relevant parts of config.log are as follows: > > configure:39472: checking whether iswctype exists and is declared > configure:39510: /opt/sun/sunstudio12.1/bin/suncc -o conftest -g -xc99 > -xlibmil -xlibmieee -m32 -I. -I/opt/sun/sunstudio12.1/prod/include > -I/opt/sun/sunstudio12.1/prod/include/cc-I/opt/sun/sunstudio12.1/prod/include/cc/sys > -I/usr/local/include -L/opt/sun/sunstudio12.1/lib/386 -L/usr/local/lib > conftest.c -ldl -lm -liconv >&5 > *"/usr/include/wctype.h", line 112: syntax error before or at: __wc > "/usr/include/wctype.h", line 195: syntax error before or at: towlower > "/usr/include/wctype.h", line 302: syntax error before or at: towupper_l > "/usr/include/wctype.h", line 302: syntax error before or at: __wc > "/usr/include/wctype.h", line 310: syntax error before or at: towctrans_l > "/usr/include/wctype.h", line 310: syntax error before or at: __wc > cc: acomp failed for conftest.c > configure:39516: $? = 1 > configure: failed program was: > | /* confdefs.h. */ > *| #define PACKAGE_NAME "R" > ........ > ........ > *| #include <wctype.h> > *| > | #ifdef F77_DUMMY_MAIN > | > | # ifdef __cplusplus > | extern "C" > | # endif > | int F77_DUMMY_MAIN() { return 1; } > | > | #endif > *| int > | main () > | { > | #ifndef iswctype > | char *p = (char *) iswctype; > | #endif > | > | ; > | return 0; > | } > configure:39534: result: no > configure:39710: error: Support for MBCS locales is required.* > > I am not sure if this is a Linux issue or if it is a SunStudio issue. Has > anybody tried to compile R on Linux using SunStudio? > > Thanks in advance, > > Russ > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel----------------------------------------------------------------------- This message and its attachments are strictly confidenti...{{dropped:8}}
rt
2010-Feb-28 15:53 UTC
[Rd] Compiling R on Linux with SunStudio 12.1: "wide-character type" problems
Hi Martyn, Thanks for the help. It works like a charm. I was able to compile and valgrind+R from SunStudio. Russ You can work around this by disabling large file support (configure> --disable-largefile). > > This seems to be another glibc bug. In the header glob.h, there are two > lines where the pre-processor fails to check that __GNUC__ is defined, > and it isn't defined when using Sun Studio. > > Evidently, glibc was designed to work with gcc and has not been > extensively tested with other compilers, or other vendors have learned > to work around the bugs. > > Martyn > > > On Tue, 2010-02-23 at 16:55 -0600, rt wrote: > > Thank you Martyn, > > > > I am one step closer. Using R-patched, configure was successful. > However, > > make exited with an error. > > > > Configure summary: > > Installation directory: /usr/local > > C compiler: /opt/sun/sunstudio12.1/bin/suncc -g -O > -xc99 > > -xlibmil -m32 -xlibmieee -nofstore > > Fortran 77 compiler: /opt/sun/sunstudio12.1/bin/sunf95 -g -O > > -libmil -m32 -nofstore > > C++ compiler: /opt/sun/sunstudio12.1/bin/sunCC -g -O > > -xlibmil -m32 -xlibmieee -nofstore > > Fortran 90/95 compiler: /opt/sun/sunstudio12.1/bin/sunf95 -g -O > > -libmil -m32 -nofstore > > Obj-C compiler: > > Interfaces supported: X11, tcltk > > External libraries: readline, ICU, lzma > > Additional capabilities: PNG, JPEG, NLS, cairo > > Options enabled: shared BLAS, R profiling, Java > > Recommended packages: yes > > > > MAKE error: > > make returned an error related to platform.c and glob.h. > > It seems that glob.h has a poiter to struct dirent {..}, platorm.c has > > struct dirent64 {..}. > > Error message: > > /opt/sun/sunstudio12.1/bin/suncc > > -I../../src/extra -I. -I../../src/include -I../../src/include -I. > > -I/opt/sun/sunstudio12.1/prod/include > > > > > -I/opt/sun/sunstudio12.1/prod/include/cc-I/opt/sun/sunstudio12.1/prod/include/cc/sys > > > > -DHAVE_CONFIG_H -g -g -O -xc99 -xlibmil -m32 -xlibmieee -nofstore > > -c platform.c -o platform.o > > "/usr/include/glob.h", line 175: identifier redeclared: glob64 > > current : function(pointer to const char, int, pointer to function(..) > > returning int, pointer to struct {unsigned int gl_pathc, pointer to > pointer > > to char gl_pathv, unsigned int gl_offs, int gl_flags, pointer to > > function(..) returning void gl_closedir, pointer to function(..) > returning > > pointer to struct dirent64 {..} gl_readdir, pointer to function(..) > > returning pointer to void gl_opendir, pointer to function(..) returning > int > > gl_lstat, pointer to function(..) returning int gl_stat}) returning int > > previous: function(pointer to const char, int, pointer to function(..) > > returning int, pointer to struct {unsigned int gl_pathc, pointer to > pointer > > to char gl_pathv, unsigned int gl_offs, int gl_flags, pointer to > > function(..) returning void gl_closedir, pointer to function(..) > returning > > pointer to struct dirent {..} gl_readdir, pointer to function(..) > returning > > pointer to void gl_opendir, pointer to function(..) returning int > gl_lstat, > > pointer to function(..) returning int gl_stat}) returning int : > > "/usr/include/glob.h", line 159 > > > > My cpu is correctly identified as i386 and I included the flag -m32. Do I > > need to specify architecture separately? > > > > thanks, > > > > Russ > > > > > Russ, > > > > > > This is a known issue with Sun Studio on Linux and was fixed by Brian > > > Ripley in January. If you download R-patched.tar.gz from here: > > > > > > ftp://ftp.stat.math.ethz.ch/Software/R/ > > > > > > then it should work for you. > > > > > > Martyn > > > > > > On Mon, 2010-02-22 at 13:11 -0600, rt wrote: > > > > I am trying to compile R on Linux using SunStudio. Configure flags > are > > > > mostly as suggested in the R install guide. > > > >> R install guide also indicates that: "The OS needs to have enough > > > support > > > > for wide-character types: this is checked at configuration. > Specifically, > > > > the C99 functionality of headers wchar.h and wctype.h, types wctans_t > and > > > > mbstate_t and functions mbrtowc, mbstowcs, wcrtomb, wcscoll, > wcstombs, > > > > wctrans, wctype, and iswctype." > > > > Configure stops with the following error message: > > > > > > > > configure:39534: result: no > > > > configure:39710: error: Support for MBCS locales is required.* > > > > > > > > I am not sure if this is a Linux issue or if it is a SunStudio issue. > > > Has > > > > anybody tried to compile R on Linux using SunStudio? > > > > > > > > Thanks in advance, > > > > > > > > Russ > > > > > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]
Seemingly Similar Threads
- Compiling R on Linux with SunStudio 12.1: "wide-character type" problems (rt)
- Difficulty Compiling RSQLite on Solaris x86 Using Studio 12 Compilers
- R-devel/Linux x64/Sun Studio 12: Problem with Matrix
- Problem with the installation of "install R" on Sun Solaris
- Package ff building error on solaris x64 10u7