[Pdns-users] Compiling 3.0 on OpenBSD

Peter van Dijk peter.van.dijk at netherlabs.nl
Mon Aug 20 19:31:44 UTC 2012


Hello Rickard,

On Aug 20, 2012, at 21:02 , Rickard Dahlstrand wrote:

> Installing a new server and with all the OpenBSD-patches I thought I give an unpatched version a try. After trying:
> 
> ./configure CXXFLAGS=-pthread --with-modules='gmysql pipe'
> cd modules ; make ; cd ..
> cd pdns/ext/polarssl; make; cd ../../..
> 
> I get this:
> 
> misc.o(.text+0x1877): In function `makeHexDump(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
> : warning: sprintf() is often misused, please use snprintf()
> g++ -DHAVE_CONFIG_H -I. -I..   -Ibackends/bind -I/usr/local/include  -DSYSCONFDIR=\"/usr/local/etc\" -DLIBDIR=\"/usr/local/lib\" -DLOCALSTATEDIR=\"/var/run\" -Ibackends/bind  -I/usr/local/include  -Iext/polarssl-1.1.2/include -DPDNS_ENABLE_LUA -pthread -pthread -MT dnsreplay.o -MD -MP -MF .deps/dnsreplay.Tpo -c -o dnsreplay.o dnsreplay.cc
> In file included from dnsreplay.cc:44:
> dnspcap.hh:15:26: error: net/if_ether.h: No such file or directory
> *** Error code 1
> 
> Any idea what to try out?

Well, you don't need dnsreplay to run pdns_server. Can you try building the individual tools (see variables with PROGRAMS in their name in Makefile) to see what works and what breaks?

As for dnsreplay, I would suggest:
1. checking whether if_ether.h is hiding in a different spot in OpenBSD; if so, edit dnsreplay.cc (line 44, as the error says) and change the path. Try again
2. if you don't have if_ether.h at all, comment out line 44 (/* #include .. */) and see what breaks further down (presumably it will complain about missing some names); then see if those names are in different header files.

I would not be surprised if dnsreplay turns out to be Linux-only, in which case fixing it for OpenBSD might be slightly more work.

On a sidenote, I do not currently recall (and am a bit too busy to check) whether the patch referred to earlier in this thread has been fully applied. If you run into trouble with more important modules, please check whether the patch has anything helpful in it still :)

Thank you for checking this. OpenBSD is almost completely off our radar but I know we do have a bunch of users on it!

Kind regards,
-- 
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/




More information about the Pdns-users mailing list