[R-SIG-Mac] Error loading tcltk library

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 6 16:31:47 CET 2009


On Tue, 6 Jan 2009, Ivan Alves wrote:

> Dear Simon,
>
> Please excuse my confusion, but I am pretty certain that Tcl/Tk is
> installed in Leopard by default (I certainly do not recall installing
> Tcl/Tk myself).  In fact, when I run ./configure in the source

Aqua Tcl/Tk, not X11 Tcl/Tk.

> directory of R 2.8.1 branch the relevant lines of the output confirm
> this:
>
> checking for tclConfig.sh... no
> checking for tclConfig.sh in library (sub)directories... /usr/lib/
> tclConfig.sh
> checking for tkConfig.sh... no
> checking for tkConfig.sh in library (sub)directories... /usr/lib/
> tkConfig.sh
> checking tcl.h usability... yes
> checking tcl.h presence... yes
> checking for tcl.h... yes
> checking tk.h usability... yes
> checking tk.h presence... yes
> checking for tk.h... yes
> checking whether compiling/linking Tcl/Tk code works... yes
>
> and then again confirmed at the end:
>
> R is now configured for i386-apple-darwin9.6.0
>
>   Source directory:          .
>   Installation directory:    /Library/Frameworks
>
>   C compiler:                gcc-4.2 -std=gnu99  -g -O2
>   Fortran 77 compiler:       gfortran  -g -O2
>
>   C++ compiler:              g++  -g -O2
>   Fortran 90/95 compiler:    gfortran -g -O2
>   Obj-C compiler:	     gcc -g -O2
>
>   Interfaces supported:      X11, aqua, tcltk
>   External libraries:        readline
>   Additional capabilities:   PNG, JPEG, iconv, MBCS, NLS, cairo
>   Options enabled:           framework, shared BLAS, R profiling, Java
>
>   Recommended packages:      yes
>
> I can therefore only conclude that the 2.8.1 binaries for the package
> tcltk that I got by
> Leopard builds can be installed as follows - paste in Terminal (for R
> 2.8.x):
>
> curl -s http://r.research.att.com/R-2.8-branch-leopard-
> universal.tar.gz | sudo tar fvxz - -C /
>
> were compiled against Tcl/Tk library for X11. Why not compiling them
> against the Tcl/Tk framework already available in Leopard?

Because it does not play well with R.app.  Also, it is only version 8.4.7 
on my Mac (10.5.6) which is quite old and rather buggy, and Simon's build 
is 8.5.5 (I think).  8.4.x and 8.5.x are incompatible at binary level.

If you only use command-line R, the ActiveTcl version of Tcl/Tk version 
8.5.x works pretty well.



> Best regards,
>
> Ivan
>
> On 6 Jan 2009, at 15:47, Simon Urbanek wrote:
>
>>
>> On Jan 6, 2009, at 9:24 , Ivan Alves wrote:
>>
>>> Dear all,
>>>
>>> The latest leopard snapshot of R 2.8.1 seems to have a problem
>>> loading the tcltk package, and found no related entries in
>>> gmane.gmane.comp.lang.r.mac.  It appears to be a broken link. Any
>>> suggestions on how to fix it? Many thanks in advance.
>>>
>>
>> As the messages says you are apparently missing Tcl/Tk. If you had
>> installed CRAN R, it would be installed automatically. Since you
>> didn't, you have to install it separately from
>> http://cran.r-project.org/bin/macosx/tools/
>>
>> Cheers,
>> Simon
>>
>>
>>
>>> Best regards,
>>> Ivan
>>>
>>> Output:
>>>
>>>> sessionInfo()
>>> R version 2.8.1 Patched (2009-01-05 r47481)
>>> i386-apple-darwin9.6.0
>>>
>>> locale:
>>> en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>> library(tcltk)
>>> Loading Tcl/Tk interface ... Error in dyn.load(file, DLLpath =
>>> DLLpath, ...) :
>>> unable to load shared library '/Library/Frameworks/R.framework/
>>> Resources/library/tcltk/libs/i386/tcltk.so':
>>> dlopen(/Library/Frameworks/R.framework/Resources/library/tcltk/libs/
>>> i386/tcltk.so, 10): Library not loaded: /usr/local/lib/
>>> libtcl8.5.dylib
>>> Referenced from: /Library/Frameworks/R.framework/Resources/library/
>>> tcltk/libs/i386/tcltk.so
>>> Reason: image not found
>>> Error : .onLoad failed in 'loadNamespace' for 'tcltk'
>>> Error: package/namespace load failed for 'tcltk'
>>>
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>
>>>
>>
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
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



More information about the R-SIG-Mac mailing list