Subject: Re: BIND9 breaks with "NAMED_USE_PTHREADS=no"
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 05/21/2004 16:03:37
In article <20040521123254.GA17183@hoss.unixag-kl.fh-kl.de>,
Jochen Kunz <jkunz@unixag-kl.fh-kl.de> wrote:
>Hi.
>
>Build started with clean (non-existent) destdir / objdir:
>./build.sh -m i386 -D /home/jkunz/NetBSD/current/destdir/i386 \
>-O /home/jkunz/NetBSD/current/objdir/i386 \
>-T /home/jkunz/NetBSD/current/tooldir \
>-R /home/jkunz/NetBSD/current/releasedir 
>-V NAMED_USE_PTHREADS=no -V CHECKFLIST_FLAGS="-e -m" -V MKGDB=no -U release
>
>Breaks with:
>#   compile  libisc/socket.o
>/home/jkunz/NetBSD/current/tooldir/bin/i386--netbsdelf-gcc -O2 -Wall
>-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
>-Wno-sign-compare -Wno-traditional -Wno-uninitialized  -Werror
>-I/home/jkunz/NetBSD/current/src/usr.sbin/bind/libisc/../include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/dns/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/dns/unix/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/bind9/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isccfg/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isccc/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/lwres/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/lwres/unix/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/dns/sec/dst/include
>-DNS_LOCALSTATEDIR=\"/var\"  -DNS_SYSCONFDIR=\"/etc\"
>-DVERSION=\"9.3.0beta3\" -DLIBINTERFACE=10  -DLIBREVISION=0 -DLIBAGE=1
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/nothreads/include
>-nostdinc -isystem /home/jkunz/NetBSD/current/destdir/i386/usr/include
>-c    /home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c -o
>socket.o.tmp
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c:202:
>error: syntax error before "isc_thread_t"
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c:202:
>warning: no semicolon at end of struct or union
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c:208:
>error: syntax error before '}' token
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c: In
>function `wakeup_socket':
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c:323:
>error: dereferencing pointer to incomplete type
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c:324:
>error: dereferencing pointer to incomplete type
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c:325:
>error: dereferencing pointer to incomplete type
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c:326:
>error: dereferencing pointer to incomplete type
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/socket.c:330:
>error: dereferencing pointer to incomplete type
>
>
>Note: Building with "NAMED_USE_PTHREADS=yes" is no option.
>I try to build a hp700 snapshot and hp700 has no working libpthread.
>So I have to use "NAMED_USE_PTHREADS=no" for the moment. I did this 
>i386 build only to test if this failure is hp700 related or not.
>
>Possible cause for this bug: usr.sbin/bind/Makefile.inc has a conditional 
>for "CPPFLAGS+=-DISC_PLATFORM_USETHREADS" that is controled by 
>"NAMED_USE_PTHREADS", but usr.sbin/bind/include/isc/platform.h has a 
>unconditional "#define ISC_PLATFORM_USETHREADS 1".
>
>If "#define ISC_PLATFORM_USETHREADS 1" is removed from platform.h the
>build fails with:
>#   compile  libisc/app.o
>/home/jkunz/NetBSD/current/tooldir/bin/i386--netbsdelf-gcc -O2 -Wall
>-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
>-Wno-sign-compare -Wno-traditional -Wno-uninitialized  -Werror
>-I/home/jkunz/NetBSD/current/src/usr.sbin/bind/libisc/../include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/dns/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/dns/unix/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/bind9/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isccfg/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isccc/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/lwres/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/lwres/unix/include
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/dns/sec/dst/include
>-DNS_LOCALSTATEDIR=\"/var\"  -DNS_SYSCONFDIR=\"/etc\"
>-DVERSION=\"9.3.0beta3\" -DLIBINTERFACE=10  -DLIBREVISION=0 -DLIBAGE=1
>-I/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/nothreads/include
>-nostdinc -isystem /home/jkunz/NetBSD/current/destdir/i386/usr/include
>-c    /home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/app.c -o
>app.o.tmp
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/app.c:300:
>warning: function declaration isn't a prototype
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/app.c: In function
>`isc_app_run':
>/home/jkunz/NetBSD/current/src/dist/bind/lib/isc/unix/app.c:439:
>warning: unused variable `sig'
>
>*** Failed target:  app.o
>
>
>[Now going back to fix hp700 MD issues.]

I just fixed it.

christos