[R] Installing R on Red Hat Linux, Tcl/Tk

Marc Schwartz MSchwartz at medanalytics.com
Fri Sep 5 15:35:48 CEST 2003


On Fri, 2003-09-05 at 07:13, James Wettenhall wrote:
> Hi,
> 
> I've been trying to install R on Red Hat Linux 9 for some
> potential users of my R/TclTk application.  I tried using the 
> rpm for R 1.7.1 for Red Hat Linux 9.  It told me that I needed:
> libtcl8.3.so
> so I looked for a binary release of Tcl 8.3.x on 
> http://www.tcl.tk/software/tcltk/8.3.html
> but found that the link to the Tcl 8.3.x binaries pointed to 
> ActiveTcl 8.4.x . I couldn't see the old 8.3.x binaries 
> anywhere.  ActiveTcl is a nice easy way to get the extensions 
> like Tktable, but it seemed to be the wrong version.
> 
> I tried building tcl and tk 8.3 from source.  tcl was built 
> succesfully and installed in /usr/local/lib/tcl8.3 but I wasn't 
> able to build tk: errors like "foo has been defined previously"
> 
> Then I tried installing tcl and tk from the Red Hat CD
> (using rpms).  Then when I installed R 1.7.1 from the rpm it 
> seemed to work, except that:
> > library(tcltk)
> couldn't find a usable tk.tcl and it seemed to be 
> looking in /usr/local/lib/tk8.3 whereas the rpms from the Red 
> Hat CD were installed elsewhere (/usr/share/ I think) and 
> rpm -i --prefix
> didn't work.  (tk was "not relocatable".)
> 
> Things started to work better after I copied /usr/share/tk8.3 to 
> /usr/local/lib/tk8.3/ (but I initially forgot to do the same 
> with tcl so was probably using the version I built from source).
> 
> So now library(tcltk) seems to be working, but I'm getting 
> segmentation faults if I try to use Tktable, after doing 
> addTclPath("/usr/local/ActiveTcl/lib"). (Installing ActiveTcl 
> seemed easier than building Tcl/Tk extensions from source.)
> 
> So maybe I need to build Tktable --with tcl8.3 and tk8.3.
> 
> I expect to be able to sort this out pretty soon, but I'm just 
> wondering whether the R/Linux gurus out there have any general 
> advice about whether it is better to use rpms or install from 
> source and whether anyone has an rpm for R 1.7.x configured to 
> work with libtcl8.4.so (available from ActiveTcl).   
> 
> Regards,
> James


Martyn remedied an older problem with R 1.7.0 where there were some
issues with tcl/tk support and that "should not" be a problem with the 
1.7.1 RPM. He has posted the config log at:

http://cran.r-project.org/bin/linux/redhat/9/i386/configure.log

The log indicates that tcl/tk support is present in the RPMs he has
posted. Just for the sake of it, you might want to verify the MD5 hash
for the downloaded RPM to be sure that you a working with an intact
RPM.  Martyn has the values posted at:

http://cran.r-project.org/bin/linux/redhat/9/i386/md5sums

You may also be at risk for some version incompatibility related issues
given the multiple installs (RPM and source) and the copying of
particular files to non-default locations. A "mix and match"
installation could contribute to a host of problems. In addition it may
be possible that the RPM database for tcl/tk may now be compromised,
which could cause you update problems in the future, if for example, you
use RHN to secure updates from Red Hat. That may or may not be a
relevant issue for you.

Yet another problem is that if you installed any RPMS for tcl/tk that
were not specifically compiled for RH 9, you may have some problems due
to some idiosyncrasies that have been seen with the version of gcc that
comes with RH 9. 

My initial reaction would be to remove the versions (plural) of tcl/tk
that you have installed and then remove R. I would also be sure to
delete any individual files that you may have copied/moved and be sure
to remove any modifications that you may have made to any environment
variables.

Hopefully this should leave you with a clean system as far as tcl/tk is
concerned.

I would then install the RH version of tcl/tk for RH 9 which is 8.3,
verify the R 1.7.1 RPM and reinstall it. Be sure to install R after
installing tcl/tk.

An alternative, if you have a specific requirement for the 8.4 version
of tcl/tk, is to not install the RH 8.3 version at all but install the
8.4 version (either RPMS specifically for RH 9 or compile from source)
and then compile R from source (either the source tree or the source
RPM).

Others may have additional thoughts, but to go back and start with a
clean system would seem to be a reasonable requirement.

Marc Schwartz




More information about the R-help mailing list