From Newsgroup: comp.lang.tcl
Opensuse Linux 15.6, tcl 8.6.17 (self-compiled) and tcl 8.6.12 (Opensuse)
Following the examples from
https://www.magicsplat.com/articles/tdbc.html,
I have trouble using the tdbc::sqlite3 interface in my self-compiled TCL installation:
$ tclsh
% info patchlevel
8.6.17
% package require tdbc::sqlite3
can't find package tdbc::sqlite3
% package require tdbc
1.1.12
% package require sqlite3
3.50.4
As you can see, "package require tdbc::sqlite3" fails, but requiring the individual components succeeds. However, I can't use the
tdbc::DRIVER::* interface:
% tdbc::sqlite3::connection new filename
invalid command name "tdbc::sqlite3::connection"
Using the sqlite3 interface works, but I'd rather use the tdbc::
interface:
% sqlite3 db filename
% db
wrong # args: should be "db SUBCOMMAND ..."
% db close
In comparison, the OS-Installed tclsh works as documented:
$ tclsh8.6
% info patchlevel
8.6.12
% package require tdbc::sqlite3
1.1.3
% tdbc::sqlite3::connection new filename
::oo::Obj17
% ::oo::Obj17 tables
% ::oo::Obj17 close
I can't understand what the problem is in my installation.
The pkgindex-files in the tdbc-related directories are nearly identical (version numbers differ, but the logic is the same), and all the shared
libs seem to be there:
OS-8.6.12
% set auto_path
/usr/lib64/tcl/tcl8.6 /usr/lib64/tcl /usr/lib /usr/share/tcl /usr/share/tcl/tcllib1.21
/usr/lib64/tcl:
drwxr-xr-x 2 root root 4096 Aug 5 14:31 sqlite3.50.2/
drwxr-xr-x 2 root root 4096 Apr 29 2024 tdbc1.1.3/
/usr/lib64/tcl/tdbc1.1.3/
-rw-r--r-- 1 root root 14416 Feb 10 2023 libtdbc1.1.3.so
-rw-r--r-- 1 root root 50494 Feb 10 2023 libtdbcstub1.1.3.a
-rw-r--r-- 1 root root 832 Feb 10 2023 pkgIndex.tcl
-rw-r--r-- 1 root root 3593 Feb 10 2023 tdbcConfig.sh
-rw-r--r-- 1 root root 26703 Feb 10 2023 tdbc.tcl
/usr/lib64/tcl/sqlite3.50.2/
-rwxr-xr-x 1 root root 1508904 Jul 28 11:17 libtclsqlite3.so
-rw-r--r-- 1 root root 108 Jul 28 11:17 pkgIndex.tcl
My self-installed 8.6.17
% set auto_path
... /installation-path/tcltk/linux/lib64/
/installation-path/tcltk/linux/lib64/
drwxr-sr-x 2 aegis aegis 4096 Nov 19 09:27 sqlite3.47.2/ [empty]
drwxr-sr-x 2 aegis aegis 4096 Nov 19 09:27 sqlite3.50.4/
drwxr-sr-x 2 aegis aegis 4096 Nov 19 09:27 tdbc1.1.10/ [empty]
drwxr-sr-x 2 aegis aegis 4096 Nov 19 09:27 tdbc1.1.12/
/installation-path/tcltk/linux/lib64/tdbc1.1.12:
-rw-r--r-- 1 aegis aegis 17296 Nov 24 13:19 libtdbc1.1.12.so
-rw-r--r-- 1 aegis aegis 2822 Nov 24 13:19 libtdbcstub1.1.12.a
-rw-r--r-- 1 aegis aegis 868 Nov 24 13:19 pkgIndex.tcl
-rw-r--r-- 1 aegis aegis 4267 Nov 24 13:19 tdbcConfig.sh
-rw-r--r-- 1 aegis aegis 25942 Nov 24 13:19 tdbc.tcl
/installation-path/tcltk/linux/lib64/sqlite3.50.4:
-rw-r--r-- 1 aegis aegis 1528424 Nov 24 13:19 libsqlite3.50.4.so
-rw-r--r-- 1 aegis aegis 359 Nov 24 13:19 pkgIndex.tcl
Any ideas what to look for?
TNX
R'
--- Synchronet 3.21a-Linux NewsLink 1.2