[R] tcltk loading in R-2.2.1 from src

2006-03-09 Thread Patrice Seyed
Hi,

Having trouble loading tcltk in R 2.2.1 built from source.

./configure, make, make check, and make install run ok.


  library(tcltk)
Error in firstlib(which.lib.loc, package) :
Tcl/Tk support is not available on this system
Error in library(tcltk) : .First.lib failed for 'tcltk'

even though it is listed in library() output.

I have the same problem even if i compile with options:
./configure --with-tcltk --with-tcl-config=/usr/lib/tclConfig.sh 
--with-tk-config=/usr/lib/tkConfig.sh

Is there a dep for R 2.2.1 on a specific version of tcl? Any hints on 
this issue appreciated.

running on linux (2.4.21-4) version:
rpm -qa | grep tcl
tcl-devel-8.3.5-92
tcl-8.3.5-92

Specifically, the package pbatR loads this library during installation.

Thanks,
Patrice

-- 
Patrice Seyed
Linux System Administrator - LinGA
RHCE, SCSA
Boston University Medical Campus

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] tcltk loading in R-2.2.1 from src

2006-03-09 Thread Erik Iverson
Patrice -

I had a very similar problem using TCL/TK 8.3.
Below is the email I sent to my computing group at work about how I 
fixed it.  Note that since my TCL/TK header (.h) files were in an odd 
location, the first step probably isn't relevant for you.  But I bet the 
second step is.

--
I believe I have found the solution to this problem.  There were 2 steps 
I took to get a build of R in my home directory that properly uses 
Tcl/Tk 8.3 under Linux.

The first was setting an environment variable to let R know where the 
tcl.h and tk.h files reside.  This environment variable was 
TCLTK_CPPFLAGS and is set to -I/s/include .  This can bet set in the 
config.site in R's build directory also.

(NOTE to R-help: The above is site specific to my location, /s is for 
software on the network.)

Second, there is some problem with the way R interacts with the 
tkConfig.sh file in /s/lib (or wherever your .sh file is located).  It 
comes from the following line in tkConfig.sh.


TK_XINCLUDES='# no special path needed'

The # character, indicating a comment, is somehow misinterpreted by 
the configure script which breaks the Tcl/Tk functionality.  I was able 
to get around this by simply removing the comment and leaving it as
TK_XINCLUDES=''

That got me a working version of the newest R using Tcl/Tk.  I'm not 
sure if Tcl/Tk version 8.4 would still put that comment in there, I 
believe it's changed though, so you'd only have to follow the first step 
to get R compiled with Tcl/Tk support.

I found reference to this problem on the R mailing list, it appears to 
only affect certain installations of Tcl/Tk.

-
HTH,
Erik Iverson

Patrice Seyed wrote:
 Hi,
 
 Having trouble loading tcltk in R 2.2.1 built from source.
 
 ./configure, make, make check, and make install run ok.
 
 
   library(tcltk)
 Error in firstlib(which.lib.loc, package) :
 Tcl/Tk support is not available on this system
 Error in library(tcltk) : .First.lib failed for 'tcltk'
 
 even though it is listed in library() output.
 
 I have the same problem even if i compile with options:
 ./configure --with-tcltk --with-tcl-config=/usr/lib/tclConfig.sh 
 --with-tk-config=/usr/lib/tkConfig.sh
 
 Is there a dep for R 2.2.1 on a specific version of tcl? Any hints on 
 this issue appreciated.
 
 running on linux (2.4.21-4) version:
 rpm -qa | grep tcl
 tcl-devel-8.3.5-92
 tcl-8.3.5-92
 
 Specifically, the package pbatR loads this library during installation.
 
 Thanks,
 Patrice


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] tcltk loading in R-2.2.1 from src

2006-03-09 Thread Peter Dalgaard
Patrice Seyed [EMAIL PROTECTED] writes:

 Hi,
 
 Having trouble loading tcltk in R 2.2.1 built from source.
 
 ./configure, make, make check, and make install run ok.
 
 
   library(tcltk)
 Error in firstlib(which.lib.loc, package) :
 Tcl/Tk support is not available on this system
 Error in library(tcltk) : .First.lib failed for 'tcltk'
 
 even though it is listed in library() output.

Well, the package is there, as a stub to tell you that it doesn't
work
 
 I have the same problem even if i compile with options:
 ./configure --with-tcltk --with-tcl-config=/usr/lib/tclConfig.sh 
 --with-tk-config=/usr/lib/tkConfig.sh

In both cases, do check the configure output for clues.
 
 Is there a dep for R 2.2.1 on a specific version of tcl? Any hints on 
 this issue appreciated.

Anything later than 8.1 or so should work. Some old versions had bugs
in tclConfig.sh/tkConfig.sh which didn't quite give out enough info to
tell configure where to find the include files and libraries. I'm not
quite sure when that was, but we're up to 8.4.9 now and tcl/tk has a
notoriously slow release cycle, so 8.3.5 sound quite ancient

 running on linux (2.4.21-4) version:

Of which distribution?

 rpm -qa | grep tcl
 tcl-devel-8.3.5-92
 tcl-8.3.5-92

and rpm -qa | grep tk says what? 


-- 
   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
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html