cannot load sqlite3-tcl

Bug #996644 reported by Ole Streicher on 2012-05-08
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
sqlite (Ubuntu)
Undecided
Unassigned

Bug Description

When I try to load sqlite3 or sqlite from tcl, I get some errors:

$ tclsh8.5
% package require sqlite
error reading package index file /usr/lib/sqlite/pkgIndex.tcl: expected version number but got "0.0."
can't find package sqlite
% package require sqlite3
error reading package index file /usr/lib/sqlite/pkgIndex.tcl: expected version number but got "0.0."
can't find package sqlite3

There is a similar bug in Debian, http://bugs.debian.org/483993
When I change the "0.0." in /usr/lib/sqlite/pkgIndex.tcl to "2.0", I don't get the first error line, and sqlite seems to be loaded. However, sqlite3 does not load then.

This is ubuntu 12.04, libsqlite-tcl 2.8.17-7fakesync1build1, sqlite3-tcl 3.7.9-2ubuntu1.

Ole Streicher (olebole) wrote :

This may be fixed by changing the file /usr/lib/sqlite/pkgIndex.tcl to

package ifneeded sqlite 2.0 [list load [file join $dir libtclsqlite.so.0] sqlite]

Ole Streicher (olebole) wrote :

Seems to be solved in 12.10

Changed in sqlite (Ubuntu):
status: New → Fix Committed
hamish (hamish-b) wrote :

Nope, it is not fixed. I still see it in Lunutu 13.04 and we just had a user report seeing it in 12.10.

"""
$ sudo apt-get install libsqlite-tcl
$ tclsh8.5
% package require sqlite
error reading package index file /usr/lib/sqlite/pkgIndex.tcl: expected version number but got "0.0."
can't find package sqlite
"""

thanks,
Hamish

Changed in sqlite (Ubuntu):
status: Fix Committed → Confirmed
Devin Eyre (devin-7) wrote :

The fix for libsqlite3-tcl is to put this line:
package ifneeded sqlite3 3.7.9 [list load [file join $dir libtclsqlite3.so]]

in the file /usr/lib/tcltk/sqlite3/pkgIndex.tcl

Andrew Piskorski (atp) wrote :

This bug still has NOT been fixed in Ubuntu 12.04.3. Why not? It is a very simply fix!

The original (bad) contents of /usr/lib/sqlite/pkgIndex.tcl are:

package ifneeded sqlite 0.0. [list load [file join $dir libtclsqlite.so.0] sqlite]

Simply changing the "0.0." string to "2" fixes the problem. So in other words, the new fixed version is:

package ifneeded sqlite 2 [list load [file join $dir libtclsqlite.so.0] sqlite]

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers