RHOME

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

RHOME

Daniel A. Powers

R-help --

I built R-2.2.1 in my own directory on a sun (solaris). Now I would like
the sysadmin to move the contents to /usr/local/lib and place the binary
in /usr/local/bin. No problem.  However, the RHOME variable defaults to
the directory from which R was built so it is not usable by anyone but me
or ROOT. I would like to avoid building this again if possible. Any ideas?

Thanks,
Dan

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Daniel A. Powers, Ph.D.
Department of Sociology
University of Texas at Austin
1 University Station A1700
Austin, TX  78712-0118
phone: 512-232-6335
fax:   512-471-1748
[hidden email]

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: RHOME

Martyn Plummer-2
Quoting "Daniel A. Powers" <[hidden email]>:

>
> R-help --
>
> I built R-2.2.1 in my own directory on a sun (solaris). Now I would like
> the sysadmin to move the contents to /usr/local/lib and place the binary
> in /usr/local/bin. No problem.  However, the RHOME variable defaults to
> the directory from which R was built so it is not usable by anyone but me
> or ROOT. I would like to avoid building this again if possible. Any ideas?
>
> Thanks,
> Dan

R is designed to run from its build directory.  But if your sysadmin installs it
with "make install" (as root), then the shell wrapper that is installed in
/usr/local/bin/R will have R_HOME pointing to the right location
(/usr/local/lib/R).  Literally moving the build directory to another location
is the wrong thing to do.
-----------------------------------------------------------------------
This message and its attachments are strictly confidential. ...{{dropped}}

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: RHOME

Daniel A. Powers
Thanks --
I was trying not to burden the sysadmin with this task, but it seems that
it should be done right.
Cheers,
Dan

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Daniel A. Powers, Ph.D.
Department of Sociology
University of Texas at Austin
1 University Station A1700
Austin, TX  78712-0118
phone: 512-232-6335
fax:   512-471-1748
[hidden email]


On Thu, 2 Feb 2006 [hidden email] wrote:

> Quoting "Daniel A. Powers" <[hidden email]>:
>
> >
> > R-help --
> >
> > I built R-2.2.1 in my own directory on a sun (solaris). Now I would like
> > the sysadmin to move the contents to /usr/local/lib and place the binary
> > in /usr/local/bin. No problem.  However, the RHOME variable defaults to
> > the directory from which R was built so it is not usable by anyone but me
> > or ROOT. I would like to avoid building this again if possible. Any ideas?
> >
> > Thanks,
> > Dan
>
> R is designed to run from its build directory.  But if your sysadmin installs it
> with "make install" (as root), then the shell wrapper that is installed in
> /usr/local/bin/R will have R_HOME pointing to the right location
> (/usr/local/lib/R).  Literally moving the build directory to another location
> is the wrong thing to do.
> -----------------------------------------------------------------------
> This message and its attachments are strictly confidential...{{dropped}}

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: RHOME

Martin Maechler
In reply to this post by Martyn Plummer-2
>>>>> "Martyn" == Martyn Plummer <[hidden email]>
>>>>>     on Thu, 02 Feb 2006 22:34:23 +0100 writes:

    Martyn> Quoting "Daniel A. Powers"
    Martyn> <[hidden email]>:
    >>  R-help --
    >>
    >> I built R-2.2.1 in my own directory on a sun
    >> (solaris). Now I would like the sysadmin to move the
    >> contents to /usr/local/lib and place the binary in
    >> /usr/local/bin. No problem.  However, the RHOME variable
    >> defaults to the directory from which R was built so it is
    >> not usable by anyone but me or ROOT. I would like to
    >> avoid building this again if possible. Any ideas?
    >>
    >> Thanks, Dan

    Martyn> R is designed to run from its build directory.  But
    Martyn> if your sysadmin installs it with "make install" (as
    Martyn> root), then the shell wrapper that is installed in
    Martyn> /usr/local/bin/R will have R_HOME pointing to the
    Martyn> right location (/usr/local/lib/R).  Literally moving
    Martyn> the build directory to another location is the wrong
    Martyn> thing to do.

well, but very easily fixable, and that's what Daniel is asking
for:

The default value of R_HOME is only set in exactly one place,
namely the 'R' shell script; editing that script - once after
the move - is really a piece o'cake.

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: RHOME

Peter Dalgaard
Martin Maechler <[hidden email]> writes:

>     Martyn> R is designed to run from its build directory.  But
>     Martyn> if your sysadmin installs it with "make install" (as
>     Martyn> root), then the shell wrapper that is installed in
>     Martyn> /usr/local/bin/R will have R_HOME pointing to the
>     Martyn> right location (/usr/local/lib/R).  Literally moving
>     Martyn> the build directory to another location is the wrong
>     Martyn> thing to do.
>
> well, but very easily fixable, and that's what Daniel is asking
> for:
>
> The default value of R_HOME is only set in exactly one place,
> namely the 'R' shell script; editing that script - once after
> the move - is really a piece o'cake.

Hmm, I was about to say the same, but there seems to be unexpected
references in other places.

find `R RHOME` | xargs grep `R RHOME`
/usr/lib64/R/bin/R:R_HOME_DIR=/usr/lib64/R
/usr/lib64/R/bin/R:R_SHARE_DIR=/usr/lib64/R/share
/usr/lib64/R/bin/R:R_INCLUDE_DIR=/usr/lib64/R/include
/usr/lib64/R/bin/R:R_DOC_DIR=/usr/lib64/R/doc

(this doesn't normally happen - a SUSE RPM specialty, or due to
configure flag settings?)


Once you start building packages, you also have things like

viggo:~/>find ~/Rlibrary | xargs grep `R RHOME`
Binary file /home/bs/pd/Rlibrary/rgl/libs/rgl.so matches


viggo:~/>find ~/Rlibrary | xargs grep Rlibrary
Binary file /home/bs/pd/Rlibrary/rgl/Meta/hsearch.rds matches
Binary file /home/bs/pd/Rlibrary/ISwR/Meta/hsearch.rds matches
Binary file /home/bs/pd/Rlibrary/mvtnorm/Meta/hsearch.rds matches
Binary file /home/bs/pd/Rlibrary/nlmeODE/Meta/hsearch.rds matches
B.....

on my laptop I had a hit on one of the Sweave support files too.

Most likely these are quite harmless, but all in all I think Martyn
has the safest advice: Use "make install", as root (don't forget
"umask 022").

--
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - ([hidden email])                  FAX: (+45) 35327907

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: RHOME

Martyn Plummer-2
Far be it for me to tell people what they can and cannot do. Perhaps I
can rephrase myself in a less inflammatory way.  

R runs from the build directory as a convenience for developers, so you
don't have to reinstall R every time you change something. But for
users, the standard mechanism "make install" has a number of advantages
over moving the build directory to a publicly accessible location: it is
guaranteed to work, you don't have to do any post-hoc editing of files,
it takes up a lot less space, about 4.6 times less on my system

[martyn@seurat r-devel]$ du -sh R
356M    R
[martyn@seurat r-devel]$ du -sh /usr/local/lib64/R
77M     /usr/local/lib64/R

But if you do want to copy the build directory the, as Martin says,
you can edit the file bin/R so that the line that starts
R_HOME_DIR points to the correct location, e.g.
 
R_HOME_DIR="/usr/local/lib/R"

M.

On Fri, 2006-02-03 at 14:48 +0100, Peter Dalgaard wrote:

> Martin Maechler <[hidden email]> writes:
>
> >     Martyn> R is designed to run from its build directory.  But
> >     Martyn> if your sysadmin installs it with "make install" (as
> >     Martyn> root), then the shell wrapper that is installed in
> >     Martyn> /usr/local/bin/R will have R_HOME pointing to the
> >     Martyn> right location (/usr/local/lib/R).  Literally moving
> >     Martyn> the build directory to another location is the wrong
> >     Martyn> thing to do.
> >
> > well, but very easily fixable, and that's what Daniel is asking
> > for:
> >
> > The default value of R_HOME is only set in exactly one place,
> > namely the 'R' shell script; editing that script - once after
> > the move - is really a piece o'cake.
>
> Hmm, I was about to say the same, but there seems to be unexpected
> references in other places.
>
> find `R RHOME` | xargs grep `R RHOME`
> /usr/lib64/R/bin/R:R_HOME_DIR=/usr/lib64/R
> /usr/lib64/R/bin/R:R_SHARE_DIR=/usr/lib64/R/share
> /usr/lib64/R/bin/R:R_INCLUDE_DIR=/usr/lib64/R/include
> /usr/lib64/R/bin/R:R_DOC_DIR=/usr/lib64/R/doc
>
> (this doesn't normally happen - a SUSE RPM specialty, or due to
> configure flag settings?)

I think this is normal. But the RedHat RPM behaves differently.

(because the RPM build process installs into a temporary build root
which is distinct from the final installation directory, requiring more
sed voodoo).

>
> Once you start building packages, you also have things like
>
> viggo:~/>find ~/Rlibrary | xargs grep `R RHOME`
> Binary file /home/bs/pd/Rlibrary/rgl/libs/rgl.so matches
>
>
> viggo:~/>find ~/Rlibrary | xargs grep Rlibrary
> Binary file /home/bs/pd/Rlibrary/rgl/Meta/hsearch.rds matches
> Binary file /home/bs/pd/Rlibrary/ISwR/Meta/hsearch.rds matches
> Binary file /home/bs/pd/Rlibrary/mvtnorm/Meta/hsearch.rds matches
> Binary file /home/bs/pd/Rlibrary/nlmeODE/Meta/hsearch.rds matches
> B.....
>
> on my laptop I had a hit on one of the Sweave support files too.
>
> Most likely these are quite harmless, but all in all I think Martyn
> has the safest advice: Use "make install", as root (don't forget
> "umask 022").
>

-----------------------------------------------------------------------
This message and its attachments are strictly confidential. ...{{dropped}}

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: RHOME

Brian Ripley
In reply to this post by Peter Dalgaard
On Fri, 3 Feb 2006, Peter Dalgaard wrote:

> Martin Maechler <[hidden email]> writes:
>
>>     Martyn> R is designed to run from its build directory.  But
>>     Martyn> if your sysadmin installs it with "make install" (as
>>     Martyn> root), then the shell wrapper that is installed in
>>     Martyn> /usr/local/bin/R will have R_HOME pointing to the
>>     Martyn> right location (/usr/local/lib/R).  Literally moving
>>     Martyn> the build directory to another location is the wrong
>>     Martyn> thing to do.
>>
>> well, but very easily fixable, and that's what Daniel is asking
>> for:
>>
>> The default value of R_HOME is only set in exactly one place,
>> namely the 'R' shell script; editing that script - once after
>> the move - is really a piece o'cake.
>
> Hmm, I was about to say the same, but there seems to be unexpected
> references in other places.
>
> find `R RHOME` | xargs grep `R RHOME`
> /usr/lib64/R/bin/R:R_HOME_DIR=/usr/lib64/R
> /usr/lib64/R/bin/R:R_SHARE_DIR=/usr/lib64/R/share
> /usr/lib64/R/bin/R:R_INCLUDE_DIR=/usr/lib64/R/include
> /usr/lib64/R/bin/R:R_DOC_DIR=/usr/lib64/R/doc
>
> (this doesn't normally happen - a SUSE RPM specialty, or due to
> configure flag settings?)

That only happens in the installed copy.  Martin is right if one is
talking about moving the build tree (and Martyn is right that there is a
lot of stuff that does not need to be installed in the build tree and that
`make install' takes all the strain of copying the right bits).

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: RHOME

Daniel A. Powers
In reply to this post by Martyn Plummer-2
R-help

My thanks goes out to all who responded to this. I am tying to avoid
burdening the sysadmin with this project so I opted for the simple fix of
modifying the shell script. My aim here is to build the libraries in my
local directory and copy those as needed to /usr/local/lib/R/library. I will
have to direct the sysadmin in the installation of future versions of R.

Cheers,
Dan

%%%%%%%%%%%%%%%%%%%%%%%%
Daniel A. Powers, Ph.D.
Department of Sociology
University of Texas at Austin
1 University Station A1700
Austin, TX  78712-0118
phone: 512-232-6335
fax:   512-471-1748
[hidden email]


-----Original Message-----
From: Martyn Plummer [mailto:[hidden email]]
Sent: Friday, February 03, 2006 9:46 AM
To: Peter Dalgaard
Cc: Martin Maechler; Daniel A. Powers; [hidden email]
Subject: Re: [R] RHOME


Far be it for me to tell people what they can and cannot do. Perhaps I
can rephrase myself in a less inflammatory way.

R runs from the build directory as a convenience for developers, so you
don't have to reinstall R every time you change something. But for
users, the standard mechanism "make install" has a number of advantages
over moving the build directory to a publicly accessible location: it is
guaranteed to work, you don't have to do any post-hoc editing of files,
it takes up a lot less space, about 4.6 times less on my system

[martyn@seurat r-devel]$ du -sh R
356M    R
[martyn@seurat r-devel]$ du -sh /usr/local/lib64/R
77M     /usr/local/lib64/R

But if you do want to copy the build directory the, as Martin says,
you can edit the file bin/R so that the line that starts
R_HOME_DIR points to the correct location, e.g.

R_HOME_DIR="/usr/local/lib/R"

M.

On Fri, 2006-02-03 at 14:48 +0100, Peter Dalgaard wrote:

> Martin Maechler <[hidden email]> writes:
>
> >     Martyn> R is designed to run from its build directory.  But
> >     Martyn> if your sysadmin installs it with "make install" (as
> >     Martyn> root), then the shell wrapper that is installed in
> >     Martyn> /usr/local/bin/R will have R_HOME pointing to the
> >     Martyn> right location (/usr/local/lib/R).  Literally moving
> >     Martyn> the build directory to another location is the wrong
> >     Martyn> thing to do.
> >
> > well, but very easily fixable, and that's what Daniel is asking
> > for:
> >
> > The default value of R_HOME is only set in exactly one place,
> > namely the 'R' shell script; editing that script - once after
> > the move - is really a piece o'cake.
>
> Hmm, I was about to say the same, but there seems to be unexpected
> references in other places.
>
> find `R RHOME` | xargs grep `R RHOME`
> /usr/lib64/R/bin/R:R_HOME_DIR=/usr/lib64/R
> /usr/lib64/R/bin/R:R_SHARE_DIR=/usr/lib64/R/share
> /usr/lib64/R/bin/R:R_INCLUDE_DIR=/usr/lib64/R/include
> /usr/lib64/R/bin/R:R_DOC_DIR=/usr/lib64/R/doc
>
> (this doesn't normally happen - a SUSE RPM specialty, or due to
> configure flag settings?)

I think this is normal. But the RedHat RPM behaves differently.

(because the RPM build process installs into a temporary build root
which is distinct from the final installation directory, requiring more
sed voodoo).

>
> Once you start building packages, you also have things like
>
> viggo:~/>find ~/Rlibrary | xargs grep `R RHOME`
> Binary file /home/bs/pd/Rlibrary/rgl/libs/rgl.so matches
>
>
> viggo:~/>find ~/Rlibrary | xargs grep Rlibrary
> Binary file /home/bs/pd/Rlibrary/rgl/Meta/hsearch.rds matches
> Binary file /home/bs/pd/Rlibrary/ISwR/Meta/hsearch.rds matches
> Binary file /home/bs/pd/Rlibrary/mvtnorm/Meta/hsearch.rds matches
> Binary file /home/bs/pd/Rlibrary/nlmeODE/Meta/hsearch.rds matches
> B.....
>
> on my laptop I had a hit on one of the Sweave support files too.
>
> Most likely these are quite harmless, but all in all I think Martyn
> has the safest advice: Use "make install", as root (don't forget
> "umask 022").
>

-----------------------------------------------------------------------
This message and its attachments are strictly confidential. ...{{dropped}}

______________________________________________
[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