i8kmon gives me can't find package Tk while executing "package require Tk" This is from i8k-Readme: NOTE: it has been reported that on some Linux distributions i8kmon exits with an error like this: can't find package Tk while executing "package require Tk" This is not a bug in i8kmon. It means that Tcl/Tk files are not installed correctly on your system and the Tk library can't be dynamically loaded from Tcl. In this case you can run i8kmon with the command: wish /usr/bin/i8kmon -- [options...] You should also report the bug to the maintainer of the Tcl/Tk packages included in your Linux distribution. A quick fix for the problem could also be adding the following line to /usr/lib/tk8.3/pkgIndex.tcl: package ifneeded Tk 8.3 [list load "/usr/lib/libtk8.3.so.1" Tk] This works on Debian and maybe on other Linux distributions. Reproducible: Always Steps to Reproduce: 1.load kernel module 2.emerge i8kutils 3.call "i8kmon" without "-d" Actual Results: can't find package Tk while executing "package require Tk" Expected Results: run i8kmon in gui-mode
Works for me. I'm the TCL / TK maintainer. Which version of TCL and TK do you have? Can you provide me with an emerge info? Which version of i8kutils is this?
Well Ulf, when you get a chance please answer the requested questions and re-open this bug. Because I can't duplicate this problem using your instructions with the two current versions of i8kutils in Portage.
As requested here are my tcl tk version: tcl-7.3.4 tk-8.3.4-r1 I tested again by reemergin i8utils 1.17 and 1.25 and also recompiled tcl and tk. Still the same message: --------------------------------- can't find package Tk 8.3 while executing "package require Tk $tcl_version" (procedure "make_ui" line 16) invoked from within "make_ui" (procedure "main" line 4) invoked from within "main" invoked from within "if {$tcl_interactive == 0} { main vwait forever }" (file "/usr/bin/i8kmon" line 734) --------------------------------- Here is the result of emerge info: (additional comments below) --------------------------------- Gentoo Base System version 1.4.16 Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7-gentoo-r8) ================================================================= System uname: 2.6.7-gentoo-r8 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=pentium4 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/X11 /etc/cron.daily /etc/foomatic /etc/gconf /etc/rsync /etc/sound /etc/sound/events /etc/ssh /etc/ssl /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -mcpu=pentium4 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://gentoo.inode.at/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d aalib alsa apm arts avi berkdb bonobo cdr crypt cups dga directfb divx4linux dvd emacs encode fbcon foomaticdb gdbm ggi gif gnome gpm gtk gtk2 gtkhtml imlib java jpeg libg++ libwww mad mikmod mmx motif mozilla mpeg ncurses nls oggvorbis opengl pam pcmcia pdflib perl png pnp ppds python quicktime readline sdl slang spell sse ssl svga tcltk tcpd tetex truetype x86 xml2 xmms xv zlib" --------------------------------- The laptop is running gentoo for about one year, running regular "emerge -uDv world". As written in the original error report maybe the /usr/lib/tk8.3/pkgIndex.tcl does not get properly updated.
I think maybe it's caused by "package require Tk $tcl_version". Ulf's tcl's version is 7.3, but Tk's version is 8.3, so i8kmon will complain that "can't find package Tk". Changing this line to "package require Tk" may fix this problem.
Sorry, that TCL version has been a typo. It should read tcl-8.3.4 // 8 instead of 7 tk-8.3.4-r1 sorry!
Ulf, could you write a test script with only a single line -- "package require Tk $tcl_version" (without quote), and run the script with tclsh and wish separately, then paste the console's output here?
these are the script outputs: tclsh tcl-test.sh can't find package Tk 8.3 while executing "package require Tk $tcl_version " (file "tcl-test.sh" line 1) ----------------------------------------------------- wish tcl-test.sh no output but a window opened (like it should) Bye
After downgrading Tk from 8.4.6 to 8.3.4-r1, I got the same error. I found pkgIndex.tcl was totally missing in /usr/lib/tk8.3. After creating pkgIndex.tcl in /usr/lib/tk8.3 manually, the bug can be fixed.
According to Tk's CVS changelog, this bug has been fixed in 8.4(Makefile.in, http://cvs.sourceforge.net/viewcvs.py/tktoolkit/tk/unix/Makefile.in?rev=1.95&view=log). I cut the changes from CVS and post a patch here, hoping it will work. Changed in ebuild: --- tk-8.3.4-r1.ebuild.old 2004-06-25 07:06:21.000000000 +0800 +++ tk-8.3.4-r1.ebuild 2004-08-12 18:00:15.322823296 +0800 @@ -40,6 +40,8 @@ unpack ${A} cd ${S}/library epatch ${FILESDIR}/remove-control-v.diff + cd ${S}/unix + epatch ${FILESDIR}/pkgIndex-${PV}.diff }
Created attachment 37272 [details, diff] pkgIndex-8.3.4.diff
Ulf, could you help test my patch?
Great work Ming. Ulf, if you can give that patch a test and then we'll be able to merge that into the tree.
Sorry it took so long - first mail accidentally got marked as read. The diff works for TK 8.3 But I guess since 8.4 is now marked stable it doesn't really matter :(
But the bug can be closed, :)
Done, sorry didn't know I had to do that. Thought you would after it's merged. Bye