You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Guillaume Filion <gf...@logidac.com> on 2002/07/17 16:37:37 UTC

Bug in APXS?

[This message was originally posted to modssl-users list, but it's 
actually more appropriate here.]

Hi all,

When trying to compile mod_ssl-2.8.10-1.3.26 as a DSO (APXS) module 
on my Debian box, I get two problems:
First, when doing make, I got:
mod_ssl.h:349:18: ndbm.h: No such file or directory

If I add -I/usr/include/db1/ in pkg.sslmod/Makefile, it compiles and 
installs well, but when I tried to start Apache, I get this:
ali:/www# bin/apachectl start
Syntax error on line 208 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libssl.so into server: 
/usr/local/apache/libexec/libssl.so: undefined symbol: dbm_firstkey
bin/apachectl start: httpd could not be started

I tried to figure out what caused these two problems, here's what I found.

I think that the problem is with apxs, it only gets the CFLAGS 
configured at Apache's compile time. And they are not right for every 
module that one will want to add to Apache.

Take for example ndbm.h which is needed by mod_ssl. When compiling 
mod_ssl statically into Apache, there's no problem since Apache takes 
care of finding where it is located. But when we're building mod_ssl 
with apxs, if Apache's configure has not figured out where ndbm.h is, 
compilation will fail.

Here's an example:

$ tar zxf apache_1.3.26.tar.gz
$ cd apache_1.3.26

$ ./configure --enable-module=so
$ make
$ make install
$ /usr/local/apache/bin/apxs -q CFLAGS
-DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite

apxs does not provide the location of ndbm.h since configure didn't needed it.

$ cd ..
$ rm -rf apache_1.3.26
$ tar zxf apache_1.3.26.tar.gz
$ cd apache_1.3.26

If, for example, I enable mod_rewrite which requires DBM support, 
apxs will "know" where to look for DBM.

$ ./configure --enable-module=so --enable-module=rewrite
[...]
  + adding selected modules
     o rewrite_module uses ConfigStart/End
  + using -ldb1 for DBM support
       enabling DBM support for mod_rewrite
[...]
$ make
$ make install
$ /usr/local/apache/bin/apxs -q CFLAGS
-DLINUX=22 -I/usr/include/db1 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite

This is wrong since not enabling a module that requires DBM doesn't 
mean that I'll never want to add one that does in the future.

I don't see any trivial solution to this problem. The easier one, 
IMHO, is to do every check when mod_so is enabled.

Adding this to src/modules/standard/mod_so.c (in Apache tarball) does 
the trick:

  /* The section for the Configure script:
   * MODULE-DEFINITION-START
   * Name: so_module
   * ConfigStart
   . ./helpers/find-dbm-lib
   * ConfigEnd
   * MODULE-DEFINITION-END
   */

I didn't find any other helper/check to add, but a more experienced 
Apache developer may find more.

What do people think about this? Should I file a bug report? I 
searched http://bugs.apache.org/ and 
http://nagoya.apache.org/bugzilla/ about this but I couldn't find 
anything related...

Best,
GFK's
-- 
Guillaume Filion
Logidac Tech., Beaumont, Québec, Canada - http://logidac.com/
PGP Key and more: http://guillaume.filion.org/      (this will redirect)
PGP Fingerprint: 14A6 720A F7BA 6C87 2331 33FD 467E 9198 3DED D5CA

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Bug in APXS?

Posted by Guillaume Filion <gf...@logidac.com>.
Okay, I submitted bug 11020 about this.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11020

GFK's
-- 
Guillaume Filion
Logidac Tech., Beaumont, Québec, Canada - http://logidac.com/
PGP Key and more: http://guillaume.filion.org/      (this will redirect)
PGP Fingerprint: 14A6 720A F7BA 6C87 2331 33FD 467E 9198 3DED D5CA

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org