[R] Compiling R for OS X 10.2.6 (Darwin 6.6)

Don MacQueen macq at llnl.gov
Fri Jun 27 17:03:02 CEST 2003


I'm not even close to expert at solving these kinds of problems, so 
I'll just offer some information from my successful build of R 1.7.1 
in OS X 10.2.6 (on a G4 desktop machine), and hope it helps.

I used this configure command:

../source/configure --prefix=/Users/macq/R/R-1.7.1 --enable-R-shlib 
--with-blas=-framework vecLib --with-lapack
CPPFLAGS=-I/sw/include LDFLAGS=-L/sw/lib

Note that I put the source code tree in a directory named "source", 
and build in an adjacent directory named "build".

Here are all the lines (3 of them) in the output from my make step 
that contain "Rdynload.c"

making Rdynload.d from ../../../source/src/main/Rdynload.c

gcc    -no-cpp-precomp -I. -I../../src/include 
-I../../../source/src/include -I/sw/include -DHAVE_CONFIG_H 
-I/sw/include -c ../../../source/src/main/Rdynload.c -o Rdynload.o

gcc    -no-cpp-precomp -I. -I../../src/include 
-I../../../source/src/include -I/sw/include -DHAVE_CONFIG_H 
-fno-common  -I/sw/include -c ../../../source/src/main/Rdynload.c -o 
Rdynload.lo

Here is a copy of the body of an email from Jan de Leeuw to r-sig-mac 
on 2003-5-30:
>The new g77 in fink/unstable is 3.3. It fails to build R, unless
>I setenv LDFLAGS to -lcc_dynamic.
>
>I now also
>
>setenv MACOSX_DEPLOYMENT_TARGET 10.2
>
>which uses the various dylibs as weak libraries.

I'm using v3.1 of both gcc and g77; g77 is from fink.

Does your G4 have the "BSD Subsystem" installed? I'm guessing that it 
does, or you probably would have had even more problems, but it's 
worth a check.
   ls /Library/Receipts | grep BSD

My copies of make, gnumake, and makeinfo are all in /usr/bin, i.e., 
not from fink.

-Don

At 1:45 PM -0700 6/26/03, feldesmanm at pdx.edu wrote:
>Our lab just picked up a G4 Powerbook (1 GHz, 1GB RAM, OS X 10.2.6). 
>None of us have any experience with Macs but for various reasons we 
>need to have one around for development.
>
>In any case, we've installed fink, all the Apple Developer Tools and 
>the Dec2002updater to gcc 3.3.  We're now trying to compile R 1.7.1 
>without too much success.  First we had to get g77, which turned out 
>to be a headache because the version on fink doesn't match the gcc 
>version on the Powerbook and wouldn't install.  We reset the PB gcc 
>version to default to gcc 3.1, which then allowed us to install the 
>g77 patch.
>
>In building R, the configure is fine (except for lacking pdf and dvi 
>support to build the manuals - no big deal right now), but during 
>the make, the program barfs, complaining that it can't find 
>Rdynload.c, which sits precisely where it ought to be.  Again, since 
>we have no experience with building software on the Mac, this one is 
>tough to sort out.
>
>I read a few messages on R-devel about issues involving g77 support, 
>but I don't know whether this is the problem or not.  The errors are 
>being emitted when the make is using gcc, which might be 3.1 or 3.3. 
>There doesn't seem to be any way to remove the "updater".
>
>I'd appreciate any pointers from experienced Mac folks out there. 
>(BTW, I did find Jan de Leuew's binary of 1.7.1.  It installs fine 
>in the meantime, but it would still be helpful to resolve the 
>compilation problem as I expect we'll encounter other issues like 
>this soon).
>
>Thanks.
>
>
>
>
>Dr. Marc R. Feldesman
>Professor and Chairman Emeritus
>Anthropology Department - Portland State University
>email:  feldesmanm at pdx.edu
>email:  feldesman at attglobal.net
>fax:    503-725-3905
>
>
>"Sometimes the lights are all shining on me, other times I can barely see,
>lately it's occurred to me, what a long strange trip it's been..."  Jerry &
>the boys
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help


-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA




More information about the R-help mailing list