Where should --with-ldns point to on FreeBSD 8.2 systems

Greetings. I'm building various versions of Unbound on a FreeBSD system that has ldns installed from packages. Thus, it goes into /usr/local.

Most versions of Unbound find it just fine even without --with-ldns, but many don't. The ones that don't are:

unbound-0.0
unbound-0.1
unbound-0.2
unbound-0.3
unbound-0.9
unbound-0.9-20080115
unbound-1.4.11rc1
unbound-1.4.12
unbound-1.4.12rc1
unbound-1.4.13
unbound-1.4.13p2
unbound-1.4.13rc1
unbound-1.4.13rc2
unbound-1.4.14
unbound-1.4.14rc1
unbound-1.4.15rc1

I tried "--with-ldns=/usr/local/lib", but they all fail the same way. In order to make those build, what do I want --with-ldns= to point to?

/usr/local/lib contains:
-rw-r--r-- 1 root wheel 1161896 Feb 2 2011 libldns.a
-rw-r--r-- 1 root wheel 946 Feb 2 2011 libldns.la
lrwxr-xr-x 1 root wheel 12 Feb 2 2011 libldns.so -> libldns.so.1
-rwxr-xr-x 1 root wheel 799978 Feb 2 2011 libldns.so.1

--Paul Hoffman

Zitat von Paul Hoffman <paul.hoffman@vpnc.org>:

Greetings. I'm building various versions of Unbound on a FreeBSD system that has ldns installed from packages. Thus, it goes into /usr/local.

Most versions of Unbound find it just fine even without --with-ldns, but many don't. The ones that don't are:

unbound-0.0
unbound-0.1
unbound-0.2
unbound-0.3
unbound-0.9
unbound-0.9-20080115
unbound-1.4.11rc1
unbound-1.4.12
unbound-1.4.12rc1
unbound-1.4.13
unbound-1.4.13p2
unbound-1.4.13rc1
unbound-1.4.13rc2
unbound-1.4.14
unbound-1.4.14rc1
unbound-1.4.15rc1

I tried "--with-ldns=/usr/local/lib", but they all fail the same way. In order to make those build, what do I want --with-ldns= to point to?

/usr/local/lib contains:
-rw-r--r-- 1 root wheel 1161896 Feb 2 2011 libldns.a
-rw-r--r-- 1 root wheel 946 Feb 2 2011 libldns.la
lrwxr-xr-x 1 root wheel 12 Feb 2 2011 libldns.so -> libldns.so.1
-rwxr-xr-x 1 root wheel 799978 Feb 2 2011 libldns.so.1

ldns, maybe something like ldns-dev needs to be installed? This reminds me that until recently (1.4.11??) a ldns tarball was shipped within unbound source and used in case ldns was not found otherwise.

Regards

Andreas

This is sad, if true. Does anyone have any definitive answer on this? It seems odd and unfortunate that the same ./configure string works fine with many versions, but not all (and not recent).

--Paul Hoffman

Have you tried --with-ldns=/usr/local

I am quite sure that --with-ldns=/usr/local/lib is wrong:

AC_ARG_WITH(ldns, AC_HELP_STRING([--with-ldns=PATH],
        [specify prefix of path of ldns library to use]),
        [
        if test "$withval" != "yes"; then
                if test "$withval" != "/usr" -a "$withval" != ""; then
                        CPPFLAGS="-I$withval/include $CPPFLAGS"
                        LDFLAGS="-L$withval/lib $LDFLAGS"
                        ACX_RUNTIME_PATH_ADD([$withval/lib])
                fi
                ldnsdir="$withval"
                AC_SUBST(ldnsdir)
        fi
])

O.

I had not, but I have now, and it still fails the same way as wth /usr/local/lib. ./configure ends with:

checking for ldns_key_EVP_load_gost_id... no
checking for ldns_key_EVP_unload_gost... no
checking for ldns/ldns.h... yes
configure: error: ldns library is not recent, update the ldns library, install it into system lib dir or use --with-ldns=path to other location. The --with-ldns can point to the make-dir of ldns. Package libldns or download source http://www.nlnetlabs.nl/projects/ldns

Note that it seems to fine ldns.h, but is objecting at the step after it.

More clues appreciated.

--Paul Hoffman

Zitat von Paul Hoffman <paul.hoffman@vpnc.org>:

Have you tried --with-ldns=/usr/local

I had not, but I have now, and it still fails the same way as wth /usr/local/lib. ./configure ends with:

checking for ldns_key_EVP_load_gost_id... no
checking for ldns_key_EVP_unload_gost... no
checking for ldns/ldns.h... yes
configure: error: ldns library is not recent, update the ldns library, install it into system lib dir or use --with-ldns=path to other location. The --with-ldns can point to the make-dir of ldns. Package libldns or download source http://www.nlnetlabs.nl/projects/ldns

Note that it seems to fine ldns.h, but is objecting at the step after it.

More clues appreciated.

You might want to build unbound with ldns static linked in. For this use the latest ldns from www.nlnetlabs.nl and do ./configure --disable-shared & make.
Then point unbound to use it with ./configure --with-ldns=<your ldns

--disable-shared

This way you don't get any dependencies on system ldns .

Regards

Andreas

That's better. It finds the library, but it's too old.

Either you need newer library from ports (if available) or download,
compile and install into your custom location (it could be the unbound
dir).

E.g. roughly do:

cd unbound-x.y.z
wget http://www.nlnetlabs.nl/downloads/ldns/ldns-1.6.12.tar.gz
tar -xzf ldns-1.6.12.tar.gz
cd ldns-1.6.12
./configure --disable-shared && make
cd ..
./configure --with-ldns=ldns-1.6.12 --disable-shared <rest-of-configure-options>
make

P.S.: --disable-shared is optional and you can have shared libraries
if you install ldns along unbound where dynamic linker could find it.

That works... much better, but still not completely. It now fails on:
unbound-0.0
unbound-0.1
unbound-0.2
unbound-0.3
unbound-0.6
unbound-1.1.0
unbound-1.1.1
unbound-1.2.0
unbound-1.2.1
unbound-1.2.1rc1
unbound-1.4.11rc1

This means that the old way worked for the following, but the new doesn't:
unbound-0.6
unbound-1.1.0
unbound-1.1.1
unbound-1.2.0
unbound-1.2.1
unbound-1.2.1rc1

I'll try to find something in common among those and report back.

--Paul Hoffman