#9668: Fix hardcoding of paths in R binary
--------------------------------------------+-------------------------------
   Reporter:  kcrisman                      |          Owner:  leif             
                                                           
       Type:  defect                        |         Status:  new              
                                                           
   Priority:  major                         |      Milestone:  sage-4.7.2       
                                                           
  Component:  packages                      |       Keywords:  R spkg R.sh.in 
libR.pc pkg-config hard-coded package installation R_HOME_DIR
Work_issues:  Provide an R 2.10.1.p6 spkg.  |       Upstream:  N/A              
                                                           
   Reviewer:                                |         Author:                   
                                                           
     Merged:                                |   Dependencies:  #9906            
                                                           
--------------------------------------------+-------------------------------
Changes (by leif):

  * keywords:  => R spkg R.sh.in libR.pc pkg-config hard-coded package
               installation R_HOME_DIR
  * owner:  tbd => leif
  * dependencies:  => #9906
  * work_issues:  => Provide an R 2.10.1.p6 spkg.


Comment:

 Replying to [comment:8 leif]:
 > [Note to myself:] [[BR]]
 >
 > The problem is that removing any reference to `SAGE_ROOT` and
 `SAGE_LOCAL` disables the script being "automatically" relocated in the
 first place.
 >
 > I'll then have to guess `SAGE_ROOT` if none of Sage's variables are
 defined. We also have two copies of the R script, one in `local/bin/`, and
 one in `local/lib/R/bin/`.

 Guessing `SAGE_ROOT` there is simply bullshit. Simply add a sanity check,
 pointing to `sage --R`, `install_scripts()` and perhaps `sage --sh` in
 case `SAGE_LOCAL` isn't defined.

 Furthermore:

  * Address / check the following (copied from [comment:ticket:10967:14]):
 {{{
 The problem was with hard-coded paths, not the
 permissions.  Anyway, the fix was easy.  I opened all the files listed
 above by George:
 sage/local/lib/R/bin/R
 sage/local/lib/R/bin/libtool
 sage/local/lib/R/etc/Makeconf
 sage/local/lib/R/etc/ldpath
 sage/local/lib/R/etc/Renviron
 sage/local/bin/R
 and edited obvious lines containing hardcoded paths (using find-
 replace-all at once).
 }}}

  * Change `libR.pc` to use either `${pc_top_builddir}` or `$${SAGE_ROOT}`.
 (In the former case, perhaps also set `PC_TOP_BUILD_DIR` to `$SAGE_ROOT`,
 or prepend `$SAGE_ROOT:`, unless it is already contained.)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9668#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to