I have a Solaris 2.6 machine with DB library v3.1.17 I'm trying to
build Apache 1.3.22 on. Actually it's been running fine for many
months without mod_auth_db, but I now need to enable mod_auth_db
so I'm adding the DB library and building a new Apache installation.
But when I actually install and run it, it can't resolve the
db_create symbol, rather like it never linked that library in.
Here's my new configure script, to which I added the
"--enable-module=auth_db" line. The rest is from the previous
./configure --with-layout=opt \
Which results in the following output:
Configuring for Apache, Version 1.3.22
+ using installation path layout: opt (config.layout)
Creating Configuration.apaci in src
+ enabling mod_so for DSO support
Creating Makefile in src
+ configured for Solaris 260 platform
+ setting C pre-processor to /opt/gcc/bin/gcc -E
+ checking for system header files
+ adding selected modules
o rewrite_module uses ConfigStart/End
enabling DBM support for mod_rewrite
o dbm_auth_module uses ConfigStart/End
o db_auth_module uses ConfigStart/End
using Berkeley-DB/3.x for mod_auth_db (-ldb)
+ using builtin Expat
+ enabling generation of Apache core as DSO
+ using -ldl for vendor DSO support
+ checking sizeof various data types
+ doing sanity check on compiler and options
Creating Makefile in [...blah blah...]
So it looks good, no? It knows which library to install, etc.
Builds fine too. I see that httpd and libhttpd.ep are both linked
to -ldb. The DB library on this system is static, no shared
one exists on it.
But when I install Apache and run it with the mod_auth_db module
activated with LoadModule and AddModule, I get:
$ /opt/apache/sbin/apachectl configtest
Syntax error on line 228 of /opt/apache/conf/httpd.conf:
Cannot load /opt/apache/libexec/mod_auth_db.so into server: ld.so.1: /opt/apache/sbin/httpd: fatal: relocation error: file /opt/apache/libexec/mod_auth_db.so: symbol db_create: referenced symbol not found
Now the other thing is, I figured hey, why not just compile the
module in static? But no, when I add "--disable-shared=auth_db"
to my configure args (see above), it doesn't compile in mod_auth_db
(or so says "httpd -l").
If you know a workaround please send me e-mail.