So, for what it's worth, it ends up that it will work with either the
direct linking as I was trying or with LoadFile
The problem had to do with my downloading SQLite and compiling - when
I deleted all those resulting files and installed the OpenBSD package
for SQLite, it worked fine. So there must be some platform-specific
compile tweaks needed for that library.
-- devin
On Dec 7, 2009, at 9:24 PM, Nick Kew wrote:
On 7 Dec 2009, at 23:44, Devin Ceartas wrote:
apxs -cia -L/usr/local/lib -I/home/devin mod_hello.c
/* Works Fine, prints "hello world" */
apxs -cia -L/usr/local/lib -I/home/devin -lsqlite3 mod_hello.c
/* compiles but dies on apache load */
The platform is OpenBSD 4.6 with the platform's version of Apache
1.3 and SQLite 3.6.20 downloaded from the SQLite site and compiled
from source
Don't link libsqlite.
apr_dbd may already be loading libsqlite. If for instance you've
got more than one libsqlite installed and the two load different
versions, segfault is the expected outcome.
If apache DBD API doesn't meet your needs, you can invoke
sqlite directly, but use LoadFile so sysops can load libsqlite if
and only if it's not already loaded.
--
Nick Kew