From: Daniel A. S. <st...@ic...> - 2005-04-19 13:11:31
|
Sam, thanks much for reporting this On 19/04/2005, at 10:16, sa...@mc... wrote: > Daniel, > I have downloaded and installed the 8.4.9 TCL BI distro and when i > try > to use the tclcurl stuff i get an init error: > > Candace-McLanes-Computer:~ candacemclane$ tclsh > % package require TclCurl > 0.12.2 > % curl::transfer -url http://10.1.1.15 > Could not init a curl session: invalid command name "::curl::init" > % exit > Candace-McLanes-Computer:~ candacemclane$ which tclsh > /usr/bin/tclsh > Candace-McLanes-Computer:~ candacemclane$ uname -a > Darwin Candace-McLanes-Computer.local 7.9.0 Darwin Kernel Version > 7.9.0: > Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC > Power Macintosh powerpc > Candace-McLanes-Computer:~ candacemclane$ > > Any thoughts? the problem is with the pkgIndex.tcl file in /Library/Tcl/tclcurl0.12.2, it doesn't actually load the tclcurl binary extension at all, as it currently has: package ifneeded TclCurl 0.12.2 [list source [file join $dir tclcurl.tcl]] instead it should read: package ifneeded TclCurl 0.12.2 [list load [file join $dir libtclcurl0.12.2.dylib]]\n[list source [file join $dir tclcurl.tcl]] (all in one line). If you make that change, [package require TclCurl] will work as expected. The problem is caused by a dependency bug in the tclcurl Makefile that gets exposed by parallel make: the pkgIndex.tcl target does not depend on the LIB_FILE target, so with parallel make, the pkgIndex.tcl target can be executed before the library is built... Jeff, this is actually a bug in the tcl sampleextension Makefile.in as well, c.f. patch below. 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/> Index: Makefile.in =================================================================== RCS file: /cvsroot/tcl/sampleextension/Makefile.in,v retrieving revision 1.53 diff -u -p -r1.53 Makefile.in --- Makefile.in 24 Mar 2005 22:27:26 -0000 1.53 +++ Makefile.in 19 Apr 2005 12:56:01 -0000 @@ -282,7 +282,7 @@ VPATH = $(srcdir):$(srcdir)/generic:$(sr # the configure script output the pkgIndex.tcl by editing configure.in. #======================================================================= = -pkgIndex.tcl: +pkgIndex.tcl: $(PKG_LIB_FILE) ( echo pkg_mkIndex . $(PKG_LIB_FILE) \; exit; ) | $(TCLSH) pkgIndex.tcl-hand: |