Version 5 of FreeBSD

Updated 2001-10-22 16:36:22

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:

  • ./configure --enable-threads --enable-gcc
  • Edit Makefile:
        LIBS = $(MATH_LIBS) -pthread
  • make tcltest
  • Edit tclConfig.sh - linking of Tcl into static applications will need the -pthread switch to gcc
        TCL_LIBS=' -lm -pthread'
  • make
  • make install (as root, if necessary)
  • Rename tests/stack.test -> tests/stack.test_ to avoid known crash in test suite.
  • make test

LV why not submit a bug report to http://tcl.sf.net/ and have these fixes moved into the configure script for all ?


Filing a formal bug report is a good idea, and I will do that.

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.

AK: The "I" in the paragraphs above is Don Porter.