› Clovertech Forums › Read Only Archives › Cloverleaf › General › Building sqlite
Cloverleaf 5.4.1
I am looking at building SQLite on this platform and linking with Cloverleaf.
Has anybody built this and is willing to share the gotchas.
Thanks.
We are running on AIX 5.3.
I can build the SQLite core and it works with the Unix shell.
I can, with a few Makefile tweeks, build the TEA , but this ‘core’ dumps when I try the tcl load
tcl>load ./libsqlite3.3.8.so
Segmentation fault(coredump)
Any ideas?
Thanks.
410-787-6777
thanks,
Gary
For Documentation:
Wiki:
Mailing List:
Gary
Remember that Tcl will search your Tcl path and one level below when searching for packages. To see your Tcl path echo $::auto_path from within Tcl (hcitcl).
If I want a package to be available to all sites in a root, I will usually put in under $HCIROOT/tcl/lib. For example, you could crete a directory like: $HCIROOT/tcl/lib/sqlite
If you want it for a specific site, create a subdirectory under your site tclprocs directory. For example, I usually do something like: $HCISITEDIR/tclprocs/lib.
Then your directory from above must have a pkgIndex.tcl file with reference to the .so file. I would put the libsqlite3.so , or whatever name, in the same directory as the pkgIndex.tcl file.
You can build the pkgIndex.tcl file either by hand or with a script. If you want one that just includes the sqlite library, simply edit a file named pkgIndex.tcl and put the following:
package ifneeded sqlite 3.3.8
]
Change name of .so file to match what you have. Once complete, go to a hcitcl prompt anywhere in the site and execute:
package require sqlite
It should return: 3.3.8
Good luck with it. It is worth the effort!
I’ve attached a document outlining what we did to get SQLite on our AIX box (I pretty much just downloaded the libsqlite3.3.8.so file and ran the mkpkgindex command).
Thanks.
For our AIX box, I pulled a compiled version from
It looks like there are hp-unix versions, and you may be able to pull one down from
Hope this helps.
Jim Cobane
Henry Ford Health
Cloverleaf 5.6
I’m attempting to build my first sqlite interface. It is very simple and have followed Jim’s instructions on here as well as help from Healthvision support in getting sqlite on my server. However, I wrote a script based on Jim’s template on here, and on my first command:
sqlite DBCMD $dbName
I get an error that says “out of memory”. This is a new test box with way more than enough memory to run anything. Am I missing something?
Thanks…
Tom Rioux
Cloverleaf 5.6
I’m attempting to build my first sqlite interface. It is very simple and have followed Jim’s instructions on here as well as help from Healthvision support in getting sqlite on my server. However, I wrote a script based on Jim’s template on here, and on my first command:
sqlite DBCMD $dbName
I get an error that says “out of memory”. This is a new test box with way more than enough memory to run anything. Am I missing something?
Thanks…
Tom Rioux
Could i possibly look at the could used to populate the database with patient demographics. We are starting to look at sqlite as a possible solution to one of our needs solution.
John Mercogliano
Sentara Healthcare
Hampton Roads, VA
I have successfully used sqlite on older versions of Cloverleaf running Tcl 8.3. I simply install the command line version of sqlite in my path, e.g., $HCISITEDIR/bin. Then simply exec it from a Tcl script like:
set rtn [exec sqlite “
You might want to put inside a catch statement just in case
I’ll dig-up the code and throw it up here (with all the usual disclaimers; i.e. “as is”, “use at your own risk”, 🙂 ). Stay tuned.
Jim Cobane
Henry Ford Health
Hope this helps.
Jim Cobane
Henry Ford Health