> 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 :-).
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