Tcl - building additional extensions

There are a few Tcl packages (udp, in particular) that I use in some of my programs, but are not in the collection that is normally included with ActiveState Tcl. I have tried to build the extension using MinGW for x86_64 under msys2, but when I install the extension, the Tcl interpreter crashes when I go to open a socket. I do not know if this is a compiler incompatibility or a problem with the extension. I’ve used the same sources with the BAWT Tcl distribution (it’s included there) but the interpreter is amazingly slow to start on my system (sometimes close to a minute before I see the window), whereas ActiveState is quite fast.

Is there a topic or web page somewhere that details the steps to build additional packages to work with the ActiveState Tcl/Tk distributions?

Thanks in advance…

The approach depends on the version of Tcl you have, but in the end, there isn’t a way to add that module right now.

If you’re using any 8.4, or 8.5 version, or any version of 8.6 prior to 8.6.5, you can’t add to it at all now. The old TEA mechanic required pre-built binary packages served over a connection running SSL v3 or TLS 1.0. That connection is no longer secure, and the servers hosting the downloads will no longer allow the remote clients to connect. 8.6.6 to 8.6.10 have no mechanism to add packages. If you have an old version that doesn’t include a module you need as part of the installer, there is no way to add it now.

For 8.6.11, the mechanism to add packages is to fork a private copy, request the additional modules, and rebuild.
However, we need to have source code and working recipes established in order for modules to be added in this manner, and TclUDP is not available. None of the modules listed at UDP for Tcl are available yet. At some point in the future, they might be.

Thank you for your response.

I was hoping to build locally using the extension source downloaded from the BAWT archives, since that does work with the BAWT build of Tcl 8.7 (beta) and 8.6.10 (and perhaps 8.6.11). I wrote my own UDP extension a few years back, but it was not well integrated into the event system, and I had a succession of drive failures that took out both my working source and the backup copies.

The application I have controls a number of network connected microcontrollers (both wired and wireless) that have various doodads attached to them (LEDs, motors, buzzers, etc.) and receives data from sensors on those devices. The desire is to trigger a script that coordinates a response to a given stimulus or set of stimuli.

The original concept is what I think of as a “Feline pinball machine”, but I have since come up with better things to do with it than to torture my cat.

If you want to build locally, you’re best to build the entire interpreter stack locally so that you have consistent tooling throughout. The consistent stack top to bottom is what The Platform offers, but your tooling and the tooling used by The Platform will be different. There are no documented processes for using a local compiler with any builds done on The Platform in a mix-n-match environment, and we don’t support that.