[R-SIG-Mac] Which gcc version on mac os?

Christophe Dutang dutangc at gmail.com
Sun Apr 10 10:42:01 CEST 2011


Dear all,

I use R 2.12.2 to build, install and check my packages, in particular randtoolbox. On my macbook with OS X 10.6.7, the gcc installed is
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) . From http://r.research.att.com/tools/, I have also downloaded gfortran (GNU Fortran (GCC) 4.2.3).

With this framework, I do not get any error and warnings on the randtoolbox package.

But using gcc 4.6 on linux, Kurt Hornik get the following errors in the only one Fortran file of the package:

LowDiscrepancy.f:180.26:

        QN(I, J) = HQNORM(QUASI(J))                                    
                         1
Error: Return type mismatch of function 'hqnorm' at (1) (REAL(4)/REAL(8))
LowDiscrepancy.f:1393.29:

                    TEMP1 = TEMP1 + TEMP01                             
                            1
Warning: Possible change of value in conversion from REAL(4) to INTEGER(4) at (1)
LowDiscrepancy.f:405.29:

           QN(I, J) = SQNORM(QUASI(J))                                 
                            1
Error: Return type mismatch of function 'sqnorm' at (1) (REAL(4)/REAL(8))
make: *** [LowDiscrepancy.o] Error 1


My first question is which is the standard version of gcc to use? from http://cran.r-project.org/web/checks/check_flavors.html#r-release-macosx-ix86, it should gcc 4.2.1 ? If I have to update gcc, where can I find the binaries? 

My second question, in the case I can reproduce this error on my macbook or a linux, the fortran errors are a wrong type between the QN variable and the return value of HQNORM. Looking at the LowDiscrepancy.f file, both QN and the return type of QNORM are DOUBLE PRECISION. Does anyone have a guess where is the problem?

Thanks in advance

Christophe

--
Christophe Dutang
Ph.D. student at ISFA, Lyon, France
website: http://dutangc.free.fr



More information about the R-SIG-Mac mailing list