On Fri, 23 Dec 2022 23:46:33 -0500 (EST)
Stuart Cassoff <[email protected]> wrote:

> Heh. Small correction: Stub-enabled extensions can be built in 8.5 and 
> loaded into 8.6 no problem.
> 
> Looks like preloading libtcl works.
> $ LD_PRELOAD=/usr/local/lib/libtcl86.so.1.13  python3.9
> >>> import tkinter
> >>> tcl = tkinter.Tk(useTk=False)
> >>> tcl.eval('load /usr/local/lib/libdb_tcl.so.6.0');  
> ''
> 
> The port doesn't install a pkgIndex.tcl file, so [package require] won't 
> work,
> and you really want to simply [package require] things.
> 
> Here is a patch (also attached in case of mail mangling) that 
> stub-enables both v3 and v4,
> creates and installs pkgIndex.tcl files, and is a tad less noisy.  The 
> v4 test results look good.
> 
> The main package needs a REVISION bump?
> 
> This looks like a really old version of bdb.
> 
> 
> Stu
> 
> 
> With both installed:
> $ for t in 5 6; do for d in '' 4.6 1.0; do echo "puts [package provide 
> Tcl]\\\t[package require Db_tcl $d]\\\t$d" | tclsh8.$t; done; done
> 8.5.19  4.6
> 8.5.19  4.6     4.6
> 8.5.19  1.0     1.0
> 8.6.13  4.6
> 8.6.13  4.6     4.6
> 8.6.13  1.0     1.0
> 
> $ python3.9
> >>> import tkinter
> >>> tcl = tkinter.Tk(useTk=False)
> >>> tcl.eval('package require Db_tcl')  
> '4.6'
> 
> $ python3.9
> >>> import tkinter
> >>> tcl = tkinter.Tk(useTk=False)
> >>> tcl.eval('package require Db_tcl 4.6')  
> '4.6'
> 
> $ python3.9
> >>> import tkinter
> >>> tcl = tkinter.Tk(useTk=False)
> >>> tcl.eval('package require Db_tcl 1.0')  
> '1.0'
> 
> 
snip patches etc.

I now have version of application that works via Tcl API on 7.2 by:

LD_PRELOAD=/usr/local/lib/libtcl86.so.1.13  python3.9 -m ...

the job complains it's only got libtcl86.so.1.12 but uses it successfully 
anyway.

On another box db v4 was built from ports (7.2 not snapshot) with the patches 
applied.

python3.9 -m ... works fine with no warnings about libtcl86.so version.

Neither bsddb3 nor berkeleydb installed from PyPi, and py3-bsddb3 OpenBSD 
package not installed either.

Thanks for all that stuff.

Will the db patches be applied by 7.3 release time?

Reply via email to