tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <>
Subject Re: Building mod_websh DLL on Windows
Date Thu, 24 Sep 2009 11:13:35 GMT

> Just saw your posting of the new websh on c.l.t and tried building on  
> XP. Though the build went fine, I had the following questions -
> - websh links against both tcl86.lib and tclstub86.lib. Since the  
> compile does not seem to define USE_TCL_STUBS except for interpool.obj,  
> why is tclstub86.lib needed? Also why is only a single file built  
> against the stubs? Somehow this seems inconsistent. AFAIK, you should  
> link against one or the other, not both but perhaps I'm wrong about this.

It could actually be that it is not too consistent, but it definitly
needs to compile against both: basically (or websh.dll)
are compiled against the stub library, as it is loaded into either a
tclsh or websh or mod_websh, where a tcl library is already
loaded. however must link directly to tcl.lib, as there
is no Tcl anywhere else in the application. So must
properly know how to load Tcl.

> - possibly more important, TCL_THREADS is not defined for the build as  
> far as I can tell. As a result the tcl.h macros get resolved as not  
> requiring locking (all the mutex calls become no-ops). Is that not going  
> to be a problem? I'm asking because I got bitten by this early on  
> working on my TWAPI extension causing occasional crashes that I tracked  
> down to this issue.

Mhh. That's true. My impression was that if we need threads, we just
need to link against a threaded Tcl. I just added  /DTCL_THREADS=1 to
the Makefile, but it doesn't seem to make a difference at least
concerning the reported instability of the test suite. (That doesn't
impley that it shouldn't be tehre, though ;-)

Unfortunately, I'm really bad with Windows debugging. If you have a
chance to look into this that would be wonderful. (nmake apachetest
for me just sometimes does not run through w/o error with Tcl85 or
Tcl86 on Apache2 and Apache 2.2) It helps if I sleep between calls to
the server and give it more time to start and shutdown, but I'm not
sure if that's actually the cause of the problem or if it's just a
latent timing problem that arises more often when requesting

Ronnie Brunner |
phone +41-44-247 79 79 | fax +41-44-247 70 75
Netcetera AG | 8040 Z├╝rich | Switzerland |

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message