Using non-gcc compilers with install.packages()
Trond Hasle Amundsen wrote:
Roger Bivand <Roger.Bivand at nhh.no> writes:
On Thu, 1 Sep 2005, Trond Hasle Amundsen wrote:
Hi, I have built R 2.1.1 on Solaris and OSF1, and used the operating system's native compiler set. This worked fine. However, when I try using install.packages() it insists on using g77 etc., which doesn't exist on those systems. How can I specify which compilers to use? What about other compile-time options like LDFLAGS etc.? NB! Please include me in the CC list, since I'm not a mailinglist member. PS. I really like perl's approach to module building. When building perl modules, it defaults to the same compilers as perl was initially built with. This seems like a sane approach also for R IMHO.
Indeed, R is pretty sane. Fine tuning is conveniently carried out by editing the config.site file in the root source directory; LDFLAGS are on line 138 of the released 2.1.1 source. Which particular packages have you found showing this behaviour?
Hmm..
- The following use correct c/c++ compilers, but fail to recognize
this as as Solaris system and uses -fPIC instead of -KPIC for
shared objects. They also use other gcc-specific options like
'-O2':
RandomFields
geoR
geoRglm
rgl
- The following packages try g77 without first checking if it
exists. I did not specify the F77 variable when compiling R, since
it found f77 by itself. If all I need is to re-compile with the F77
variable set to 'f77', I won't mind.
akima
sm
spatstat
splancs
There are problably more.. these two problem seem to be consistent
across modules, but I can't be sure.
So these are package related problems. Can you please let the corresponding package authors know and ask them to fix their packages. Uwe Ligges
Cheers,