From Kurt.Hornik at wu-wien.ac.at  Tue Oct 21 17:02:56 2003
From: Kurt.Hornik at wu-wien.ac.at (Kurt Hornik)
Date: Tue Oct 21 17:05:45 2003
Subject: [Rd] Problem R-1.8.0 library tcltk on Tcl-8.0.5 (PR#4699)
In-Reply-To: <x28ynfdr0c.fsf@biostat.ku.dk>
References: <200310210429.h9L4Tq0P021121@pubhealth.ku.dk>
	<x28ynfdr0c.fsf@biostat.ku.dk>
Message-ID: <16277.19104.764444.11251@mithrandir.hornik.net>

>>>>> Peter Dalgaard writes:

> nakama@ki.rim.or.jp writes:
>> Full_Name: Eiji Nakama
>> Version: R-1.8.0
>> OS: linux(VineLinux)
>> Submission from: (NULL) (219.117.236.13)
>> 
>> 
>> I build by Tcl8.0.5 and R-1.8.0.
>> 
>> > library(tcltk)
>> Error in dyn.load(x, as.logical(local), as.logical(now)) : 
>> unable to load shared library "/usr/lib/R/library/tcltk/libs/tcltk.so":
>> /usr/lib/R/library/tcltk/libs/tcltk.so: undefined symbol:
>> RTcl_ActivateConsoleError in runHook(".onLoad", env, package.lib, package) : 
>> .onLoad failed
>> Error in library(tcltk) : package/namespace load failed
>> 
>> R-1.8.0/src/library/tcltk/src/init.c
>> 32 #ifndef TCL80
>> 33     {"RTcl_ActivateConsole", (DL_FUNC) &RTcl_ActivateConsole, 0},
>> 34 #endif
>> 
>> TCL80 is not defined anywhere.
>> It is defined only as tcltk.c.

> Yes. The workaround should be obvious. Or upgrade tcl/tk -- 8.0.x is
> pretty ancient by now.

> The proper fix is probably to move

> #include <tcl.h>
> #include <tk.h>

> #if (TCL_MAJOR_VERSION==8 && TCL_MINOR_VERSION==0)
> #define TCL80
> #endif

> from tcltk.c into tcltk.h.

> (Argh. The test builds of 1.8.0 were actually against tcl8.0, but
> apparently our testing procedures skip any attempt to load the dynlib.
> Automated tests of tcl/tk are difficult because Tk will protest if
> there is no X display.)

On systems which have Xvfb, this is not a problem.

The daily package checker uses this, for example.

-k


[Rd] Problem R-1.8.0 library tcltk on Tcl-8.0.5 (PR#4699)
Kurt Hornik