[Xapian-discuss] TCL -> Xapian bindings problem?
Michael Schlenker
schlenk at uni-oldenburg.de
Fri Oct 22 14:56:12 BST 2004
Olly Betts wrote:
> On Thu, Oct 21, 2004 at 10:02:30PM +0200, Michael Schlenker wrote:
>
>>(A call to Tcl_PkgProvide must be inside the Swig generated binding if
>>there isn't a SWIG option to just set the version).
>
>
> Actually, there is:
>
> swig -pkgversion 0.8.3 [...]
>
> The code in CVS now sets this, creates pkgIndex.tcl and installs stuff
> in a xapian0.8.3 subdirectory of the tcl library directory (which seems
> to be the convention from looking at what other packages do).
Typical convention for Tcl packages not bundled with core Tcl (bundled
with core tcl are msgcat, http, registry, dde), is to install them in a
subdir of $auto_path, the package search path, usually /usr/lib, but
putting them in the Tcl dir (for example /usr/lib/tcl8.4/xapian0.8.3)
works also.
The reason for this is simple, for Tcl you _do not_ have to recompile an
extension just to use a newer core Tcl version, if it uses the TCL_STUBS
interface (i don't know if swig sets this automatically, but it could
be). This means if you can compile xapian against a Tcl 8.1 and have the
package it loads into Tcl 8.1, 8.2, 8.3, 8.4 and will load into the
upcoming 8.5 (about six years of binary compatibility). So stubbed
packages residing in /usr/lib can be found and used by all installed Tcl
versions, while packages put under /usr/lib/tcl8.4/packagename are just
not seen by the package mechanism of a Tcl 8.3.
Michael
More information about the Xapian-discuss
mailing list