Tcl8.5 no longer appears to work as a threaded build on FreeBSD. The port /usr/ports/lang/tcl85-threads installs, but dumps core when thread::create is called.
I got the same result when building from CVS sources.
If anyone has had success on the FreeBSD platform with a threaded build, or knows anything about whether this is a Tcl bug or compiler toolchain problem, please update this bug report and/or comment here.
Nowadays (2006?) a threaded build is easy to install from the ports collection.
make WITH_THREADS=YES install
For an ordinary build/install of Tcl 8.3.4 on FreeBSD, the standard instructions should work just fine:
./configure make su (if needed) make install exit (the su) make test (if desired)
For a thread-enabled build, though:
./configure --enable-threads ... configure: warning: Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile... ...
So, here's the recipe, involving some file editing, for building, installing and testing a thread-enabled Tcl on FreeBSD:
LIBS = $(MATH_LIBS) -pthread
TCL_LIBS=' -lm -pthread'
DGP See Tcl Bug 473708.
Jeff and I spent some time trying to fix this for the Tcl 8.3.4 release, but the apparent right fix for this on FreeBSD broke the build/test on AIX. Neither of us was willing to break something that was working for a patch release, so the backup solution was to post the FreeBSD work-around here. Since threaded builds on FreeBSD have never worked "out of the box" yet, we haven't lost anything.
While Tcl 8.4.6 from FreeBSD ports compiles and runs quite nicely with WITH_THREADS=yes (which I have in my /etc/make.conf), wish8.4 constantly core dumps on the recent (2004-04-24) 5.0-CURRENT.
I tried Tcl 8.4.11 on both ports (tcl84 and tcl84-threads). I installed without hearing any complains. But when I typed "tcl" command, nothing happened. I rehashed. No help. I checked man page. It is there....but it is not working for me...can any body shed some light please?
Did you really type "tcl" rather than "tclsh"? If so, that's probably what is wrong.
Yes, I did type "tcl", not "tclsh". After I posted here, I installed tclX from FreeBSD port. Then it begin to work. Thank you for your such a quick reply! By the way, can I ask if you are familiar with xotcl? It gives me warnings like some thing defined not used, or declared not defined, etc at "make". then refused to install on my FreeBSD....thank you again! ----john
In the '90s, quite a bit of interesting "core" Tcl development was actually hosted on FreeBSD. In 2007, the BSDs [...] aren't nearly as prominent; there isn't an ActiveTcl specific to FreeBSD, for example [but does modern x86 FreeBSD have a facility for executing the Linux ActiveTcl?]. The TclKit for FreeBSD works quite nicely ...