kbs bugs and comments

kbs means Tclkit Kitgen Build System


Comments

LV So, what version of tcl and tk is being used ? How does one go about reporting a newer version of one of the extensions? Jeff just announced itcl 3.4 last night... and sqlite3 is currently at 3.3.16 or newer, etc.

RZ Provided is tcl/tk 8.5 (cvs tag core-8-5-a6) and 8.4 (cvs tag core-8-4-branch). How to change a used version or add new versions and even add other packages please see in kbs packages

LV Do you want to receive reports, here or in email, etc., when there are newer releases of the packages that kbs builds? Do you care to hear about other packages that people may have an interest in seeing kbs support out of the box?

LV Also, when you come up with updates to kbs, will new downloads be necessary, or does the current kbs.tcl also check out the latest code for kbs from CVS?

RZ The version depend on the "Package" definition in the "kbs/kbs/defs.kbs" file. Downloads will occur only once. But you can add new versions or use for checkouts the HEAD and remove the "sources/..." dir of the package.

"kbs" updates will be on demand. Until otherwise stated, I will now use the "ChangeLog" file with an added timestamp.

LV This last response confused me. Let me see if I understand.

  1. A developer can always edit the kbs/kbs/defs.kbs file to indicate a newer version of a package if they so desire.
  2. kbs will download the version of the source indicated in this file one time, unless you remove the sources directory - then the next time kbs runs, it will download the source again.
  3. Watch the www.4shared.com site for a change in the date of the ChangeLog file to determine when to re-download the kbs.tgz file.

Did I get it all right? Note that the current ChangeLog file at 4shared is empty...

RZ thats right, i will update the ChangeLog if something is new


Problems

LV 2007 May 29

I'm trying to run kbs on a SPARC Solaris 9 system, with Sun's C compiler. I'm getting this error:

 === Make /tmp/.lwv/kbs/kbs/buildSunOS/vlerqstatic-4.1
 cc -DPACKAGE_NAME=\"vqtcl\" -DPACKAGE_TARNAME=\"vqtcl\" -DPACKAGE_VERSION=\"4.1\" -DPACKAGE_STRING=\"vqtcl\ 4.1\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -DWORDS_BIGENDIAN=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DSTATIC_BUILD=1 -D_REENTRANT=1 -D_POSIX_PTHREAD_SEMANTICS=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1   -I"/tmp/.lwv/kbs/kbs/buildSunOS/include"    -xarch=v9 -O  -c `echo /tmp/.lwv/kbs/kbs/sources/vlerq-4.1/generic/vlerq.c` -o vlerq.o
 "/tmp/.lwv/kbs/kbs/sources/vlerq-4.1/generic/vlerq.c", line 394: warning: integer overflow detected: op "<<"

RZ no problem, just ignore

 "/tmp/.lwv/kbs/kbs/sources/vlerq-4.1/generic/vlerq.c", line 2025: empty constant expression after macro expansion
 "/tmp/.lwv/kbs/kbs/sources/vlerq-4.1/generic/vlerq.c", line 2585: empty constant expression after macro expansion

RZ found the same under solaris 8 but no solution yet without touching the sources. So here we go. Change in "sources/vlerq-4.1/generic/vlerq.c" all lines with "#if _BIG_ENDIAN" to "#ifdef _BIG_ENDIAN". May be you need also to include "#define _BIG_ENDIAN 1" and "#define _VALUES_MUST_BE_ALIGNED 1", but this should already be ok.

 cc: acomp failed for /tmp/.lwv/kbs/kbs/sources/vlerq-4.1/generic/vlerq.c
 *** Error code 2
 make: Fatal error: Command failed for target `vlerq.o'

followed by kbs.tcl error stack. What is the best way to proceed at this point?

RZ remove Makedir (rm -rf build*/vlerq*) and restart

Should I deleted the file structure and attempt to start over? Also, note that the build is generating a warning message from tk 8.5, saying that you might consider performing a

 make genstubs

RZ ignore this, there should be a comment in the log


LV May 31, 2007 With the change you list in vlerq.c, I got farther. Now I am encountering the following:

 === Configure /tmp/.lwv/kbs/kbs/buildSunOS/tclkit-8.5
 :
 configure output - available if needed
 :
 checking for ar... ar
 checking for required early compiler flags... none
 checking for 64-bit integer type... using long
 checking for build with symbols... no
 checking for tclsh... /tmp/.lwv/kbs/kbs/buildSunOS/bin/tclsh8.5
 configure: creating ./config.status
 config.status: creating Makefile
 === Make /tmp/.lwv/kbs/kbs/buildSunOS/tclkit-8.5
 make: Fatal error: Don't know how to make target `pwb.o'
 child process exited abnormally
     while executing
 "exec {*}$args >@stdout 2>@stderr"
     (procedure "Run" line 6)
     invoked from within
 "Run make KITOPTS=$MYKITOPTS MYLIBS=$MYLIBS"
     invoked from within
 "if {$::tcl_platform(os) == "Linux"} {;#TODO
       Run make KITOPTS=$MYKITOPTS MYLIBS=$MYLIBS MYLIB_XFT=-lXft
     } else {
       Run make KITOPTS=$MYKI..."
     ("eval" body line 33)
     invoked from within
 "eval $script"
     (procedure "Make" line 5)
     invoked from within
 "Make {

: and so forth.

LV quick update - the problem above appears to be something in the process or makefile that is gnu make specific. kbs.tcl uses "make" - which by default picks up, in my environment, Sun's make command. When I move my path around to get gnu make, the build completes. It appears to have something to do with locating the pwb.o ...

RZ yes, the sun make does not use the VPATH statement correctly. May be I can patch this inside kbs.tcl

LV I run into additional problems when I run the -r result packages option - here's the worst problem so far- I get a ton of these...

 ld: warning: file /tmp/.lwv/kbs/kbs/buildSunOS/lib/libtclstub8.5.a(tclStubLib.o): wrong ELF class: ELFCLASS64

RZ which compiler you are using? I used the native from sun. May be you can change "set _(64BIT) {--enable-64bit}" to "set _(64BIT) {--disable-64bit}" and build.

LV My $CC variable is set to cc, which says this:

 $ cc -V
 cc: Forte Developer 7 C 5.4 2002/03/09

RZ mmh.. I do not know this compiler. But you have a working tcl version with the tclsh running the kbs.tcl script. Do the problems occur in all packages or just one? On sparc you should find the "-xarch=v9a" and on amd,intel the "-xarch=amd64" in the CFLAGS variable of the "Makefile" of the package. See in the "build../..." directory of the package.

Note that I'd prefer to have the 64 bit stuff enabled... Question - where do I find the logs of the build of each of the parts?

RZ call with the "-v" switch like "./kbs.tcl -r -v install ..."

LV When I run kbs.tcl -r result packages, I also see this:

 === Source tkhtml-3.0
 cvs checkout: authorization failed: server tkhtml.tcl.tk rejected access to /tkhtml for user anonymous
 cvs checkout: used empty password; try "cvs login" with a real password
 Please call the following command by hand (password is "anonymous") and restart again:
  cvs -d :pserver:[email protected]:/tkhtml login

RZ I hoped this is self explaining, call the last line command and give as password "anonymous". It is only needed for this site. Please ask the maintainer about why. I do not have a tcl only patch for this :(

LV Sorry - I didn't expect that one of the distributed packages would require an action like this without a note somewhere in the readme or changelog or whatever.


LV 2007 June 04: I download the latest kbs.tgz . I extract it. I try running:

 ./kbs.tcl -v --enable-64bit --enable-threads -r result tclkit-8.5

I get, as output:

 cc -c -O    -KPIC -I. -I/tmp/.lwv/kbs/kbs/sources/tcl-8.5/unix/../unix -I/tmp/.lwv/kbs/kbs/sources/tcl-8.5/unix/../generic -I/tmp/.lwv/kbs/kbs/sources/tcl-8.5/unix/../libtommath -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DSTATIC_BUILD=1 -D_REENTRANT=1 -D_POSIX_PTHREAD_SEMANTICS=1 -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_DIRENT64=1 -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1

-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DNO_UNION_WAIT=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -DTCL_UNLOAD_DLLS=1 /tmp/.lwv/kbs/kbs/sources/tcl-8.5/unix/../unix/tclAppInit.c

 cc -O tclAppInit.o -L/tmp/.lwv/kbs/kbs/SunOS/tcl -ltcl8.5 -ldl  -lsocket -lnsl -lm \
        -Wl,-R,/tmp/.lwv/kbs/kbs/SunOS/lib -o tclsh
 ld: warning: file /tmp/.lwv/kbs/kbs/SunOS/tcl/libtcl8.5.a(tclInterp.o): unknown file type
 Undefined                       first referenced
 symbol                             in file
 Tcl_SetVar                          tclAppInit.o
 Tcl_Init                            tclAppInit.o
 Tcl_Main                            tclAppInit.o
 ld: fatal: Symbol referencing errors. No output written to tclsh
 make: *** [tclsh] Error 1
 ./kbs.tcl: /tmp/.lwv/kbs/kbs/SunOS/bin/tclsh8.5: not found

RZ I am next week again on solaris 8 and will try this. Why are you failing in the startup part? This should not happen :( Have you removed the old stuff, try "rm -rf SunOS ; ./kbs.tcl". Have you changed the compiler?

LV I have removed the entire kbs directory, and downloaded the June 2 copy of things. I even made certain to build the very latest gnu make file, trying my best to get things to work. So far, still not very successful.

LV 2007 June 06. More info. I downloaded the June 2 update of kbs. I extract the tar file creating the kbs directory from scratch. I run this command:

 ./kbs.tcl -v --enable-64bit --enable-threads -r result tclkit-8.5 >> output.txt 2>&1

What I am seeing is :

 info about checking out tcl, building tcl, installing tcl, and then:
 === Require done: tclstatic-8.5
 === Require leave: tclstatic-8.5
 === Require error: tkstatic-8.5
 missing link source: tk-8.5

Inside kbs/defs.kbs, I see :

 catch {source [file join kbs todo.kbs]};# not yet ready package definitions

 # Defaults:
 Package tcl { #Require tcl-8.5 }
 Package tclstatic { #Require tclstatic-8.5 }
 Package tk { #Require tk-8.5 }
 Package tclkit { #Require tclkit-8.5 }

 # Package builds
 Package packages-8.5 { Require tcl-8.5 tk-8.5 packagelist }
 Package packages-8.4 { Require tcl-8.4 tk-8.4 packagelist }
 Package packagelist {
  #TODO mk4tcl-2.4.9.6 failed in SunOS with cc
  #TODO ral-0.8.2 failed in SunOS with cc (unnamed union acces does not work)
  #TODO vfs-1.3 build only *.a library ?
  #TODO tdom-0.8.1 missing TCL_STORAGE_CLASS in tdomDecls.h in windows
  Require bwidget-1.8.0 img-1.3 itcl-3.3 itk-3.3 iwidgets-4.0.2 memchan-2.2.1 me

ntry-3.1 sqlite-3.3.13 tablelist-4.6 tcllib-1.9 tclx-8.4 thread-2.6.5 tkhtml-3.0

 tklib-0.4.1 tktable-2.9 udp-1.0.9 wcb-3.1 xotcl-1.5.3
  switch -- $::tcl_platform(platform) {
    windows {
      Require trofs-0.4.3;# error in unix configure script
    } unix {
      Require snack-2.2.10;# missed mmreg.h dsound.h in windows
    }
  }
  Clean { file delete -force [Builddir tcl]/lib }
 }

RZ ok lets see: you have a working tclsh so yesterday was some version mismatch in the SunOS dir. THe missing link is a real error. I tried to optimize sources and use them in different targets. Need some more thinking. To proceed load at first the sources with:

 ./kbs.tcl -i sources \*

and proceed then. You do not need the "--enable-64bit" and "--enable-threads" options, these are on by default :) Sorry for the inconvenience.

LV 2007 June 06 - thanks for your patience. So I did the -i sources, and a few of the packages were signed out. But I got the error:

 === Package eval: threadstatic-2.6.5
 Error in execution of "sources *":
 missing link source: thread-2.6.5

But kbs/defs.kbs has a Package thread-2.6.5, with a Source cvs line in it - is there something that has to change in there?

RZ see above, I can next week again work on it :)

Later... Well, I hand copied the thread code (as well as several others than for some reason gave me the same error) that I have into the source directory (it came from the cvs). And kbs.tcl now says

 === Result bin/tclkit8.5-*
 === Package done: tclkit-8.5

Great! RZ this should be the normal way


Question for you - what is the "build packages" step for? I don't see any info about what that is for. RZ if you mean "kbs.tcl install packages-8.5" - it is to compile all available tcl extension packages. The "result" command is used to get the necessary files to use the package. Ready for use in starkits.


RZ what do you mean with "build packages"? which command?

LV In the kbs readme file, I read:

 Build Tclkits:
  ./kbs.tcl -r result tclkit-8.5
  ./kbs.tcl -r result tclkit-8.4

 Build packages:
  ./kbs.tcl -r result packages-8.5
  ./kbs.tcl -r result packages-8.4

But I don't know what to expect to see as a result of the "Build packages" step. At the end of the "Build Tclkits" section, I know to expect a tclkit. Will the result of the "Build packages" be a starkit with the packages in it, or just a series of packages that tclkit will be configured to look for? Just curious.

RZ oh, i thought it was obvious. You get all available packages ready for use under the "result*/lib" directory. Only the files necessary to use the packages are installed. It is not yet a starkit. Do you think we should build one? To test them go in the "result*/lib" dir and type:

 ../bin/tclkit8.5-dyn
 lappend auto_path [pwd]
 package req ...

LV Sorry, it wasn't obvious just from reading- and I've been unable to get things to build well enough to understand the final intent. As for building a starkit, I think that would be a marvelous idea.


LV I have tried to build it, and have run into problems there as well. For instance, it appears that it is trying to install mentry and wub twice - because it says they are already installed, and kbs.tcl stops. Then, when I delete the directories from the buildSunOS directory, and rerun the script, they install... and then generate the error again. I have no idea why it is trying them twice, because the defs.kbs file only lists them once as far as I can tell. I don't seem to be able to locate a work-around for the wub problem... all the combinations I have tried result in the error.

RZ my error, i will fix it in the "defs.kbs". The "Install" script of the "Package wcb-3.1" should at first try to delete the dir and then copy the files. Search p.e. in "Package bwidget-1.8.0" the "file delete.." line.


LV 2007 June 22 Note for anyone else out there trying to use kbs on a SPARC Solaris machine, at least using Sun's compiler, I have a patch for vlerq which I've submitted that will fix the module that doesn't compile. I have submitted the patch to the author of the package. I don't think the problem has anything to do with kbs (though, if kbs sets any -D flags for packages, PLEASE make certain that you say -Dsymbol=1 and not just -Dsymbol!). kbs is currently building the packages target...

Okay, everything that will build, is built. tclral doesn't build on Solaris, but kbs notes that in the defs.tcl file. snack compilation generates some warnings because one of the .h files have ^M endings, but it built.


LV 2007 June 22 Just a note - kbs currently grabs the tcl/tk 8.5a6 branch - but the latest is the 8.5a7 branch...

RZ I will update if the a7 is official. In the meantime you can change "core-8-5-a6" to "core-8-5-a7" in "kbs/defs.kbs" yourself.


LV 2007 July 05 Today, I downloaded the newly updated kbz.tgz . I extracted it as a brand new directory. Without changing the defs file, I ran: ./kbs.tcl -r result tclkit-8.5 packages-8.5 > output.txt 2>&1 I got the following error:

 === Install /tmp/.lwv/kbs/kbs/buildSunOS/tclstatic-8.5
 ld.so.1: tclsh: fatal: relocation error: file tclsh: symbol : referenced symbol not found
 make: Fatal error: Command failed for target `install-tzdata'
 === Require error: tclstatic-8.5
 child process exited abnormally

The problem is likely that the build process assumed gcc, which causes a problem at my site because it isn't installed in a standard location. To resolve this problem, I removed the build* and result* directories, then executed

 export CC=cc

so that the build process would use my preferred C compiler.

Note that these kinds of problems would be much easier if the output from the configure and make process would be stored somewhere standard for viewing.

Once I fixed that problem, things built a little longer, until I encountered this new problem:

 === Configure /tmp/.lwv/kbs/kbs/buildSunOS/tclkit-8.5
 === Make /tmp/.lwv/kbs/kbs/buildSunOS/tclkit-8.5
 make: Fatal error: Don't know how to make target `pwb.o'
 Error in execution of "result tclkit-8.5 packages-8.5":

LV With the latest kbs.tcl (downloaded from the kbskit.sf.net web site), the primary problem I have encountered is that some of the packages that are built as a part of kbspkg.kit require the make command support VPATH in a GNU manner. On SPARC Solaris at least, often the default make command is a non-GNU one, resulting in strange failures in the build process. To get past this, the developer needs to make certain that the first make found when running kbs.tcl is a command called make and that it is a GNU make.


LV 2007 Dec 19 So, when there are updates to kbs.tcl and the packages it uses, etc., I assume that those updates will be distributed via a new download of kbs.tcl. Have you thought of adding an "get a new copy of kbs.tcl" type function that would download a new copy of itself when found?

I find that functionality really nice in teacup. The sdx utility used to have the ability to update itself and other .kit files; that doesn't appear to be working right now.


LV 2008 Jan 11 So, what happened, with the new kbs.tcl, is that the comp.lang.tcl announcment reported that a new kbs.tcl was available for download, as well as instructions to delete the various directories created during the run. Well, technically, the instructions listed a half dozen directories under source - for consistency sake, I went ahead and deleted all them just to get fresh stuff.

RZ You could always remove everything and get it again. The list was for people with slow internet connection.


JensPoenisch 2009 Jan 4 The version of vfs has been changed to 1.4, but not updated in kbs sources (use vfsstatic-1.3), so that the build doesn't work.

RZ please try version 0.2.6. Unfortunately there are no tag for vfs:(

rgf 2009 Jan 20 I just tried compiling on linux with version 0.2.6 and couldn't get past 'Make ... application-specific initialization failed: couldn't open "vfs1.4-pkgIndex.tcl": no such file or directory'. Any suggestions?

RZ ups, the file is not yet in the cvs. I will do it on the weekend. Until then type in the kbs-dir:

 cd sources
 cp vfs-1.4/library/pkgIndex.tcl kbskit-8.5/library/vfs1.4-pkgIndex.tcl

and add the following line on the end of the file or replace the statement:

 package ifneeded vfs 1.4 [list load {} vfs]

LV 2009-Jan-28 I downloaded kbs.tcl, then ran

  ./kbs.tcl -r install kbskit-8.6

and, after much output, got the following

cvs checkout: Updating itcl/win/rc
=== Configure /tmp/.lwv/kbs/buildSunOS/tcl-8.6
=== Make /tmp/.lwv/kbs/buildSunOS/tcl-8.6
/tmp/.lwv/kbs/sources/tcl-8.6/generic/tclBinary.c: In function `BinaryDecodeUu':
/tmp/.lwv/kbs/sources/tcl-8.6/generic/tclBinary.c:2502: warning: subscript has type `char'
/tmp/.lwv/kbs/sources/tcl-8.6/generic/tclCompExpr.c: In function `ParseExpr':
/tmp/.lwv/kbs/sources/tcl-8.6/generic/tclCompExpr.c:755: warning: subscript has type `char'
/tmp/.lwv/kbs/sources/tcl-8.6/generic/tclPkg.c: In function `Tcl_PkgInitStubsCheck':
/tmp/.lwv/kbs/sources/tcl-8.6/generic/tclPkg.c:1867: warning: subscript has type `char'
gcc: no input files
make: Fatal error: Command failed for target `Zadler32.o'
=== Require error: tcl-8.6
child process exited abnormally
=== Require error: tcl-8.6
Require failed for: tcl-8.6
Error in execution of 'install kbskit-8.6':
=== Package failed for: tcl-8.6
Require failed for: tcl-8.6

rgf 2009 Feb 05 Just retried the following on linux:

  ./kbs.tcl -r install kbskit-8.5     ... worked!
  ./kbs.tcl -r install tksqlite-0.5.6 ... worked!
  ./kbs.tcl -r install kbspkg-8.5     ... failed with the following
  ...
  === Source eval: tcloo-0.6
  === Require error: tcloo-0.6
  fetch failed
  Error in execution of 'install kbspkg-8.5':
  === Package failed for: tcloo-0.6
  Require failed for: tcloo-0.6

Thanks for the changes to get vfs* working. What can I do for tcloo ...? 2009 Feb 06 - I tried creating kbspkg again using the -i option. I was hoping it would just ignore tcloo and create the kit without it. It did, but there was no main.tcl in the kit.

RZ mmh, the failed fetch I got also sometimes. Just try it again. May be the server is down? Change in '.../sources/kbskit*/kbskit.kbs' 'mesh.dl.sourceforge.net' to 'garr.dl.sourceforge.net'. To get around the package completely remove in '.../sources/kbskit*/kbskit.kbs' under 'Package kbspks..' the 'TclOO0.6' entry. You can also copy this Package entry and build your own selection. Or you wait until next week. I test now version 0.3 with command line build of interpreters with user selected packages:) rgf 2009 Feb 13: I tried several times over a few days to run the script as is but still got the same error; deleted code that references tcloo in 'kbskit.kbs' and was able to get a pkg/kit built. Thanks for the suggestion!

JOB 2009-Feb-13:

 I am currently on the way to replace my old fashioned makefile with kbs - thanks for your great work RZ!

The only thing what I miss right out of the box is oratcl, and metakit (which is required to run wub, I suppose). Some remarks: On Mac+X11 the command "kbs.tcl -r -builddir=buildDarwin85 --disable-aqua install kbskit-8.5" works out fine, but when looking into the downloaded tklib-0.4.1 source tree - where I expected the most recent plotchart package (V1.6.1), I could only find V1.1. So, can I trust the cvs checkout integrated in kbs ?

 # cvs checkout:
 # as stated at sourceforge works, but downloaded package is *not* the lates file reference ?
 cvs -d :pserver:[email protected]:/cvsroot/tcllib -z3 co -r tklib-0-4-1 tklib

 # from kbs definition file in the kbs package:
 # Source cvs tcllib.cvs.sourceforge.net:/cvsroot/tcllib -r tklib-0-4-1 tklib

 # finally, this one checks out the most recent source:
 cvs -z3 -d:pserver:[email protected]:/cvsroot/tcllib co -P tklib

Do I need to create my_own.kbs definition file, just in case. And furthermore: do I need to take care about all version numbers by my own all the time? (On the other hand: manually editing each individual version has also an advantage - one can keep the control...)

RZ you can go one step further. Create your own package with your own *.kbs file with the following lines to include all standard stuff (I do it myself also):

 source sources/kbskit0.3/kbskit.kbs;# load common definitions
 set ::kbs::config::_(symbols) --enable-symbols;# build always debugging versions
 set ::kbs::config::_(CC) cc;# native C-compiler
 ..

May be I should remove the check on double 'Package' statements and even allow overwrites?

Regarding metakit try kbs version 0.3. It is included now.

I try to use as long as possible concrete version numbers. It avoid hassle with changes in new versions. But you can always create your own 'Package' with checkout from the HEAD:)


LV 2009-Feb-18 Thank you for your continued development of kbs!

Two tiny suggestions regarding the initial comment block in kbs.tcl .

1. Under the FUNCTION comment, a line says "Launch as 'kbs.tcl' to get a brief help text. However, when I launch kbs.tcl without arguments, as I thought this comment implied should be done, I instead get kbs.tcl attempting to checkout a large amount of files. I don't know what exactly it is attempting to get and create... After a long period of fetches, I finally do get the help info. It was just surprising to me that so much fetching occurred before finding out what exactly I wanted to do.

2. Under the COPYRIGHT comment, a line says "See the file 'license.terms'..." however, all the download included was kbs.tcl. I don't see a file by that name being created by kbs.tcl . It seems like kbs.tcl should, at the very least, generate a license.terms file, or list in the comment line instead a URL where said file is available for reading.

RZ 1. kbs.tcl needs a wish to run. So the first invocation load the tcl/tk sources and build a wish. This is done in a separate dir (Linux, SunOS,..). The second startup is then faster. You could also run it with 'wish kbs.tcl ..'.

LV when I try to run it with a wish, I see:

$ cd /tmp/.lwv/kbs
$ ls
kbs.tcl
$ wish8.5 ./kbs.tcl
=== Read definitions from /tmp/.lwv/kbs/sources/kbskit0.3/kbskit.kbs
Option error (try './kbs.tcl' to get brief help): couldn't read file "/tmp/.lwv/kbs/sources/kbskit0.3/kbskit.kbs": no such file or directory
$ ls
buildSunOS  kbs.tcl     sources

RZ sorry, I should have tried it first. It seems I need to make a special check for this case. After some digging it is not even easy. Because I call kbs.tcl again to solve Source Link targets. So it will have to wait for the next release.

2. The 'license.terms' can be found in the cvs repository. But otherwise good suggestion. Thanks.

JOB kbs.tcl needs a wish to run - may I add some comments about this issue.

kbs.tcl works well on machines with a standard compiler installed (gcc) and which are connected to the internet - for instance on a macintosh with X11. If the compiler is a non standard one, for instance xlC under AIX, kbs.tcl fails and it's nearly impossible to get it up and running. To overcome this problem, I created another shell script, which can be fine-tuned for individual platforms in order to compile wish and kbskit executables. The script can be used as a workaround, in cases where kbs.tcl fails and can also be used in parallel, as it assumes to have the same source/build directory. The script can be found here: tbs - a tcl/tk build system


Using the latest kbs.tcl, when I run

./kbs.tcl -r install kbspkg8.5

after having built kbskit, I see these errors:

=== Require eval: treectrl2.2.3
=== Source Http treectrl2.2.3
=== Require error: treectrl2.2.3
no sources
Error in execution of 'install kbspkg8.5':
=== Package failed for: treectrl2.2.3
Require failed for: treectrl2.2.3

(I have GNU make as the first make in my $PATH.)

Has anyone else seen this?

RZ It seems version 2.2.3 is no more available at sourceforge. I updated to 2.2.8 in then new kbskit 0.3.1. release.


LV 2009 Oct 12 Today I downloaded the kbs.tcl script from the SF.net site. I set my CC and CCC environment variables to point to my Sun C and C++ compilers. I ran the script on a SPARC Solaris 9 system, using this command line:

kbs.tcl -r -mk install kbskit.8.5

After doing quite a bit of checkouts, compiling, and installing, I see this:

Error in execution of 'install kbskit.8.5':
no targets found for pattern: 'kbskit.8.5'

RZ as we say in germany: wer lesen kann ist klar im Vorteil ;) (if you can read you are better then not)

I then noticed the extra period in the name - before the 8.5. So I reran the command as

kbs.tcl -r -mk install kbskit8.5

the compiles went on for a while until it reached mk4tcl.cpp. A variety of warnings were produced, as well as two errors. Line 404 says that one cannot cast from c4_LongRef to long long and line 477 says cannot assign long long to c4_LongRef without "c4_LongRef:operator=(const c4_LongRef&)";.

RZ Hi Larry. I found it! Please add in mk4tcl2.4.9.7/tcl/mk4tcl.h after line number 12 (#include <tcl.h>) the following:

 #undef TCL_WIDE_INT_TYPE

LV After I made that change, the deleted all the stuff that had been built, it appears things completed successfully. If I wanted the equivalent for 8.6, is it simply a matter of replacing the 5 with a 6?

RZ I'm not sure what you mean. The above change is used in both (8.5 and 8.6) builds.

LV I apologize for being vague. Let me rephrase. Once I have built kbskit 8.5, what steps do I need to take to build kbskit 8.6? Just run

kbs.tcl -r -mk install kbskit8.6

or do I need to do some cleanup first? Thanks.

LV later... Well, in the spirit of Tcl, I just tried it - and it worked as one might expect, without needing to remove any old files, etc. Thanks for such a great tool!


LV 2009-11-23 I tried out kbs.tcl 0.4 today and ran into a couple of issues. I use $ ./kbs.tcl -r -mk install kbskit8.5 > output_85.txt 2>&1

and of course, the first thing I forgot was to set the CC and CCC environment variables to use Sun's C compiler. Without that, the build fails because gcc on our system doesn't include the flags so that a.out's like tclsh8.5 can find the gcc libgcc shared library :(... So I tried again, pointing to Sun's compilers, and things make it to here:

=== Configure /tmp/.lwv/kbs/buildSunOS/thread2.6.5
=== Make /tmp/.lwv/kbs/buildSunOS/thread2.6.5
"/tmp/.lwv/kbs/sources/thread2.6.5/generic/psGdbm.c", line 399: warning: empty translation unit
=== Install /tmp/.lwv/kbs/buildSunOS/thread2.6.5
=== Require done: thread2.6.5
=== Require leave: tk8.5-static tk8.5 vfs1.4-static zlib1.2.3-static thread2.6.5
=== Require mk4tcl2.4.9.7-static itcl3.4
=== Require eval: mk4tcl2.4.9.7-static
=== Source Link mk4tcl2.4.9.7-static
Error in execution of 'sources mk4tcl2.4.9.7':
=== Package failed for: mk4tcl2.4.9.7
missing sources of package 'mk4tcl2.4.9.7'
=== Require error: mk4tcl2.4.9.7-static
missing sources of package 'mk4tcl2.4.9.7-static'
Error in execution of 'install kbskit8.5':
=== Package failed for: mk4tcl2.4.9.7-static
Require failed for: mk4tcl2.4.9.7-static

I looked around for a .log file for mk4tcl, but so far, haven't found one. It looks, to me, as kbs.tcl wasn't able to locate that package. I'm having problems decyphering where the issue is though. I don't see an error in the above info from the Svn checkout of the source...

RZ this release use svn to get some of the sources. Do you have a working svn installed? I can not check this because the machine I use to build is not connected to the internet:( You can get more informations on the current actions with the -v switch. (./kbs.tcl -r -v -mk install kbskit8.5)

LV I've never seen svn, so I doubt I have it available. Looks like I'm not going to be able to use kbs.tcl any longer. Thanks for the answer. It might be useful for kbs.tcl to verify it has access to the commands it requires and to generate a specific message to the user.

RZ svn is the successor of cvs. Some projects on sourceforge (img, rbc) and equi4.com (metakit, sdx, vlerq) are only available with svn. The complete source tree as tgz file is around 60MB. So we have some choices. Place the source tree file under kbskit download, put the svn sources under kbskit and include this as additional source. I can also send it to you directly. Or do you have other ideas? Remember that the old cvs repositories are no more used.

LV I apologize if it sounded like I was criticizing your use of svn. I understand what is going on there. I in fact took a quick look at what it would take to build svn and found that the number of dependencies was larger than I have time to deal with right now. Hopefully at some time in the future this is something that someone at this site will have a need for.

Do you checked to see if a svn "head" type tar.gz file is being generated over at the ftp://tcl.activestate.com/pub/tcl/nightly-cvs/ site? Perhaps if a user of kbs.tcl doesn't have svn installed, that kind of a site could be a fall-back option?

RZ Can you try to use the static build client from <http://www.uncc.org/svntools/clients/ >? The nightly-cvs does also not contain your missing pieces.


JOB Since I updated to MacOSX V10.6.2 + gcc 4.2.1 I can't compile tcl/tk 8.5/8.6 any more. Maybe probably not the right place to post here, but anyway... ./kbs.tcl -r make kbskit8.5 produces the following error:

/Users/hans/myCoolSoftware/kbs/sources/tk8.5/unix/../macosx/tkMacOSXBitmap.c:263: error: expected ) before ˜resource make: *** tkMacOSXBitmap.o Error 1

RZ I do not know it was working for macosx. I do not have a mac. So I can only guess. The given line seems in my source ok. You can check with:

 cd sources/tk8.5/macosx
 cvs status tkMacOSXBitmap.c

You can also get the running commands with the -v switch.

 ./kbs.tcl -v -r make kbskit8.5

Either it gives you a clue or you can post it here.


CliC Has anyone gotten this to work at all on Windows? I've struggled off and on over a couple days, first with the MinGW cvs not liking Windows 7 64-bit (some bogus "permission denied" error when moving a file), and now with a variety of problems on XP 32-bit.

I tried running it with a prebuilt wish 8.5.9 as described on the main kbskit page, but it runs, returns to the prompt and does nothing. So I let it download all the Tcl source files and bootstrap itself. That went OK, or so it seemed, but when trying to "install" a "vq" build of kbskit8.5, it dies with this error:

FindResource() failed for buttons bitmap resource, resources in tk_base.rc must be linked into Tk dll or static executable.

I tried "kbskit -doc", and it downloaded sources for an application called "robodoc", but it died during the build of that, too.

Trying from the command line, using "./kbskit -r -v -vq install kbskit8.5", dies because it has "missing sources of package sdx.kit". It managed to download everything else, why not this?

Anyway, it's been frustrating, and that is with the released version of Tcl, not even the beta version I want to use. The author seems to only develop on Linux, which is of course his perogative. Prebuilt tclkit binaries are on the SF site for other platforms, but not for Tcl 8.6 on Windows, hence my attempt at rolling my own. If no one else has used this successfully on Windows, I guess I'll try kitgen.

RZ The prebuild binaries on sourceforge are created with msys/mingw. Because of my old version I could not build the latest 8.6 binaries (missing libraries). In time I should upgrade.

To give you some help please post the really used command line. In case of errors you get some more output with the -v switch. Also have a look at kbs examples.

CliC RZ, I haven't yet had time to revisit this, and give it more attention. I also should apologize for my rather negative tone. I was looking for a quick solution, and when it didn't materialize, I got frustrated. I was using some of the examples, and couldn't get them to work, but I am capable of looking at the code and seeing what's wrong like anyone else, and should have done so -- and I will when I have the time to devote to fully understanding what is going on under the hood. This looks like a promising project, and I certainly appreciate the efforts of anyone doing things like this and sharing with others.

RZ I do not think you need to know what is inside. At least not on normal conditions. Again, have a look on kbs examples. In case of error please post our command line and the error (more details with the -v switch). Oh, and if you have problems in getting sources please try it again (just: ./kbs.tcl sources ...). I can not guaranty working internet connections and servers.

JJS To see how I got around the FindResource() error, and how to build a -dyn kit with "batteries included", see this Google Groups post.