Subject: pkg/11418: net/bind9 build fails with pth
To: None <gnats-bugs@gnats.netbsd.org>
From: IWAMOTO Toshihiro <toshii@netbsd.org>
List: netbsd-bugs
Date: 11/03/2000 05:54:15
>Number:         11418
>Category:       pkg
>Synopsis:       net/bind9 build fails with pth
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 03 05:54:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     IWAMOTO Toshihiro
>Release:        20001103
>Organization:
	
>Environment:
	
System: NetBSD kiku.my.domain 1.5H NetBSD 1.5H (KIKU) #109: Wed Oct 25 10:39:48 JST 2000 toshii@kiku.my.domain:/usr/src/syssrc/sys/arch/i386/compile/KIKU i386


>Description:
	Building bind9 results in a broken named(8) if one has devel/pth
	installed.  named runs fine at first, but it falls into
	an infinite loop when it gets SIGHUP or SIGTERM.

	Where devel/pth conflicts with is in the configure script.
	In the below, config.*.prev refer to the successful build.
	The configure script picks up the pth version of libpthread.so
	not the expected unproven-pthreads version, and it gives
	incorrect config.h.

--- config.h.prev	Fri Nov  3 22:17:26 2000
+++ config.h	Fri Nov  3 22:31:47 2000
@@ -48,7 +48,7 @@
 /* #undef NEED_PTHREAD_INIT */
 
 /* define if your system has sigwait() */
-#define HAVE_SIGWAIT 1
+/* #undef HAVE_SIGWAIT */
 
 /* define if sigwait() is the UnixWare flavor */
 /* #undef HAVE_UNIXWARE_SIGWAIT */
--- config.log.prev	Fri Nov  3 22:17:26 2000
+++ config.log	Fri Nov  3 22:31:47 2000
@@ -58,6 +58,52 @@
 configure:1914: gcc -c -O2  -I/usr/pkg/pthreads/include conftest.c 1>&5
 configure:2087: checking for sigwait in -lc
 configure:2106: gcc -o conftest -O2  -I/usr/pkg/pthreads/include  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib conftest.c -lc  -L/usr/pkg/pthreads/lib -Wl,-R/usr/pkg/pthreads/lib -lpthread -lm -lgcc -lpthread  1>&5
+/tmp/ccJYK2Xc.o: In function `main':
+/tmp/ccJYK2Xc.o(.text+0x4): undefined reference to `sigwait'
+collect2: ld returned 1 exit status
+configure: failed program was:
+#line 2095 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char sigwait();
+
+int main() {
+sigwait()
+; return 0; }
+configure:2128: checking for sigwait in -lpthread
+configure:2147: gcc -o conftest -O2  -I/usr/pkg/pthreads/include  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib conftest.c -lpthread  -L/usr/pkg/pthreads/lib -Wl,-R/usr/pkg/pthreads/lib -lpthread -lm -lgcc -lpthread  1>&5
+/tmp/ccvesGtE.o: In function `main':
+/tmp/ccvesGtE.o(.text+0x4): undefined reference to `sigwait'
+collect2: ld returned 1 exit status
+configure: failed program was:
+#line 2136 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char sigwait();
+
+int main() {
+sigwait()
+; return 0; }
+configure:2169: checking for _Psigwait in -lpthread
+configure:2188: gcc -o conftest -O2  -I/usr/pkg/pthreads/include  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib conftest.c -lpthread  -L/usr/pkg/pthreads/lib -Wl,-R/usr/pkg/pthreads/lib -lpthread -lm -lgcc -lpthread  1>&5
+/tmp/ccxuBiH6.o: In function `main':
+/tmp/ccxuBiH6.o(.text+0x4): undefined reference to `_Psigwait'
+collect2: ld returned 1 exit status
+configure: failed program was:
+#line 2177 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char _Psigwait();
+
+int main() {
+_Psigwait()
+; return 0; }
 configure:2363: checking for sysconf
 configure:2391: gcc -o conftest -O2  -I/usr/pkg/pthreads/include  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib conftest.c -L/usr/pkg/pthreads/lib -Wl,-R/usr/pkg/pthreads/lib -lpthread -lm -lgcc -lpthread  1>&5
 configure:2418: checking for catgets


>How-To-Repeat:
	# pkg_add pth-1.3.7.tgz
	# cd /usr/pkgsrc/net/bind9
	# make install
	# /usr/pkg/sbin/named
	# kill -1 `cat /var/run/named.pid`
	# top
>Fix:
	I'm not very good at configure things...
>Release-Note:
>Audit-Trail:
>Unformatted: