Problem using the newest Botan

Spain, Dr. Jeffry A. spainj at countryday.net
Sat Feb 11 04:32:09 UTC 2012


>> Not fully examined this (and I don't have an environment with botan 1.10), but is this the same problem as this one?
>> http://bind10.isc.org/ticket/1640

>Yes, it looks like it is.
> FWIW, taking the earlier suggestion and going to Botan 1.8.13 seems to fix the problem, at least on two recent versions of BIND 10.
> So, the problem is probably in the newest Botan (that it is writing its files with funky names), not with BIND.

Jinmei: I can't reproduce this on Ubuntu Oneiric building botan 1.10.1 from source (http://botan.randombit.net/files/Botan-1.10.1.tgz). I still think this problem is related to ticket 1640, and would like to provide the following thoughts.

The relevant output from bind10 configure on my test system is:

checking for pkg-config... /usr/bin/pkg-config
checking Checking botan version with pkg-config botan-1.10... found
checking botan/botan.h usability... yes
checking botan/botan.h presence... yes
checking for botan/botan.h... yes
checking for Botan library... yes

The presence of the pkg-config package may be the key to my success. With this package in place, I believe bind10 configure is referring to the file /usr/lib/pkgconfig/botan-1.10.pc to get accurate include and library information for botan 1.10.1. Without pkg-config, I believe bind10 configure may try unsuccessfully to find botan using its own internal logic, which includes referring to the executable /usr/bin/botan-config.

Unfortunately from botan 1.8.13 to botan 1.10.1, /usr/bin/botan-config has been renamed to /usr/bin/botan-config-1.10. Also the include directory has changed from /usr/include/botan to /usr/include/botan-1.10/botan. This probably accounts for the error messages that Paul is seeing "configure: error: /usr/local/bin/botan-config not found" and also "checking for botan-config... no" and "checking for botan/botan.h... no".

Maybe pkg-config should be made a prerequisite for bind10, although I have no idea whether or not it is available on all systems on which you contemplate bind10 being built.

The contents of file /usr/lib/pkgconfig/botan-1.10.pc on my test system are as follows:

prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/botan-1.10

Name: Botan
Description: Multi-platform C++ crypto library
Version: 1.10.1

Libs: -L${libdir} -lbotan-1.10
Libs.private: -lbz2 -lcrypto -ldl -lgmp -lpthread -lrt -lz
Cflags: -I${includedir}


Here are the steps I took to successfully build a bind10 recursive resolver. First I deployed an Ubuntu Oneiric x64 virtual machine and applied all current patches. Then I executed the following:
apt-get install build-essential autoconf libtool pkg-config
apt-get install libboost-all-dev
apt-get install python3-dev
apt-get install libsqlite3-dev
wget http://downloads.sourceforge.net/project/log4cplus/log4cplus-stable/1.0.4/log4cplus-1.0.4.tar.bz2
tar xjf log4cplus-1.0.4.tar.bz2
cd log4cplus-1.0.4
./configure --prefix=/usr
make
make install
cd ..
wget http://botan.randombit.net/files/Botan-1.10.1.tbz
tar xjf Botan-1.10.1.tbz
cd Botan-1.10.1
apt-get install libbz2-dev libgmp3-dev libssl-dev zlib1g-dev hardening-wrapper
./configure.py --prefix=/usr --cc=gcc --os=linux --with-bzip2 --with-gnump --with-openssl --with-zlib --cpu=x86_64
make
make check
make install
cd ..
wget http://ftp.isc.org/isc/bind10/devel-20120119/bind10-devel-20120119.tar.gz
tar xzf bind10-devel-20120119.tar.gz
cd bind10-devel-20120119
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
make install
bind10 &
bindctl
root
bind10
config remove Boss/components b10-xfrout
config remove Boss/components b10-xfrin
config remove Boss/components b10-auth
config add Boss/components b10-resolver
config set Boss/components/b10-resolver/special resolver
config set Boss/components/b10-resolver/kind needed
config set Boss/components/b10-resolver/priority 10
config commit
quit
dig @localhost countryday.net
(dig reports the address 66.246.215.247)

I have snapshots of my virtual machine with bind10/botan1.8.13 and bind10/botan1.10.1 should you want any further testing done in this arena.

Note that botan 1.10.0 will be the standard botan package distributed with Ubuntu Precise Pangolin (12.04LTS) due for release at the end of April, so that will provide another opportunity for testing this and other build issues.

Jeffry A. Spain
Network Administrator
Cincinnati Country Day School



More information about the bind10-users mailing list