[R-SIG-Mac]darwin r on jaguar

Jan de Leeuw deleeuw@stat.ucla.edu
Sat, 17 Aug 2002 21:57:43 -0700


Jaguar (OS X 10.2, comes with gcc-3.1, but unfortunately not with g77  
yet. You can
use the latest f2c from fink, and configure with F2C=/sw/bin/f2c. This
works. A version of R-devel using f2c is on  
ftp://gifi.stat.ucla.edu/pub.
I have also tried Absoft f77 and NAG f95, so far without success.

I then decided to live dangerously and downloaded gcc-3.3 from Darwin
CVS. This has all the Apple extensions, and builds gcc, g77, and
gcj (java compiler). It installs in /usr/local/bin. I then configured R  
with

configure --with-tcl-config=/sw/lib/tclConfig.sh  
--with-tk-config=/sw/lib/tkConfig.sh \
F77="/usr/local/bin/g77 -no-cpp-precomp" \
CC="/usr/local/bin/gcc -no-cpp-precomp" \
CPP="/usr/local/bin/cpp -no-cpp-precomp" \
CXX="/usr/local/bin/g++ -no-cpp-precomp" \
LDFLAGS="-L/sw/lib -Xlinker -m"

We need the -m linker flag to turn duplicate symbol errors into  
warnings, otherwise
configure fails because crt1,o and crtbegin.o are included twice (?).  
It's
a hack, and answers a question I do not understand, but it works.

Two more things need to be adjusted. Make sure CarbonCore.h does
NOT include Debugging.h, otherwise devQuartz.c fails to compile.

Also make sure Xlib.h includes stdlib.h to define wchar_t, otherwise
X11.c fails to compile.

These last two hacks are probably gcc-3.3 bugs, but anyway, everything
now compiles and works, including quartz() and library(tcltk). I thus  
have
a version of R-devel compiled with gcc/g77-3.3, which I'll upload next  
week to
ftp://gifi.stat.ucla.edu/pub. It uses ATLAS, but unfortunately a fink  
version compiled
on OS 10.1.5 with gcc/g77-2.95.2 -- not quite optimal probably.

It is of some interest that the two most important GNU applications,  
emacs
and the gcc suite, now compile directly from CVS -- emacs to a nice  
Carbon
application, gcc with all the Apple extensions.
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
   
------------------------------------------------------------------------ 
-------------------------