[nsd-users] Build error of NSD4 on Debian Squeeze

Valentin Bud valentin at databus.ro
Wed Nov 28 10:04:22 UTC 2012


Hi Wouter,

On Wed, Nov 28, 2012 at 10:41:23AM +0100, W.C.A. Wijngaards wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Valentin,
> 
> The routine c_lex and c_in should be from configlexer.o
> this file is compiled from configlexer.c
> this file is generated from configlexer.lex
> 
> That generation is performed with flex.  Something is wrong with lex
> or flex?
> 
> If you delete configlexer.c, configlexer.o, and make again; what is
> the output?  Does configlexer.c start with #include "configyyrename.h" ?

I am going to write the exact steps I did:

```
$ make clean
$ rm configlexer.c (configlexer.o was removed by `make clean`)
$ make
$ head -1 configlexer.c
#include "configyyrename.h"
```

It works :-). NSD4 compiled successfully.

I guess this happened because I have tried to compile NSD4 before
installing flex. So the configlexer.c was created when flex was missing
and did not include `configyyrename.h` or something like that.

Thank you for your time and help Wouter. 
Cheers and Goodwill,
v

> 
> Best regards,
>    Wouter
> 
> 
> On 11/28/2012 10:31 AM, Valentin Bud wrote:
> > Hi Wouter,
> > 
> > On Wed, Nov 28, 2012 at 09:26:27AM +0100, W.C.A. Wijngaards wrote: 
> > Hi Valentin,
> > 
> > On 11/28/2012 08:20 AM, Valentin Bud wrote:
> >>>> Hello World,
> >>>> 
> >>>> I am trying to build NSD4 on Debian Squeeze and I get the 
> >>>> following errors when running `make`.
> > 
> > What is the last word on these lines (not capped at 80 characters)?
> > I want the know 'undefined reference to x' what that function x
> > is.
> > 
> >> Just now I have noticed that the lines are capped at 80
> >> characters.
> > 
> >> The output of `make` is the following:
> > 
> >> ``` $ pwd /home/wiz/src/nsd/tags/NSD_4_0_0_imp_5 $ make [...
> >> output omitted ...] gcc -g -O2  -o nsd-checkconf answer.o axfr.o
> >> buffer.o configlexer.o configparser.o dname.o dns.o edns.o
> >> iterated_hash.o lookup3.o namedb.o nsec3.o options.o packet.o
> >> query.o rbtree.o radtree.o rdata.o region-allocator.o tsig.o
> >> tsig-openssl.o udb.o udbradtree.o udbzone.o util.o
> >> nsd-checkconf.o strlcat.o strlcpy.o b64_pton.o b64_ntop.o 
> >> -lcrypto configparser.o: In function `c_parse': 
> >> /home/wiz/src/nsd/tags/NSD_4_0_0_imp_5/configparser.c:609:
> >> undefined reference to `c_lex' 
> >> /home/wiz/src/nsd/tags/NSD_4_0_0_imp_5/configparser.c:1358:
> >> undefined reference to `c_lex' options.o: In function
> >> `parse_options_file': 
> >> /home/wiz/src/nsd/tags/NSD_4_0_0_imp_5/options.c:144: undefined 
> >> reference to `c_in' collect2: ld returned 1 exit status make: ***
> >> [nsd-checkconf] Error 1 ```
> > 
> > 
> > If your xterm does not work well; perhaps pipe it to a file.
> > 
> > 
> >> I guess tmux screwed things up when I copied from one pane to
> >> another. Now I have read 3 times the above output just to be sure
> >> it includes what you've asked :-).
> > 
> >> Cheers and Goodwill, v
> > 
> > Best regards, Wouter
> > 
> >>>> ``` $ pwd /home/wiz/src/nsd/tags/NSD_4_0_0_imp_5 $ make [...
> >>>> output omitted ...] gcc -g -O2  -o nsd-checkconf answer.o
> >>>> axfr.o buffer.o configlexer.o configparse acket.o query.o
> >>>> rbtree.o radtree.o rdata.o region-allocator.o tsig.o
> >>>> tsig-opens 4_pton.o b64_ntop.o -lcrypto configparser.o: In
> >>>> function `c_parse': 
> >>>> /home/wiz/src/nsd/tags/NSD_4_0_0_imp_5/configparser.c:609: 
> >>>> undefined reference 
> >>>> /home/wiz/src/nsd/tags/NSD_4_0_0_imp_5/configparser.c:1358: 
> >>>> undefined reference options.o: In function
> >>>> `parse_options_file': 
> >>>> /home/wiz/src/nsd/tags/NSD_4_0_0_imp_5/options.c:144:
> >>>> undefined reference to `c collect2: ld returned 1 exit status
> >>>> make: *** [nsd-checkconf] Error 1 ```
> >>>> 
> >>>> I have done the following:
> >>>> 
> >>>> # Install prerequisites
> >>>> 
> >>>> $ sudo aptitude install subversion libssl-dev autoconf make
> >>>> byacc flex bison build-essential -y
> >>>> 
> >>>> # Clone NSD Repository
> >>>> 
> >>>> $ mkdir $HOME/src $ cd $HOME/src $ svn co 
> >>>> http://www.nlnetlabs.nl/svn/nsd/ nsd
> >>>> 
> >>>> # Generate `configure` program
> >>>> 
> >>>> $ cd $HOME/src/nsd/tags/NSD_4_0_0_imp_5 $ autoreconf
> >>>> --install
> >>>> 
> >>>> # Configure
> >>>> 
> >>>> $ cd $HOME/src/nsd/tags/NSD_4_0_0_imp_5 $ ./configure
> >>>> --prefix=/usr --sysconfdir=/etc/nsd4
> >>>> --localstatedir=/var/run/nsd4 --with-configdir=/etc/nsd4
> >>>> --with-nsd_conf_file=/etc/nsd4/nsd4.conf -
> >>>> -with-pidfile=/var/run/nsd4/nsd4.pid
> >>>> 
> >>>> I could use some help on this matter. Thank you.
> >>>> 
> >>>> Cheers and Goodwill, v 
> >>>> _______________________________________________ nsd-users
> >>>> mailing list nsd-users at NLnetLabs.nl 
> >>>> http://open.nlnetlabs.nl/mailman/listinfo/nsd-users
> >>>> 
> > 
> >> _______________________________________________ nsd-users mailing
> >> list nsd-users at NLnetLabs.nl 
> >> http://open.nlnetlabs.nl/mailman/listinfo/nsd-users
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.18 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
> 
> iQIcBAEBAgAGBQJQtdxDAAoJEJ9vHC1+BF+NmEoQAK6JLcFXGXE1J3qpwS2I3wn5
> ay9WQcLW/kVMyQ2tfp6BHggLj3fJ4FeyotM28B8ma0h5fAuVeVP//DoKyz/g6LLL
> 0oku4xTJy5zd/1RdpX/LCclTRB3zgknv5UowK44SKTa8U8FKaop134084lUTZDQw
> kQ1K/r5NpndpQdQ3rW2D38kbA5W8M8IhSdI5u4PlN+iRyr2WsdgLw5RyrRU4meHW
> JR3wIqjl6xAr3mce0pcwInANrgwRT5ytfOt1o7ymaXZDZh4ERUkraz9HY3AZHwmg
> 5508J1tIVo+eHTKQVQMnyz5zd5RFFLQY+TFtKCDu31RKqcJ+sdUuxGsJryzchee7
> 0G7Aw1w1wv21nJsIrockHbHy4q5LaBgE1pb1+HZZJvH4HDIkAIUC6amA/hIZrwZE
> q73oUnNfD2vXNxhiVsvC5nRC40Aa6R3l4ic5+HDmjFELxzkvwskar2pX8FDwSA3L
> rQn32ZHFhLFS2FhDVk01cMp5iuwNRCfsZZs28lwRkZntam/EZfA9RtX0Ssc+D07M
> G0Ku1MPl9msHclzpNi7tHJLSoAlnVrpUId18eCIbX27HvFsTtxg8w89bXvcy8XsM
> YRLHHKFGnz4LHnStbXaUAeqy0KfTR51jvd/PVs+LpkXn6l2+t+OtMfE9gLyLj6OU
> AohbuFNfx2xQLfc+SRyv
> =+bN2
> -----END PGP SIGNATURE-----



More information about the nsd-users mailing list