Re: [R-SIG-Mac] Feature request: install R in ~/Library/Frameworks

2017-02-07 Thread Gábor Csárdi
On Tue, Feb 7, 2017 at 4:17 PM, Gábor Csárdi  wrote:
[...]

>
> Anyway, different volumes seem like a very good solution to me, because I
> can use the stock CRAN installers. I'll try it in a second.
>

Actually, this will not work, because all R installations will just refer
to /Library anyway. Never mind then, I'll need to recompile, there is no
other way.

Gabor

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] Feature request: install R in ~/Library/Frameworks

2017-02-07 Thread Gábor Csárdi
On Tue, Feb 7, 2017 at 4:07 PM, Prof Brian Ripley 
wrote:

> On 07/02/2017 15:26, Gábor Csárdi wrote:
>
>> On Tue, Feb 7, 2017 at 10:54 AM, Gábor Csárdi > > wrote:
>>
>> On Tue, Feb 7, 2017 at 10:22 AM, Prof Brian Ripley
>> > wrote:
>> [...]
>>
>> Well, you have missed the point.  R itself allows you to do
>> that: do read 'R Installation and Administration'.
>>
>>
>> [...]
>>
>> For use as 'R' from a terminal, multiple CRAN distributions (of
>> 3.x.y for different 'x') can easily be installed and used
>> together: that is §4.3 of the manual.
>>
>>
>> Yes, I indeed missed this. Thanks much for the explanation!
>>
>>
>> One more question. I suppose if I install the various minor versions on
>> different disks (e.g. I want 3.3.2 and 3.3.3 as well), that would work
>> fine as well, and I don't even need pkgutil --forget? Or am I missing
>> something?
>>
>
> You can install in different locations.  I have never tried using
> different 'volumes' (in Apple parlance), but AFAIK Apple treats them
> separately (with separate records of packages installed).


Maybe I am missing the point again, but just installing in different
locations does not seem to work. E.g.:

❯ installer -pkg tmp/R-3.3.2.pkg -target CurrentUserHomeDirectory
installer: Package name is R 3.3.2 for Mac OS X 10.9 or higher (Mavericks
build)
installer: Upgrading at base path /Users/gaborcsardi
installer: The upgrade was successful.

❯ grep Library/Frameworks/R.framework
Library/Frameworks/R.framework/Resources/bin/R
R_HOME_DIR=/Library/Frameworks/R.framework/Resources
R_SHARE_DIR=/Library/Frameworks/R.framework/Resources/share
R_INCLUDE_DIR=/Library/Frameworks/R.framework/Resources/include
R_DOC_DIR=/Library/Frameworks/R.framework/Resources/doc

So the installed version still refers to /Library. If there is nothing
there, then the version in ~/Library fails, of course:

❯ Library/Frameworks/R.framework/Resources/bin/R
Library/Frameworks/R.framework/Resources/bin/R: line 238:
/Library/Frameworks/R.framework/Resources/etc/ldpaths: No such file or
directory

Maybe you mean recompiling using a different framework location, or
different --prefix? Yes, I guess that should work.

Anyway, different volumes seem like a very good solution to me, because I
can use the stock CRAN installers. I'll try it in a second.

Gabor


>
>
> --
> Brian D. Ripley,  rip...@stats.ox.ac.uk
> Emeritus Professor of Applied Statistics, University of Oxford
>

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] Feature request: install R in ~/Library/Frameworks

2017-02-07 Thread Prof Brian Ripley

On 07/02/2017 15:26, Gábor Csárdi wrote:

On Tue, Feb 7, 2017 at 10:54 AM, Gábor Csárdi > wrote:

On Tue, Feb 7, 2017 at 10:22 AM, Prof Brian Ripley
> wrote:
[...]

Well, you have missed the point.  R itself allows you to do
that: do read 'R Installation and Administration'.


[...]

For use as 'R' from a terminal, multiple CRAN distributions (of
3.x.y for different 'x') can easily be installed and used
together: that is §4.3 of the manual.


Yes, I indeed missed this. Thanks much for the explanation!


One more question. I suppose if I install the various minor versions on
different disks (e.g. I want 3.3.2 and 3.3.3 as well), that would work
fine as well, and I don't even need pkgutil --forget? Or am I missing
something?


You can install in different locations.  I have never tried using 
different 'volumes' (in Apple parlance), but AFAIK Apple treats them 
separately (with separate records of packages installed).



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] Feature request: install R in ~/Library/Frameworks

2017-02-07 Thread Gábor Csárdi
On Tue, Feb 7, 2017 at 10:22 AM, Prof Brian Ripley 
wrote:
[...]

> Well, you have missed the point.  R itself allows you to do that: do read
> 'R Installation and Administration'.
>

[...]

For use as 'R' from a terminal, multiple CRAN distributions (of 3.x.y for
> different 'x') can easily be installed and used together: that is §4.3 of
> the manual.
>

Yes, I indeed missed this. Thanks much for the explanation!

Gabor

[...]

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] Feature request: install R in ~/Library/Frameworks

2017-02-07 Thread Prof Brian Ripley

On 07/02/2017 09:02, 美彦 馬場 wrote:

Hi,


On Feb 7, 2017, at 17:46, Gábor Csárdi  wrote:

Hi all,

I realize that this is not the typical use case on macOS, but for my work,
it would be great to be able to install R into ~/Library/Frameworks.

This would allow having different R versions for different users.

I am not sure how difficult this would be to implement. I can see that some
paths in scripts and makefiles are hardwired to /Library/Frameworks. Is
there anything more, perhaps in the binaries as well?



I install R with Fink, which allows you to install R-3.3, R-3.2 and R-3.1.  
Each of them looks for files in 
/sw/Library/Frameworks/R.framework/Versions/3.3, 3.2 and 3.1 respectively.  
Also, CRAN packages for different R versions are installed separately.


Well, you have missed the point.  R itself allows you to do that: do 
read 'R Installation and Administration'.


The reason to install R as a framework is to use R.app (and it is no 
longer the default for a source build).  And it is R.app which is tied 
to /Library/Frameworks/R.framework (and the 'Current' version).  Even 
though there is a Rswitch utility to switch the version R.app invokes, 
it is unreliable as R.app is built against a particular R version and 
may well crash if used with another.  R.app is not itself versioned, and 
there is no way to install it telling it to link to a particular version 
of the R framework.


For use as 'R' from a terminal, multiple CRAN distributions (of 3.x.y 
for different 'x') can easily be installed and used together: that is 
§4.3 of the manual.


Quite a lot of trouble has been taken to avoid the 'R' front-end script 
on macOS, and that does involve hard-coding the installation path in 
many places in the binary distribution.  For example


otool -L 
/Library/Frameworks/R.framework/Resources/library/Matrix/libs/Matrix.so

/Library/Frameworks/R.framework/Resources/library/Matrix/libs/Matrix.so:
Matrix.so (compatibility version 0.0.0, current version 0.0.0)

/Library/Frameworks/R.framework/Versions/3.3/Resources/lib/libRlapack.dylib 
(compatibility version 3.3.0, current version 3.3.2)

/Library/Frameworks/R.framework/Versions/3.3/Resources/lib/libRblas.dylib 
(compatibility version 0.0.0, current version 0.0.0)

/Library/Frameworks/R.framework/Versions/3.3/Resources/lib/libgfortran.3.dylib 
(compatibility version 4.0.0, current version 4.0.0)

/Library/Frameworks/R.framework/Versions/3.3/Resources/lib/libquadmath.0.dylib 
(compatibility version 1.0.0, current version 1.0.0)

I do not recall how much of this is done by the R scripts for installing 
to a framework and how much by the scripts used to build the installer 
(although AFAIR libgfortran.3.dylib is part of the latter).


--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] Feature request: install R in ~/Library/Frameworks

2017-02-07 Thread Gábor Csárdi
./configure --enable-R-framework=~/Library/Frameworks

does not work, btw, not too surprisingly.

G.

On Tue, Feb 7, 2017 at 10:00 AM, Gábor Csárdi 
wrote:

> On Tue, Feb 7, 2017 at 9:52 AM, David Winsemius 
> wrote:
>
>>
>> > On Feb 7, 2017, at 1:11 AM, Gábor Csárdi 
>> wrote:
>> >
>> > Thanks, that's not an option for me, I need an R installation that is
>> > binary compatible with CRAN.
>> >
>> > I realized that I can maybe use
>> >
>> > ./configure --enable-R-framework=~/Library/Frameworks
>> >
>> > I am trying this right now.
>> >
>>
>> I'm a bit confused. The bog-standard distribution of R has installed it
>> (as a sub-directory) of ~/Library/Frameworks for many versions.
>>
>
> I think the CRAN R build installs in /Library, not in ~/Library.
>
>
>> More specifically it is placed in this subdirectory:
>>
>>  /Library/Frameworks/R.framework
>>
>
> These are not the same. I want it to be in the user's home directory, i.e.
> ~/Library, and not in the global /Library.
>
> Gabor
>
>
>
>> The Revolution R distribution for the Mac also uses this location (and
>> basically copies the installation script that is part of the CRAN version.)
>>
>> --
>> David.
>>
>> > Gabor
>> >
>> > On Tue, Feb 7, 2017 at 9:02 AM, 美彦 馬場  wrote:
>> >
>> >> Hi,
>> >>
>> >>> On Feb 7, 2017, at 17:46, Gábor Csárdi 
>> wrote:
>> >>>
>> >>> Hi all,
>> >>>
>> >>> I realize that this is not the typical use case on macOS, but for my
>> >> work,
>> >>> it would be great to be able to install R into ~/Library/Frameworks.
>> >>>
>> >>> This would allow having different R versions for different users.
>> >>>
>> >>> I am not sure how difficult this would be to implement. I can see that
>> >> some
>> >>> paths in scripts and makefiles are hardwired to /Library/Frameworks.
>> Is
>> >>> there anything more, perhaps in the binaries as well?
>> >>
>> >>
>> >> I install R with Fink, which allows you to install R-3.3, R-3.2 and
>> >> R-3.1.  Each of them looks for files in /sw/Library/Frameworks/R.frame
>> work/Versions/3.3,
>> >> 3.2 and 3.1 respectively.  Also, CRAN packages for different R
>> versions are
>> >> installed separately.
>> >>
>> >> --
>> >> BABA
>> >>
>> >>
>> >
>> >   [[alternative HTML version deleted]]
>> >
>> > ___
>> > R-SIG-Mac mailing list
>> > R-SIG-Mac@r-project.org
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>> David Winsemius
>> Alameda, CA, USA
>>
>>
>

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] Feature request: install R in ~/Library/Frameworks

2017-02-07 Thread Gábor Csárdi
On Tue, Feb 7, 2017 at 9:52 AM, David Winsemius 
wrote:

>
> > On Feb 7, 2017, at 1:11 AM, Gábor Csárdi  wrote:
> >
> > Thanks, that's not an option for me, I need an R installation that is
> > binary compatible with CRAN.
> >
> > I realized that I can maybe use
> >
> > ./configure --enable-R-framework=~/Library/Frameworks
> >
> > I am trying this right now.
> >
>
> I'm a bit confused. The bog-standard distribution of R has installed it
> (as a sub-directory) of ~/Library/Frameworks for many versions.
>

I think the CRAN R build installs in /Library, not in ~/Library.


> More specifically it is placed in this subdirectory:
>
>  /Library/Frameworks/R.framework
>

These are not the same. I want it to be in the user's home directory, i.e.
~/Library, and not in the global /Library.

Gabor



> The Revolution R distribution for the Mac also uses this location (and
> basically copies the installation script that is part of the CRAN version.)
>
> --
> David.
>
> > Gabor
> >
> > On Tue, Feb 7, 2017 at 9:02 AM, 美彦 馬場  wrote:
> >
> >> Hi,
> >>
> >>> On Feb 7, 2017, at 17:46, Gábor Csárdi  wrote:
> >>>
> >>> Hi all,
> >>>
> >>> I realize that this is not the typical use case on macOS, but for my
> >> work,
> >>> it would be great to be able to install R into ~/Library/Frameworks.
> >>>
> >>> This would allow having different R versions for different users.
> >>>
> >>> I am not sure how difficult this would be to implement. I can see that
> >> some
> >>> paths in scripts and makefiles are hardwired to /Library/Frameworks. Is
> >>> there anything more, perhaps in the binaries as well?
> >>
> >>
> >> I install R with Fink, which allows you to install R-3.3, R-3.2 and
> >> R-3.1.  Each of them looks for files in /sw/Library/Frameworks/R.
> framework/Versions/3.3,
> >> 3.2 and 3.1 respectively.  Also, CRAN packages for different R versions
> are
> >> installed separately.
> >>
> >> --
> >> BABA
> >>
> >>
> >
> >   [[alternative HTML version deleted]]
> >
> > ___
> > R-SIG-Mac mailing list
> > R-SIG-Mac@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
> David Winsemius
> Alameda, CA, USA
>
>

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] Feature request: install R in ~/Library/Frameworks

2017-02-07 Thread 美彦 馬場
Hi,

> On Feb 7, 2017, at 17:46, Gábor Csárdi  wrote:
> 
> Hi all,
> 
> I realize that this is not the typical use case on macOS, but for my work,
> it would be great to be able to install R into ~/Library/Frameworks.
> 
> This would allow having different R versions for different users.
> 
> I am not sure how difficult this would be to implement. I can see that some
> paths in scripts and makefiles are hardwired to /Library/Frameworks. Is
> there anything more, perhaps in the binaries as well?


I install R with Fink, which allows you to install R-3.3, R-3.2 and R-3.1.  
Each of them looks for files in 
/sw/Library/Frameworks/R.framework/Versions/3.3, 3.2 and 3.1 respectively.  
Also, CRAN packages for different R versions are installed separately.

--
BABA

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

[R-SIG-Mac] Feature request: install R in ~/Library/Frameworks

2017-02-07 Thread Gábor Csárdi
Hi all,

I realize that this is not the typical use case on macOS, but for my work,
it would be great to be able to install R into ~/Library/Frameworks.

This would allow having different R versions for different users.

I am not sure how difficult this would be to implement. I can see that some
paths in scripts and makefiles are hardwired to /Library/Frameworks. Is
there anything more, perhaps in the binaries as well?

Best,
Gabor

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac