Hi, Thanks for the replies. The version is indeed 3.1.1 (sorry about the typo in the subject line). I was able to make progress and get R to compile after setting --with-recommended-packages=no, since the Matrix package was the only blocker.
I went back as far as R 2.15.3, which had the same issue. Noticing mpicc was a good insight. I'm curious myself how it is that mpicc is being selected. It only happens for the Matrix package; looking through the compilation everything else is correctly using gcc -std=c99 as the output of configure suggests. Probably what I will do is compile those recommended packages separately as needed and ensure that they get the correct flags to ./configure when doing so. Thanks, Titus -- Titus Barik, PE <ti...@barik.net> On Mon, Sep 1, 2014, at 02:25 PM, Prof Brian Ripley wrote: > It seems you are using mpicc as your compiler for the Matrix package, > and have not selected C99 mode for it. I don't know how you did that: > maybe you have CC set in your environment. To get to that point you > will have compiled lots of R which uses C99 features. > > There is no such thing as R 3.1.3 (in the subject), but this seems to be > R 3.1.1. > > > On 01/09/2014 20:58, Titus Barik wrote: > > Hi all, > > > > I'm unable to compile R under an HPC system (which like many HPC systems > > doesn't always have the latest and greatest software). The version of > > GCC is 4.1.2 under CentOS 5.7. Running ./configure gives the following > > output: > > > > R is now configured for x86_64-unknown-linux-gnu > > > > Source directory: . > > Installation directory: /home/tbarik > > > > C compiler: gcc -std=gnu99 -I/home/tbarik/include > > Fortran 77 compiler: gfortran -g -O2 > > > > C++ compiler: g++ -g -O2 > > C++ 11 compiler: > > Fortran 90/95 compiler: gfortran -g -O2 > > Obj-C compiler: > > > > Interfaces supported: X11 > > External libraries: readline > > Additional capabilities: NLS > > Options enabled: shared BLAS, R profiling > > > > Recommended packages: yes > > > > which I think looks good (at least, -std=gnu99 appears to be present). > > However, when I try make, I receive the following dump during > > installation of the Matrix package: > > > > * installing *source* package 'Matrix' ... > > ** package 'Matrix' successfully unpacked and MD5 sums checked > > ** libs > > make[3]: Entering directory > > `/state/partition1/tmp/RtmpCw7v7G/R.INSTALL3227fa892a3/Matrix/src' > > mpicc -I/home/tbarik/src/R-3.1.1/include -DNDEBUG -DNTIMER > > -I./SuiteSparse_config -I/usr/local/incl ude -fpic > > -I/home/tbarik/include -c CHMfactor.c -o CHMfactor.o > > In file included from CHMfactor.h:4, > > from CHMfactor.c:2: > > Mutils.h: In function 'inv_permutation': > > Mutils.h:270: error: 'for' loop initial declaration used outside C99 > > mode > > In file included from Mutils.h:374, > > from CHMfactor.h:4, > > from CHMfactor.c:2: > > t_sparseVector.c: In function 'dsparseVector_sub': > > t_sparseVector.c:139: error: 'for' loop initial declaration used outside > > C99 mode > > In file included from Mutils.h:377, > > from CHMfactor.h:4, > > from CHMfactor.c:2: > > t_sparseVector.c: In function 'isparseVector_sub': > > t_sparseVector.c:139: error: 'for' loop initial declaration used outside > > C99 mode > > In file included from Mutils.h:380, > > from CHMfactor.h:4, > > from CHMfactor.c:2: > > t_sparseVector.c: In function 'lsparseVector_sub': > > t_sparseVector.c:139: error: 'for' loop initial declaration used outside > > C99 mode > > In file included from Mutils.h:383, > > from CHMfactor.h:4, > > from CHMfactor.c:2: > > t_sparseVector.c: In function 'nsparseVector_sub': > > t_sparseVector.c:139: error: 'for' loop initial declaration used outside > > C99 mode > > In file included from Mutils.h:386, > > from CHMfactor.h:4, > > from CHMfactor.c:2: > > t_sparseVector.c: In function 'zsparseVector_sub': > > t_sparseVector.c:139: error: 'for' loop initial declaration used outside > > C99 mode > > make[3]: *** [CHMfactor.o] Error 1 > > make[3]: Leaving directory > > `/state/partition1/tmp/RtmpCw7v7G/R.INSTALL3227fa892a3/Matrix/src' > > ERROR: compilation failed for package 'Matrix' > > * removing '/home/tbarik/src/R-3.1.1/library/Matrix' > > make[2]: *** [Matrix.ts] Error 1 > > > > Any advice on what to do is greatly appreciated. > > > > Thanks, > > > > Titus > > > > > > > -- > Brian D. Ripley, rip...@stats.ox.ac.uk > Emeritus Professor of Applied Statistics, University of Oxford > 1 South Parks Road, Oxford OX1 3TG, UK > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel