From: Larry W. V. <lv...@ca...> - 2003-08-27 17:54:11
|
From: Benjamin Riefenstahl <Ben...@ep...> >The places to go for Tcl these days are: > > The Newsgroup comp.lang.tcl > > http://wiki.tcl.tk, our knowledge base > > http://www.sf.net/projects/tcl and > http://www.sf.net/projects/tktoolkit where you get the source and > where you also can write bug reports and join more specific mailing > lists like this one. I'd suggest two other resources: http://www.tcl.tk/ where one can find a variety of software announcements and the newsgroup comp.lang.tcl.announce - again, where one can find announcements -- Tcl - The glue of a new generation. <URL: http://wiki.tcl.tk/ > Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |
From: James W. <wet...@we...> - 2003-08-28 05:58:18
|
Hi, Just thought I'd share my TCL/TK MacOS X installation experience so far... I want to use Tcl/Tk (including BWidget and Tktable) with R (a statistics language). The Aqua version of R is not expected to work reliably until R 1.8.0 (October?) but I am very keen to get R and Tcl/Tk working together before then, so I'm trying X11. My MacOS X administrator installed a Darwin/X11 compatible R (1.7.0 from http://gifi.stat.ucla.edu/pub/) and Tcl/Tk from fink (I think) : http://fink.sourceforge.net/pdb/search.php?s=tcl BWidget and Tktable both worked fine in wish, but Tktable didn't work in R. The error I got: unknown color name "systemWindowBody" apparently suggests a conflict between Aqua Tcl/Tk and X11 Tcl/Tk. Note that Tktable has a binary shared library, whereas BWidget does not. (BWidget widgets worked fine in R.) Another Mac administrator who tried installing R and Tcl/Tk for me on a different MacOS X computer installed : http://www.apple.com/downloads/macosx/unix_open_source/tcltkaqua.html with the same version of R (above) and I ended up with the same error. Does anyone have any good tips for "hiding" Aqua Tcl/Tk directories from the Tcl/Tk search path if I want to just use X11 Tcl/Tk? Also, does anyone have any good tips for building Tktable from source in MacOS X with X11? I couldn't find much information in the README file in the Tktable source from: http://sourceforge.net/projects/tktable Or should getting an X11 compatible Tktable binary be easy with fink? Regards, James |
From: Daniel A. S. <st...@ic...> - 2003-09-01 04:43:00
|
James, On Thursday, Aug 28, 2003, at 15:58 Australia/Sydney, James Wettenhall wrote: > BWidget and Tktable both worked fine in wish, but Tktable didn't > work in R. The error I got: > unknown color name "systemWindowBody" > apparently suggests a conflict between Aqua Tcl/Tk and X11 > Tcl/Tk. Note that Tktable has a binary shared library, whereas > BWidget does not. (BWidget widgets worked fine in R.) this has come up before, you need to build TkTable yourself for tk/X11, you seem to have a prebuilt tkTable for TkAqua, they are not compatible. > Another Mac administrator who tried installing R and Tcl/Tk for > me on a different MacOS X computer installed : > http://www.apple.com/downloads/macosx/unix_open_source/tcltkaqua.html > with the same version of R (above) > > and I ended up with the same error. I don't understand that, this should be the aqua version of Tk (I provide Apple with the download above... same as the one at tkaqua.sf.net) > Does anyone have any good tips for "hiding" Aqua Tcl/Tk > directories from the Tcl/Tk search path if I want to just use > X11 Tcl/Tk? this is for tcl/tk built with fink? If they build it properly, I think /sw/lib should be early in the $auto_path, any extensions there will be found before extensions later in the auto_path such as in /Library/Tcl can you provide us with the result of % puts $auto_path for your fink version of tcl ? Preventing extensions that depend on TkAqua from loading in TkX11 is something that is on my todo list for a future BI distribution, all Tk extensions that depend on [tk windowingsystem] should really check for the value they need in their pkgIndex.tcl before loading... but given that this is not been a problem until TkAqua and TkX11 became possible on the same platform, no current extensions deal with this issue. > Also, does anyone have any good tips for building Tktable from > source in MacOS X with X11? I couldn't find much information in > the README file in the Tktable source from: > http://sourceforge.net/projects/tktable TkTable is a fully TEA2ified extension and thus building should be as easy as ./configure --prefix=/sw \ --with-tcl=/sw/lib \ --with-tk=/sw/lib make; sudo make install (or whatever locations are appropriate for the fink tcl/tk install, look for tclConfig.sh resp tkConfig.sh) Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |
From: James W. <wet...@we...> - 2003-09-01 07:49:47
|
Daniel, Thanks very much for your reply! > this has come up before, you need to build TkTable yourself for tk/X11, > you seem to have a prebuilt tkTable for TkAqua, they are not compatible. Yes. I've concluded that I have only one tkTable installed - an Aqua one, so I need to build tkTable myself for X11. Here is the R equivalent of puts $auto_path, showing Tcl/Tk directories installed by fink : > library(tcltk) > tclvalue("auto_path") [1] "/sw/lib/tcl8.4 /sw/lib ./lib /sw/lib/tk8.4 /usr/local/lib/R/library/tcltk/exec" (R comes with a minimal X11-compatible Tcl/Tk, not including the extensions like Tktable.) Thanks for your advice regarding running the configure script in the Tktable packge. configure appeared to work with the options you specified, after adding --with-tclinclude and --with-tkinclude specifying where I'd downloaded the tcl/tk source. But it looks like I need the source for X11 (make complained that it couldn't find Xlib.h) and I didn't seem to have it - at least not in any obvious place. So I downloaded the X11 source from http://developer.apple.com/darwin/projects/X11/ and (as a quick hack), made an X11 subdirectory in the Tktable directory. (I don't have a root password, so my choices were limited.) Then make found Xlib.h, and seemed to build all of the object files successfully, but couldn't link in the X11 library or the Tcl and Tk stub libraries: cc -dynamiclib -o libTktable2.8dylib tkTable.o tkTableWin.o tkTableTag.o tkTableEdit.o tkTableCell.o tkTableCellSort.o tkTableCmds.o tkTableUtil.o -lX11 -L/sw/lib -ltclstub8.4 -L/sw/lib -ltkstub8.4 /usr/bin/libtool: can't locate file for: -lX11 /usr/bin/libtool: file: -lX11 is not an object file (not allowed in a library) /usr/bin/libtool: can't locate file for: -ltclstub8.4 /usr/bin/libtool: file: -ltclstub8.4 is not an object file (not allowed in a library) /usr/bin/libtool: can't locate file for: -ltkstub8.4 /usr/bin/libtool: file: -ltkstub8.4 is not an object file (not allowed in a library) make: *** [libTktable2.8.dylib] Error 1 So it seems that I have to build X11 (and Tcl/Tk) from source (which I'm currently doing, but it's taking ages.) Does it sound like I'm on the right track, now? I'm trying to get my R/TclTk application working in a room full of MacOS X machines for a training course next week, but utimately my aim is to make the application easy for users to install themselves. I guess Aqua will eventually be easier than X11 when RAqua works smoothly with TkAqua. Regards, James -------------------------------------------------------------------------- James Wettenhall Tel: (+61 3) 9345 2629 Division of Genetics and Bioinformatics Fax: (+61 3) 9347 0852 The Walter & Eliza Hall Institute E-mail: wet...@we... of Medical Research, Mobile: (+61 / 0 ) 438 527 921 1G Royal Parade, Parkville, Vic 3050, Australia http://www.wehi.edu.au -------------------------------------------------------------------------- |
From: Daniel A. S. <st...@ic...> - 2003-09-01 08:05:36
|
James, On Monday, Sep 1, 2003, at 17:49 Australia/Sydney, James Wettenhall wrote: > Here is the R equivalent of puts $auto_path, showing Tcl/Tk > directories installed by fink : >> library(tcltk) >> tclvalue("auto_path") > [1] "/sw/lib/tcl8.4 /sw/lib ./lib /sw/lib/tk8.4 > /usr/local/lib/R/library/tcltk/exec" > > (R comes with a minimal X11-compatible Tcl/Tk, not including the > extensions like Tktable.) ok, in that case I have trouble understanding how the aqua tkTable in /Library/Tcl was picked up in the first place? if /Library/Tcl is not in the auto_path, no extensions from that directory should be loaded > Thanks for your advice regarding running the configure script in > the Tktable packge. configure appeared to work with the > options you specified, after adding --with-tclinclude and > --with-tkinclude specifying where I'd downloaded the tcl/tk source. strange, if fink builds tcl/tk properly, these should not normally be necessary, I don't think tkTable uses internal Tk headers, the public Tk headers should be installed by fink does --with-tclinclude=/sw/include --with-tkinclude=/sw/include work as well? > But it looks like I need the source for X11 (make > complained that it couldn't find Xlib.h) and I didn't > seem to have it - at least not in any obvious place. So I > downloaded the X11 source from > http://developer.apple.com/darwin/projects/X11/ I don't think you need that, however, you will need the Apple X11 SDK (IIRC, available from the Apple X11 download page, separate download from the X11 client). however, if you built tkX11 sucessfully, you would have had to have access to Xlib.h already somewhere, but fink magic may be in play here. (try 'locate Xlib.h') > So it seems that I have to build X11 (and Tcl/Tk) > from source (which I'm currently doing, but it's taking ages.) I don't think you'll need to build X11 from source (which does take a LOOONG time), but it may well be worthwhile to build tcl/tkX11 from source without relying on fink if you're building your own Tk extensions. building tcl/tkX11 is quite quick on my G4/1Mhz, maybe 5 mins? > I'm trying to get my R/TclTk application working in a room full > of MacOS X machines for a training course next week, but > utimately my aim is to make the application easy for users to > install themselves. once you have everything nicely installed one one machine, you might want to look at the /usr/bin/package script or my http://tcltkaqua.sourceforge.net/8.4.4/Tools/buildPackage script to build an installer package for deployment, I have found that to be a good option for user self-install. You can also install such packages remotely via the 'installer' tool. > I guess Aqua will eventually be > easier than X11 when RAqua works smoothly with TkAqua. X11 has certainly become easier to use with Apple's X11, and on 10.3 it becomes even easier, as command line tools become double-clickable in the finder and start X11 automatically if needed (yay!); but of course, fully Aqua compliant tools will remain the goal in the long run... Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |
From: James W. <wet...@we...> - 2003-09-01 09:19:02
|
Daniel, > ok, in that case I have trouble understanding how the aqua tkTable in > /Library/Tcl was picked up in the first place? if /Library/Tcl is not > in the auto_path, no extensions from that directory should be loaded Sorry, in my last email I was trying to focus on my efforts to get X11 Tcl/Tk working rather than referring to to previous attempts to get Tktable working in R, INCORRECTLY INCLUDING THE Aqua VERSION OF Tktable. When this didn't work in R : > .Tcl("package require Tktable") I tried : > .Tcl("lappend auto_path /Library/Tcl") > .Tcl("package require Tktable") <Tcl> 2.8 then Tktable _seemed_ to load without an error. I realize that this was a mistake now - adding an Aqua Tcl/Tk directory to the path, but this was the only place where I could find all of the extensions like Tktable, and there was no obvious README file saying "THIS IS AN AQUA VERSION OF TCL/TK. BE CAREFUL NOT TO USE IT TOGETHER WITH X11 TCL/TK." > --with-tclinclude=/sw/include --with-tkinclude=/sw/include > work as well? The MacOS X machine I'm currently sitting in front of doesn't have an include directory in /sw, only a lib subdirectory, so either a fink option was specified to avoid installing the source/headers, or fink was used on a different machine, and then only some of the directories were copied across. X11 source: > I don't think you need that, however, you will need the Apple X11 SDK > (IIRC, available from the Apple X11 download page, separate download > from the X11 client). OK. Thanks. I've downloaded it, and will ask an administrator to install it (needs a root password). > however, if you built tkX11 sucessfully, you would have had to have > access to Xlib.h already somewhere, but fink magic may be in play here. > (try 'locate Xlib.h') Yes. Thanks for that. "locate Xlib.h" reveals : /Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11/Xlib.h and I've now found the tclstub and tkstub static libraries in /Library/Frameworks/Tcl.framework/Versions/8.4/ and /Library/Frameworks/Tk.framework/Versions/8.4/ respectively. Regards, James -------------------------------------------------------------------------- James Wettenhall Tel: (+61 3) 9345 2629 Division of Genetics and Bioinformatics Fax: (+61 3) 9347 0852 The Walter & Eliza Hall Institute E-mail: wet...@we... of Medical Research, Mobile: (+61 / 0 ) 438 527 921 1G Royal Parade, Parkville, Vic 3050, Australia http://www.wehi.edu.au -------------------------------------------------------------------------- |
From: Daniel A. S. <st...@ic...> - 2003-09-01 09:30:32
|
On Monday, Sep 1, 2003, at 19:18 Australia/Sydney, James Wettenhall wrote: > I realize that this was a mistake now - adding an > Aqua Tcl/Tk directory to the path, but this was the only place > where I could find all of the extensions like Tktable, and there > was no obvious README file saying "THIS IS AN AQUA VERSION OF > TCL/TK. BE CAREFUL NOT TO USE IT TOGETHER WITH X11 TCL/TK." understood, this will be improved upon in the future, probably by providing both Aqua and X11 versions of the extensions and fixing the pkgIndex files so that the right one gets loaded on [package require]. however, some packages in the BI install may need some porting to TkX11, e.g. snack, to make this work >> --with-tclinclude=/sw/include --with-tkinclude=/sw/include >> work as well? > > The MacOS X machine I'm currently sitting in front of doesn't > have an include directory in /sw, only a lib subdirectory, so > either a fink option was specified to avoid installing the > source/headers, or fink was used on a different machine, and > then only some of the directories were copied across. maybe a fink binary package was installed? it's possible that this doesn't include headers (or the headers may be in a separate tcltk-dev package or the like, search the list on fink.sf.net or ask on the fink lists) >> however, if you built tkX11 sucessfully, you would have had to have >> access to Xlib.h already somewhere, but fink magic may be in play >> here. >> (try 'locate Xlib.h') > > Yes. Thanks for that. > "locate Xlib.h" reveals : > /Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11/Xlib.h watch out, this is the TkAqua version of Xlib.h, don't use it with tkX11 ;-) once you've installed X11SDK, Xlib.h will be at /usr/X11R6/include/X11/Xlib.h > and I've now found the tclstub and tkstub static libraries in > /Library/Frameworks/Tcl.framework/Versions/8.4/ > and > /Library/Frameworks/Tk.framework/Versions/8.4/ again, this is the aqua version of the tkstub lib... the x11 one should be in /sw/lib if fink installs things properly. instead of futzing with fink, it's probably cleaner to build & install tkX11 from scratch into e.g. /usr/local, I never had trouble with that. Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |
From: James W. <wet...@we...> - 2003-09-01 11:25:35
|
Daniel, Thanks so much for your help. Now I can run X11 Tktable from within R!!! And I got it working without root access ;-) I was so keen to get it working, I didn't wait for my I.T. administrator to install the Apple X11 SDK, I just built it from source. Here's my configure command for Tktable: ./configure --prefix=/sw --with-tcl=/sw/lib --with-tk=/sw/lib --with-tclinclude=/Users/guest/wettenhall/tcltk/tcl8.4.4 --with-tkinclude=/Users/guest/wettenhall/tcltk/tk8.4.4 Rather than edit the X11 paths in the configure file, I just ran make, and let it fail because it couldn't find -lX11, then I rewrote the linking command, adding the correct library paths: % cc -dynamiclib -o libTktable2.8.dylib tkTable.o tkTableWin.o tkTableTag.o tkTableEdit.o tkTableCell.o tkTableCellSort.o tkTableCmds.o tkTableUtil.o -L/Users/guest/wettenhall/X11ForMacOSXSource-wwdc/xc/lib/X11 -lX11 -L/Users/guest/wettenhall/tcltk/build/Tcl.framework -l tclstub8.4 -L/Users/guest/wettenhall/tcltk/build/Tk.framework -ltkstub8.4 % mkdir ~/wettenhall/Tktable2.8 % cd ~/wettenhall/Tktable2.8 % cp ~/wettenhall/tcltk/Tktable2.8/libTktable2.8.dylib . % cp ~/wettenhall/tcltk/Tktable2.8/library/tkTable.tcl . % cp /Library/Tcl/Tktable2.8/pkgIndex.tcl . % cat pkgIndex.tcl if {[catch {package require Tcl 8.2}]} return package ifneeded Tktable 2.8 [list load [file join $dir libTktable2.8.dylib] Tktable] % R > library(tcltk) > addTclPath("/Users/guest/wettenhall") > tclRequire("Tktable") > tt <- tktoplevel() > table1 <- tkwidget(tt,"table",bg="white") > tkpack(table1) <Tcl> Looks beautiful! Thanks! James |
From: Larry W. V. <lv...@ca...> - 2003-08-28 10:20:25
|
From: Kevan Hashemi <ha...@br...> > There is no tcl8.4.4/macosx/README. There is a tcl8.4.4/README, but it does > not talk about macosx, which led me to think that I should use the UNIX > installation procedure. Nevertheless, I can open the tcl.pbproj file and > compile the tcl library (45 warnings, mostly signed-unsigned comparison). > The libraries show up in a $home/build folder. Perhaps those on this list who have compiled the source could put together some notes for a README - there really should be some sort of readme to help people in your situation. > The tk8.4.4/macosx/README exists, and mentions tcl.pbproj. It also implies > the existance of a TK .pbproj file, which I assume is the wish.pbproj file I > found in the same folder. Looks to me like most of that README could be used as the basis for a tcl macosx README. > My project builder is using GCC 3.1. I once forced it to use 3.3, according > to Apple's instructions, but that made no difference. I tried compiling the > TK dynamic or stub libraries instead, but the compiler fails at the same > place. I'm running MacOS 10.2.6 with X11 loaded. This is, in particular, the place where details in the README on software and versions is important. -- Tcl - The glue of a new generation. <URL: http://wiki.tcl.tk/ > Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |