Compiling R-2.9.1 on Mac OS X 10.4

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling R-2.9.1 on Mac OS X 10.4

Sinha, Raktim, DFCI
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.

 

Raktim

Bioinformatics Engineer

DFCI, Harvard Med School

Boston

 



The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Compiling R-2.9.1 on Mac OS X 10.4

Marc Schwartz-3
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Compiling R-2.9.1 on Mac OS X 10.4

Don MacQueen
In reply to this post by Sinha, Raktim, DFCI
I used to build from source on Mac OS X, but I stopped when I found I
could do everything I needed to do from the binary on CRAN. That
includes building my own packages that use fortran, or building the
one or two CRAN packages that use C code and do not have Mac binaries
on CRAN.

In addition to which, if you were to install the Mac binary from
CRAN, there's an optional install of gcc, and that might even be an
easier way to get a gcc on your machine. You can still build R from
sources separately, even if you've already installed the binary.

For further help on building from source, I'd suggest asking again on
R-sig-Mac.

-Don

At 1:12 PM -0400 7/9/09, 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.
>
>
>
>Raktim
>
>Bioinformatics Engineer
>
>DFCI, Harvard Med School
>
>Boston
>
>
>
>
>
>The information in this e-mail is intended only for the...{{dropped:26}}

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Compiling R-2.9.1 on Mac OS X 10.4

Sinha, Raktim, DFCI
In reply to this post by Marc Schwartz-3
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:[hidden email]]
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:[hidden email]]
> Sent: Thursday, July 09, 2009 2:03 PM
> To: Sinha, Raktim, DFCI
> Cc: [hidden email]
> 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}}

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Compiling R-2.9.1 on Mac OS X 10.4

Sinha, Raktim, DFCI
In reply to this post by Sinha, Raktim, DFCI
Hello -- Just wanted to let you know that installing XCode Tools package took
care of the JRI --enable-R-shlib issue.
R binary, as you guys suggested, was OK. The JRI compilation error was a bit
misleading for me.

Thanks for helping out a Mac novice.
Raktim


-----Original Message-----
From: Sinha, Raktim, DFCI
Sent: Thursday, July 09, 2009 3:50 PM
To: 'Marc Schwartz'; 'Don MacQueen'; '[hidden email]'
Subject: RE: [R] Compiling R-2.9.1 on Mac OS X 10.4

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:[hidden email]]
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:[hidden email]]
> Sent: Thursday, July 09, 2009 2:03 PM
> To: Sinha, Raktim, DFCI
> Cc: [hidden email]
> 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}}

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.