Tcl Library Source Code

View Ticket
Login
Ticket UUID: 4799af766d8045f8524e8b576879c82473119865
Title: Installer not creating tcllibc + related uuid issue
Type: Bug Version:
Submitter: aku Created on: 2024-06-03 18:52:19
Subsystem: Build System & Testing Assigned To: aku
Priority: 7 High Severity: Important
Status: Closed Last Modified: 2024-09-19 20:03:22
Resolution: Fixed Closed By: aku
    Closed on: 2024-09-19 20:03:22
Description:
Original ticket is [https://core.tcl-lang.org/tklib/tktview/1492630fff],
created at 2006-05-21 21:05:09

```
installer.tcl (on windows at least) doesn't create the 
tcllibc module - nor does INSTALL.txt mention how to 
build it.

I found out about 'sak.tcl critcl' through a c.l.t 
article where the original poster was complaining 
about slow pure tcl implementations.

A missing tcllibc module means that the uuid package 
at least, will fallback to Tcl only mode even though 
critcl is installed.

for uuid without tcllibc - the faster version can be 
accessed by first package requiring critcl..
then directly calling the c proc.

e.g on a machine without tcllibc installed.

%package require critcl
0.35
%package require uuid
1.0.1
%uuid::tostring [uuid::generate_c]
<some guid>
%time {uuid::tostring [uuid::generate_c]} 100
150.0 microseconds per iteration
%time {uuid::uuid generate}
51560 microseconds per iteration

As you can see there's a huge performance difference 
(due to exec call to ipconfig I guess) so it seems 
that the fast critcl version is usable without 
tcllibc - yet the default in this case is to still use 
the pure Tcl version.

Note that if critcl is 'package required' after uuid 
then you just get:
invalid command name "uuid::generate_c"

I guess I'm suggesting that either uuid shouldn't 
depend on tcllibc being present - just critcl... 
and/or that tcllibc should be built by the tcllib 
installer and documented, or at least just explained 
in INSTALL.txt.
```
User Comments: aku added on 2024-09-19 20:03:22:
Fixed, commit [28269cfd85].

Note: Installing Tcllib and Tcllibc both in one command only through the Makefile. New default.

Documented ways for multi-command installation (mainly windows), and separate installation.