parray command missing
(1) By Vetelko (vetelko) on 2025-01-12 10:01:40 [source]
When I compile wapptclsh using included Makefile, parray command is missing. Also auto_path isn't working. Is there some way to make it available or at least explain why is that, please?
./wapptclsh: invalid command name "parray"
while executing
"parray"
My Makefile looks like this:
CFLAGS = -Os -static
CC = cc $(CFLAGS)
OPTS = -DSQLITE_ENABLE_DESERIALIZE
TCLDIR ?= /home/vetelko/app/tcl2
TCLLIB = $(TCLDIR)/lib/libtcl90.a -lm -lz -lpthread
TCLINC = $(TCLDIR)/include
TCLSH = $(TCLDIR)/bin/tclsh9.0
all: wapptclsh
wapptclsh: wapptclsh.c
$(CC) -I. -I$(TCLINC) -o $@ $(OPTS) wapptclsh.c $(TCLLIB)
wapptclsh.c: wapptclsh.c.in wapp.tcl wapptclsh.tcl tclsqlite3.c mkccode.tcl
$(TCLSH) mkccode.tcl wapptclsh.c.in >$@
clean:
rm -f wapptclsh wapptclsh.c
I compiled tcl9.0 statically and the parray command is available there.
./configure --prefix=/home/vetelko/app/tcl2 --enable-shared=no CFLAGS=-pthread && make && make install
V.
(2) By D. Richard Hipp (drh) on 2025-01-12 19:40:54 in reply to 1 [link] [source]
There probably is a way to make wapptclsh pick up the tcl library, but I don't know what that is off-hand. If you can suggest patches on how to get that working, we will be grateful.
(3) By Vetelko (vetelko) on 2025-01-13 05:41:33 in reply to 2 [link] [source]
Thank you for your reply. Unfortunately, I am not a C programmer, so I don't even understand why functions like lrange
or regexp
are available, while auto_execok
or parray
are not. I thought they were all part of the static libtcl90.a
.
For now, my only solution is to use the standard static tclsh
with sqlite3
built-in and source wapp.tcl
instead of using the compiled wapptclsh
:(
V.