[BioC] problem: /usr/local/lib64/R/library/tcltk/libs/tcltk.so: undefined symbol: Tcl_DoOneEvent

Martin Morgan mtmorgan at fhcrc.org
Tue Jun 15 23:20:54 CEST 2010


On 06/15/2010 09:51 PM, Sonia Leach wrote:
> Hello,
> 
> I was wondering if anyone can help me with a problem trying to use
> library(tcltk) - I'm getting an error
> 
> "error: unable to load shared library
> '/usr/local/lib64/R/library/tcltk/libs/tcltk.so'
>  /usr/local/lib64/R/library/tcltk/libs/tcltk.so: undefined symbol:
> Tcl_DoOneEvent"
> 
> I installed R version 2.11.1 on a 64 bit version of CentOS
> 
> [sml at localhost ~]$ uname -a
> Linux localhost.localdomain 2.6.18-128.el5 #1 SMP Wed Jan 21 10:41:14
> EST 2009 x86_64 x86_64 x86_64 GNU/Linux
> 
> and after yum install tcltk-devel, I used the R configure flags to
> include tcltk (64 bit version):
> 
> ./configure --with-tcltk --with-tcl-config=/usr/lib64/tclConfig.sh
> --with-tcl-config=/usr/lib64/tkConfig.sh
> 
> And you can see that tcltk is TRUE within R using capabilities() below.
> 
> [sml at localhost ~]$ R
> 
> R version 2.11.1 (2010-05-31)
> Copyright (C) 2010 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
> 
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
> 
>> capabilities()
>    jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
>   FALSE    FALSE    FALSE     TRUE     TRUE    FALSE     TRUE     TRUE
>  libxml     fifo   cledit    iconv      NLS  profmem    cairo
>    TRUE     TRUE     TRUE     TRUE     TRUE    FALSE    FALSE
>> library(tcltk)
> Loading Tcl/Tk interface ... Error : .onLoad failed in loadNamespace()
> for 'tcltk', details:
>  call: dyn.load(file, DLLpath = DLLpath, ...)
>  error: unable to load shared library
> '/usr/local/lib64/R/library/tcltk/libs/tcltk.so':
>  /usr/local/lib64/R/library/tcltk/libs/tcltk.so: undefined symbol:
> Tcl_DoOneEvent
> Error: package/namespace load failed for 'tcltk'

Hi Sonia -- this likely means that a library that tcltk.so requires is
not being found, and not that there is something wrong with the tcltk.so
library per se. You can

  R CMD ldd /usr/local/lib64/R/library/tcltk/libs/tcltk.so

and look for a link to libtcl, which for me is

	libtcl8.5.so => /usr/lib64/libtcl8.5.so (0x00007f6edb5ae000)

This tells me that the OS and R knows where to find libtcl. If this
fails you likely need (as root) to use ldconfig to update where your
system looks for libraries. (I am not a cent OS user, so I'd proceed
with caution in following instructions from me here...); as a workaround
you can set the environment variable
LD_LIBRARY_PATH=/path/to/libtclX.X.so (where X.X is the appropriate
version number for your libtcl).

After this step, I

  objdump -T /usr/lib64/libtcl8.5.so | grep Tcl_DoOneEvent

and get

00000000000b1670 g    DF .text	00000000000001d8  Base        Tcl_DoOneEvent

Which tells me that the symbol I'm looking for is actually exported from
libtcl8.5.so; if this isn't the case for you then I'd guess it was a
version incompatibility between tcl and R.

The right place for this question is probably the R-devel mailing list.

Martin


>>
>>
> 
> 
> To be certain, I checked whether the tcltk.so library existed and where it was
> 
> [root at localhost /]# find . -name tcltk.so -print
> ./usr/local/lib64/R/library/tcltk/libs/tcltk.so
> ./home/sml/Installed/R-2.11.1/src/library/tcltk/src/tcltk.so
> ./home/sml/Installed/R-2.11.1/library/tcltk/libs/tcltk.so
> [root at localhost /]#
> 
> Any advice would be appreciated.
> 
> Sonia
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list