[R] Problem installing tcltk on Solaris

Don MacQueen macq at llnl.gov
Wed May 22 18:42:36 CEST 2002

I have built R 1.5.0, and tcl and tk 8.3.4 from sources on a Solaris 
2.7 machine. All _appear_ to build successfully. tcl and tk pass 
their test suites. They were configured to build shared libraries 
(though I also tried it with tk not shared).

When I try to use tcltk, I get this error message:

>  library(tcltk)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
         unable to load shared library 
   ld.so.1: /erd/statistic/apps/R/Rtk/build/bin/R.bin: fatal: 
relocation error: file 
/erd/statistic/apps/R/Rtk/build/library/tcltk/libs/tcltk.so: symbol 
Tk_SafeInit: referenced symbol not found

I would certainly appreciate some help getting tcltk support working.


Here are various details that may or may not be helpful.

----- from config.site -----

----- from config.log -----
(the command line used to configure)
$ ../source/configure --prefix=/erd/statistic/apps/R/Rtk 

configure:20940: checking for 
configure:20970: result: /erd/statistic/apps/R/tcltk/tcl8.3.4/unix/tclConfig.sh
configure:21014: checking for 
configure:21044: result: /erd/statistic/apps/R/tcltk/tk8.3.4/unix/tkConfig.sh

R is now configured for sparc-sun-solaris2.7

   Source directory:          ../source
   Installation directory:    /erd/statistic/apps/R/Rtk
   C compiler:                gcc  -g -O2
   C++ compiler:              g++  -g -O2
   FORTRAN compiler:          g77  -g -O2

   X11 support:               yes
   Gnome support:             no
   Tcl/Tk support:            yes
   Readline support:          yes

   R profiling support:       yes
   R as a shared library:     no

------- output from make ------
building package 'tcltk'
mkdir -p -- ../../../library/tcltk/R
mkdir -p -- ../../../library/tcltk/demo
mkdir -p -- ../../../library/tcltk/exec
mkdir -p -- ../../../library/tcltk/man
making tcltk.d from ../../../../../source/src/library/tcltk/src/tcltk.c
`Makedeps' is up to date.
gcc -I../../../../include -I/erd/statistic/apps/R/local/include 
-I/usr/openwin/include/X11  -I/usr/openwin/include 
-I/erd/statistic/apps/R/local/include   -fPIC  -g -O2 -c 
../../../../../source/src/library/tcltk/src/tcltk.c -o tcltk.o
gcc -G  -o tcltk.so tcltk.o  -L/erd/statistic/apps/R/local/lib -lm
mkdir -p -- ../../../../library/tcltk/libs

------- error message refers to SafeInit so look for it ------
lib[196]% nm 
/erd/statistic/apps/R/Rtk/build/library/tcltk/libs/tcltk.so | grep 
[103]   |         0|       0|NOTY |GLOB |0    |UNDEF  |Tk_SafeInit

lib[197]% nm /erd/statistic/apps/R/local/lib/libtk8.3.so | grep Safe
[3899]  |         0|       0|NOTY |GLOB |0    |UNDEF  |Tcl_IsSafe
[3718]  |    279788|      20|FUNC |GLOB |0    |8      |Tk_SafeInit

Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list