compiling bind without xml support

2010-01-20 Thread Vincent Poy
Greetings everyone:

How do I configure bind 9.5 and newer without xml support in FreeBSD as what
happens is named fails to start in FreeBSD from /etc/rc.conf as it basically
says:

/libexec/ld-elf.so.1: Shared object "libxml2.so.9" not found, required by
"named"

It runs fine when I do /etc/rc.d/named start

I'm compiling bind as follows:
./configure --prefix=/usr --sysconfdir=/etc/namedb --with-openssl
make
make install

Is there a way to make it run from /etc/rc.conf with the xml support or do I
have to somehow disable the xml statistics support as I looked in README but
it only mentions that 9.5 added a experimental XML statistics server but
doesn't say how to disable it.

named is run as:

/usr/sbin/named -u bind -t /var/named

vi...@bigbang [1:26pm][~] >> ldd /usr/sbin/named
/usr/sbin/named:
libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x28224000)
libz.so.2 => /lib/libz.so.2 (0x2832)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x2833)
libm.so.3 => /lib/libm.so.3 (0x2841d000)
libc.so.6 => /lib/libc.so.6 (0x28433000)

Thanks!

Cheers,
Vince
Vincent Poy, Ph.D. - Astrophysics
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Re: compiling bind without xml support

2010-01-20 Thread Mark Andrews

In message <429af92e1001201328h2f2c6ef8s6074d706e3eb1...@mail.gmail.com>, 
Vincent Poy writes:
> --===4861971564982172998==
> Content-Type: multipart/alternative; boundary=000e0cd6afe0e73eec047d9f4336
> 
> Greetings everyone:
> 
> How do I configure bind 9.5 and newer without xml support in FreeBSD as what
> happens is named fails to start in FreeBSD from /etc/rc.conf as it basically
> says:
> 
> /libexec/ld-elf.so.1: Shared object "libxml2.so.9" not found, required by
> "named"
> 
> It runs fine when I do /etc/rc.d/named start
> 
> I'm compiling bind as follows:
> ./configure --prefix=/usr --sysconfdir=/etc/namedb --with-openssl
> make
> make install
> 
> Is there a way to make it run from /etc/rc.conf with the xml support or do I
> have to somehow disable the xml statistics support as I looked in README but
> it only mentions that 9.5 added a experimental XML statistics server but
> doesn't say how to disable it.
> 
> named is run as:
> 
> /usr/sbin/named -u bind -t /var/named
> 
> vi...@bigbang [1:26pm][~] >> ldd /usr/sbin/named
> /usr/sbin/named:
> libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x28224000)
> libz.so.2 => /lib/libz.so.2 (0x2832)
> libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x2833)
> libm.so.3 => /lib/libm.so.3 (0x2841d000)
> libc.so.6 => /lib/libc.so.6 (0x28433000)
> 
> Thanks!
> 
> Cheers,
> Vince
> Vincent Poy, Ph.D. - Astrophysics

I suspect the problem is that named is being started before
ldconfig is being called so /usr/local/lib is not being
searched.

You could change the "-L/usr/local/lib" before -lxml2
to "-Wl,-rpath,/usr/local/lib" in bin/named/Makefile,
remove bin/named/named then re-run make to embed
/usr/local/lib into the search path built into named
for the loader.

Alternatively add
LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH
to /etc/rc.conf/named so that /usr/local/lib will
always be searched.

If you want to disable xml add --with-libxml2=no
to configure's arguments.

Mark
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users