[R] Compiling R-2.9.1 on Mac OS X 10.4
Sinha, Raktim, DFCI
Raktim_Sinha at dfci.harvard.edu
Thu Jul 9 21:50:21 CEST 2009
Matt & Don -- Thanks a lot for the comments. I think I need to figure out why
JRI is not recognizing the R installation as shared library build first, and go
from there.
I will try post back on r-sig-mac if I need too.
Best,
Raktim
-----Original Message-----
From: Marc Schwartz [mailto:marc_schwartz at me.com]
Sent: Thursday, July 09, 2009 3:36 PM
To: Sinha, Raktim, DFCI
Subject: Re: [R] Compiling R-2.9.1 on Mac OS X 10.4
On Jul 9, 2009, at 2:08 PM, Sinha, Raktim, DFCI wrote:
> Hi Matt,
Marc....
and please post follow ups back to the list. That way, you get a wider
audience of folks who can reply to your query and you don't impose on
specific individuals. To your own benefit, you are not waiting for one
specific individual, who may not be available to respond to you. Keep
in mind, we are all volunteers and most of us have full time jobs
which will keep us busy.
As Don noted, there is also a specific R list for OSX related queries.
More information here:
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
If the comments below are not helpful, please post follow ups there
after subscribing.
> I am trying to compile JRI(http://www.rforge.net/JRI/) for Mac, Win
> & Linux
> which loads R dynamic library into Java.
>
> I had no problems doing it with Windows as the binary is built using
> --enable-R-shlib but for Linux and Mac its giving me errors.
>
> The specific errors of Mac:
>
> /Library/Frameworks/R.framework/Resources/bin/config: line 1: make:
> command not
> found
> /Library/Frameworks/R.framework/Resources/bin/config: line 1: make:
> command not
> found
> R was not built as a library
> configure: error: R was not compiled with --enable-R-shlib
>
If you are going to compile from source, the first thing that you need
to do is to install the XCode Tools package, which is from Apple and
available on the OSX install DVD or from Apple, all of which is noted
in the OSX FAQ I pointed you to. XCode Tools provides the basic
compiling environment and tools, with the exception of a FORTRAN
compiler, which is available from the CRAN OSX Tools page as a binary.
I don't use JRI, but would suggest that you review the guidance in
their FAQ, which points to certain system configuration things that
you need to do to get it to work with R.
> *** You must have libR.so or equivalent in order to use JRI ***
>
> I Installed R-2.9.1 from the same location you pointed me too. Also
> I was
> following the instructions from the same site you referred to, to
> compile on
> Mac.
As noted, you should not have to compile R from source, as the result
of your compilation will be essentially identical to the binary
available from CRAN. If you are not comfortable with low level system
operations, I would urge you to steer away from building R from
source. Even for most Linux distributions, there are pre-compiled R
binaries available via the normal package management tools and they
too are typically built with R as a shared library.
You should be able to install JRI using the command noted on the JRI
web site, after installing the R binary:
install.packages("rJava")
There is an OSX binary available on the CRAN mirrors.
>
> Is there a way I get the log file across?
You can try to rename the file with a .txt extension or better, upload
it someplace and post the URL to it, which would be a better option,
so as not to send a large attachment to the list.
HTH,
Marc
> Thanks
> Raktim
>
>
>
> -----Original Message-----
> From: Marc Schwartz [mailto:marc_schwartz at me.com]
> Sent: Thursday, July 09, 2009 2:03 PM
> To: Sinha, Raktim, DFCI
> Cc: r-help at r-project.org
> Subject: Re: [R] Compiling R-2.9.1 on Mac OS X 10.4
>
> On Jul 9, 2009, at 12:12 PM, Sinha, Raktim, DFCI wrote:
>
>> Hello,
>>
>>
>>
>> I am trying to compile R-2.9.1 on Mac OS-X 10.4 using --enable-R-
>> shlib.
>>
>>
>>
>> I am not comfortable with Mac/Linux environments and trying to
>> follow the
>> instructions from CRAN site to every detail.
>>
>> The Mac OS did not have a gcc (gcc -version did not work). So I did
>> the
>> following:
>>
>>
>>
>> ## For gcc 4.2 and Fortran 4.2.4 Compilers
>>
>> Download gcc-4.2-5566-darwin8-all.tar.gz from
>> http://r.research.att.com/tools/#gcc42
>>
>> unpacked using: sudo tar fvxz gcc-4.2-5566-darwin8-all.tar.gz -C /
>>
>> Made gcc-4.2 default: sudo link gcc-4.2 gcc
>>
>> Made g++-4.2 default: sudo link g++-4.2 g++
>>
>>
>>
>> I downloaded the source and tried compiling using:
>>
>> ./configure --with-blas='-framework vecLib' --with-lapack --with-
>> ICU \
>>
>> --with-aqua --enable-R-framework --enable-R-shlib
>>
>>
>>
>> Got the following error:
>>
>> Configure: error: C compiler cannot create executables
>>
>>
>>
>> I have attached the compile.log file.
>>
>> I would really appreciate some help.
>
>
> The log file did not survive the list spam filters, but is there a
> particular reason that you are compiling from source?
>
> A universal binary installation package (which is built using --
> enable-
> R-shlib) is available from a CRAN mirror such as:
>
> http://cran.us.r-project.org/
>
> You might want to review the OSX FAQ as well:
>
> http://cran.us.r-project.org/bin/macosx/RMacOSX-FAQ.html
>
> If you really need to build from source, which is not for the feint of
> heart, begin by reviewing section 2 of the FAQ.
>
> HTH,
>
> Marc Schwartz
>
>
>
> The information in this e-mail is intended only for th...{{dropped:13}}
More information about the R-help
mailing list