Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-11-13
11:18 • Closed ticket [ca61c66e02]: TCL+pkg forces thread-enabled package builds; bad fo... artifact: 5cc784dc9f user: serhiy.storchaka
2016-09-01
16:10 • Ticket [ca61c66e02]: 3 changes artifact: 8f063698ce user: dkf
2013-09-02
16:26 • Ticket [ca61c66e02]: 6 changes artifact: adb19fb8d9 user: dgp
16:06 • Ticket [ca61c66e02]: 3 changes artifact: de9f60e1e5 user: dgp
06:41 • Add attachment config.status to ticket [ca61c66e02] artifact: 7731179cb4 user: ashumundra
2013-09-01
06:24 • Add attachment net-bsd-pthread-error.jpg to ticket [ca61c66e02c7111e|ca... artifact: 9a0795300c user: ashumundra
2013-08-30
17:56 • Ticket [ca61c66e02] TCL 8.6 compilation issues with no thread support status... artifact: 7ae35c3a9a user: dgp
2013-08-29
07:19 • New ticket [ca61c66e02]. artifact: d1aca1f940 user: ashumundra

TCL+pkg forces thread-enabled package builds; bad for no pthreads systems

Closed / Out of Dateca61c66e02c7111e760fbd354655b42c048e014dCreated 13 years agoUpdated 20 days ago
Descriptionplain2013-08-29 07:19:12
I am compiling the latest TCL 8.6 source code on a net-bsd 5.1.2 machine for i386 platform. my software has its own implementation of threads therefore it does not use pthread. I am trying to disable pthread and undef TCL_THREADS flag using the following configure options but it does not work. The TCL_THREADS flag is set and I get stuck into compilation issues because there is no pthread library in my system.

./configure --enable-threads=no --enable-threadsafe=no

I tried using --disable-threads too, it did not work.
dgpplain2013-08-30 17:56:00
On my Centos Linux system, using either the 8.6.0 release or
the current trunk of development, when I configure for no
threads:

$ /path/to/configure --disable-threads
...
$ make
...
$ ldd libtcl8.6.so 
	linux-vdso.so.1 =>  (0x00007fff9adfd000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00002ba6f3538000)
	libz.so.1 => /lib64/libz.so.1 (0x00002ba6f373d000)
	libm.so.6 => /lib64/libm.so.6 (0x00002ba6f3951000)
	libc.so.6 => /lib64/libc.so.6 (0x00002ba6f3bd4000)
	/lib64/ld-linux-x86-64.so.2 (0x0000003e47c00000)

No need for the pthreads library.

It's possible things could be different on BSD, but I'd be
surprised.

Perhaps reporting the error messages you see on failure would
further track this down?
dgpplain2013-09-02 16:06:54
That error comes from Itcl, not Tcl.

Is it the 4.0.0 release of Itcl, or some later
snapshot?
dgpplain2013-09-02 16:26:11
Never mind, it does not matter.

The problem you face is that the Tcl+pkgs harness always
configures the bundled packages for --enable-threads builds
because on any normal system (yours is intentionally crippled)
that is the correct choice.  A thread-enabled package can [load]
into either thread-enabled or thread-disabled Tcl interps.  This
is the maximally useful build for general installation.

For your unusual needs, you will need to configure and build the
bundled packages separately, not using the harness.

The `make binaries` target will build both Tcl libraries and
the tclsh program according to your --disable-threads preference.

Then for each bundled package (except for Thread, naturally), you
can perform your own `configure --disable-threads; make; make install`
from their sources to get a set of binary packages suitable for your
no-pthreads platform.

Some additional configuration options in the Tcl+pkgs distribution
to make this task easier for those who need it seems like a good idea,
so I'm leaving this ticket open as a feature request for that.
dkf Ticket [ca61c66e02]: 3 changes [History diff]2016-09-01 16:10:49
serhiy.storchakawiki2026-11-13 11:18:45

Since Tcl 9.0 (TIP 491) non-threaded builds are no longer possible, so options for building the bundled packages without threads are moot.

Log in (anonymous is fine) to add a comment.