From tobias.verbeke at openanalytics.eu  Sun Sep 22 00:21:19 2013
From: tobias.verbeke at openanalytics.eu (Tobias Verbeke)
Date: Sun, 22 Sep 2013 00:21:19 +0200 (CEST)
Subject: [Rd] regenerate Rscript after moving R installation
In-Reply-To: <21054.2473.846704.526560@max.nulle.part>
References: <847693355.1777.1379787265680.JavaMail.zimbra@openanalytics.eu>
	<145722967.1797.1379789012433.JavaMail.zimbra@openanalytics.eu>
	<21053.60604.509740.183222@max.nulle.part>
	<1021845929.1859.1379792352728.JavaMail.zimbra@openanalytics.eu>
	<21054.2473.846704.526560@max.nulle.part>
Message-ID: <1799718350.1916.1379802079979.JavaMail.zimbra@openanalytics.eu>

Hi Dirk, 

----- Original Message -----
> From: "Dirk Eddelbuettel" <edd at debian.org>
> To: "Tobias Verbeke" <tobias.verbeke at openanalytics.eu>
> Cc: "Dirk Eddelbuettel" <edd at debian.org>, r-devel at r-project.org
> Sent: Saturday, September 21, 2013 11:03:37 PM
> Subject: Re: [Rd] regenerate Rscript after moving R installation
> 
> 
> Tobias,
> 
> On 21 September 2013 at 21:39, Tobias Verbeke wrote:
> | The package that made me discover this was RcppEigen which has indeed
> 
> Never heard of it :)
>  
> | PKG_LIBS=`$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS)
> | $(BLAS_LIBS) $(FLIBS)
> |  
> | > where a key part is the `$(R_HOME)/bin` which permits you to
> | > transparently
> | > switch between R-release, R-devel, R-beforeMove, R-afterMove, R-whatevr,
> | > ...
> | > simply by adjusting your shell's $PATH variable, or the R wrapper you for
> | > R
> | > CMD, or ...
> | > 
> | > It. Just. Works.
> | 
> | It is neat and certainly works, unless R is built on another location (on a
> | build machine)
> | prior to being put on its final location.
> | 
> | If I read the strace output below correctly, the origin of the problem is
> | the hardcoded
> | location of the R binary.
> [...]
> | There is no way to build again since R itself is shipped (in a
> | Debian/Ubuntu package
> | and as part of Architect) prior to being installed and used on another
> | computer.
>                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> I do not know what 'Architekt' is -- but maybe you just mistakenly assume

Architect is a cross-platform Eclipse based R IDE with a.o. out-of-the-box Rcpp support ;-)

> that you can mv(1) installations at will?  And maybe you can't?  Consider the
> 
>         configure --prefix=/some/location/ ...
>         make
>         make install
> 
> where /some/location gets set at compile-time.
> 
> You seem to wish it didn't.  But wishing alone may not make it so. In all
> seriousness, these binaries may not be relocatable at will.

That is fair enough. I do not expect R-devel to be populated with Djinns,
but was puzzled (and probably lead down the wrong path) by the fact that 
Rscript was the only stubborn piece in our build procedures.

> | The buildstamp that is part of the final installation path of the
> | application is
> | generated after the R build (since R is only one component), so changing
> | the --prefix
> | on the build machine would not work (currently).
> | 
> | I hope this gives more background to the question and would be curious if
> | there are alternatives
> | to rapidly regenerate the Rscript executable only.
> | 
> | (My other alternative of messing with the path in a hex editor has not been
> | successful :-)
> 
> I'd go back to rebuilding for the target location.

Thank you! I will report back if I find out more.

Best,
Tobias

> 
> Dirk
> 
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>



[Rd] regenerate Rscript after moving R installation
Tobias Verbeke