Hello team,
I experienced the following compile error while installing
knot-1.0.6(tarball from WWW site) on FreeBSD 8.3.
% make
Making all in src
make all-am
/bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -Wall
-Ilibknot -DLIBEXECDIR='"/pub/knot-1.0.6/libexec"'
-DSYSCONFDIR='"/pub/knot-1.0.6/etc"'
-DSBINDIR='"/pub/knot-1.0.6/sbin"' -I/pub/include -I/usr/local/include
-mmmx -msse -msse2 -msse3 -MT utils.lo -MD -MP -MF .deps/utils.Tpo -c -o utils.lo `test -f
'libknot/util/utils.c' || echo './'`libknot/util/utils.c
:
:
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -Wall -Ilibknot
-DLIBEXECDIR=\"/pub/knot-1.0.6/libexec\"
-DSYSCONFDIR=\"/pub/knot-1.0.6/etc\"
-DSBINDIR=\"/pub/knot-1.0.6/sbin\" -I/pub/include -I/usr/local/include -mmmx
-msse -msse2 -msse3 -MT dthreads.lo -MD -MP -MF .deps/dthreads.Tpo -c
knot/server/dthreads.c -fPIC -DPIC -o .libs/dthreads.o
knot/server/dthreads.c: In function 'dt_setaffinity':
knot/server/dthreads.c:864: error: 'cpu_set_t' undeclared (first use in this
function)
knot/server/dthreads.c:864: error: (Each undeclared identifier is reported only once
knot/server/dthreads.c:864: error: for each function it appears in.)
knot/server/dthreads.c:868: warning: implicit declaration of function
'pthread_setaffinity_np'
knot/server/dthreads.c:868: error: expected expression before ')' token
*** Error code 1
Stop in /u1/share/pub/src/knot-dns/knot-1.0.6/src.
*** Error code 1
Stop in /u1/share/pub/src/knot-dns/knot-1.0.6/src.
*** Error code 1
Stop in /u1/share/pub/src/knot-dns/knot-1.0.6.
As an ad-hoc workaround, the following trial works fine.
% cd src
% mv config.h
config.h.ORG
% cp
config.h.ORG config.h
% ed config.h
10154
/HAVE_PTHREAD_SETAFFINITY_NP
#define HAVE_PTHREAD_SETAFFINITY_NP 1
s/^#define/#undef/
s/ 1$//
p
#undef HAVE_PTHREAD_SETAFFINITY_NP
s/^#define/#undef/
s/ 1$//
p
#undef HAVE_PTHREAD_SETAFFINITY_NP
w
10151
q
% diff -u
config.h.ORG config.h
---
config.h.ORG 2012-06-30 14:56:16.000000000 +0900
+++ config.h 2012-06-30 15:08:09.000000000 +0900
@@ -107,7 +107,7 @@
#define HAVE_PSELECT 1
/* Define to 1 if you have the `pthread_setaffinity_np' function. */
-#define HAVE_PTHREAD_SETAFFINITY_NP 1
+#undef HAVE_PTHREAD_SETAFFINITY_NP
/* Define to 1 if you have the `regcomp' function. */
#define HAVE_REGCOMP 1
% cd ..
As long as invoke via knotc and easy query via dig, the
result binary seems to work fine.
Thanks in advance
--
kkdlabs.jp, featuring Koh-ichi Ito as just another DNS freak in town.