webalizer-2.01-10をインストール

Fedra6にwebalizer-2.01-10をインストールした顛末です。

You must have a V1.85 compatable DB libraryっていわれる

ホスト名を逆引きしたいので

CODE:
  1. ./configure  --with-language=japanese --enable-dns
  2. とすると
  3. [code]
  4. [root@vesalius webalizer-2.01-10]# ./configure  --with-language=japanese --e
  5. nable-dns
  6. loading cache ./config.cache
  7. checking for gcc... (cached) gcc
  8. checking whether the C compiler (gcc  ) works... yes
  9. checking whether the C compiler (gcc  ) is a cross-compiler... no
  10. checking whether we are using GNU C... (cached) yes
  11. checking whether gcc accepts -g... (cached) yes
  12. checking whether ln -s works... (cached) yes
  13. checking for a BSD compatible install... (cached) /usr/bin/install -c
  14. checking how to run the C preprocessor... (cached) gcc -E
  15. checking whether char is unsigned... (cached) no
  16. checking for dbopen... (cached) no
  17. checking for library containing dbopen... (cached) no
  18. configure: warning: You must have a V1.85 compatable DB library!
  19. configure: warning: DNS lookup code will be disabled...
  20. checking for socket... (cached) yes
  21. checking for sys/socket.h... (cached) yes
  22. checking for main in -lnsl... (cached) yes
  23. checking for main in -l44bsd... (cached) no
  24. checking for main in -lm... (cached) yes
  25. checking for main in -lz... (cached) yes
  26. checking for gzrewind in -lz... (cached) yes
  27. checking for main in -lpng... (cached) yes
  28. checking for gdImagePng in -lgd... (cached) yes
  29. checking for gd.h... (cached) /usr/include
  30. checking for getopt.h... (cached) yes
  31. checking for math.h... (cached) yes
  32. checking default config dir... (cached) /etc
  33. checking for language file... yes - japanese
  34. creating ./config.status
  35. creating Makefile
  36. linking ./lang/webalizer_lang.japanese to webalizer_lang.h
  37. [root@vesalius webalizer-2.01-10]#

ってなる。コンパイルもでき、実行もできるのだけど、DNSCacheDNSChildrenの設定をしてあると

Warning: Invalid keyword 'DNSCache' (/etc/webalizer.conf)
Warning: Invalid keyword 'DNSChildren' (/etc/webalizer.conf)

っていわれてしまい、逆引きもできていない。configure時の

configure: warning: You must have a V1.85 compatable DB library!
configure: warning: DNS lookup code will be disabled...

の警告に起因しているみたいだ。Berkeley DBの1.85を用意せよとおっしゃる。なので、rpmから

  • db4-devel-4.3.29-9.fc6
  • db4-4.3.29-9.fc6

を入れておく

Berkeley DBを使ってコンパイル

rpmから入れたBerkeleyDBを使うように

./configure  --with-language=japanese --enable-dns --with-dblib=/usr/lib -with-db=/usr/include

とすると、configure時の警告は消えるが、今後は、コンパイルが通らない

dns_resolv.c: In function `resolve_dns':
dns_resolv.c:149: warning: passing arg 2 of pointer to function from incompatible pointer type
dns_resolv.c:149: error: too few arguments to function
dns_resolv.c: In function `dns_resolver':
dns_resolv.c:218: warning: implicit declaration of function `dbopen'
dns_resolv.c:218: warning: assignment makes pointer from integer without a cast
dns_resolv.c:228: error: too few arguments to function
dns_resolv.c:235: error: too few arguments to function
dns_resolv.c:275: warning: passing arg 2 of pointer to function from incompatible pointer type
dns_resolv.c:275: error: too few arguments to function
dns_resolv.c:329: error: too few arguments to function
dns_resolv.c:359: error: too few arguments to function
dns_resolv.c: In function `db_put':
dns_resolv.c:745: warning: passing arg 2 of pointer to function from incompatible pointer type
dns_resolv.c:745: error: too few arguments to function
dns_resolv.c: In function `open_cache':
dns_resolv.c:793: warning: assignment makes pointer from integer without a cast
dns_resolv.c:801: error: too few arguments to function
dns_resolv.c:807: error: too few arguments to function
dns_resolv.c: In function `close_cache':
dns_resolv.c:829: error: too few arguments to function
make: *** [dns_resolv.o] Error 1

引数の数が違うとな。/usr/include/db.hdns_resolv.cを見比べるとやっぱり、引数数が合わない。むむむと、dns_resolv.cと睨めっこしていると

C:
  1. ifdef HAVE_DB_185_H
  2. #include <db_185.h>                            /* on my RH6.0 system ?!?   */
  3. #else
  4. #include <db.h>                                /* DB header ****************/
  5. #endif /* HAVE_DB_185_H */

という記述を発見。db_185.hがあるとな。最初の警告にあるV1.85と符合する。db_185.hを探すと/usr/include/db4/にヘッダファイルを発見。これを読ませればいいんだな。ということで、

C:
  1. CFLAGS='-DHAVE_DB_185_H' ./configure  --with-language=japanese --enable-dns --with-dblib=/usr/lib --with-db=/usr/include

としてコンパイル。これでコンパイル時の問題と実行時の問題が無事解決です。

Trackback URL

Leave a comment

Your comment