Subject: lib/13794: RES_OPTIONS=debug is broken due to res_init.o build issue
To: None <>
From: John Hawkinson <>
List: netbsd-bugs
Date: 08/27/2001 10:14:43
>Number:         13794
>Category:       lib
>Synopsis:       RES_OPTIONS=debug is broken due to res_init.o build issue
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 27 08:53:01 PDT 2001
>Originator:     John Hawkinson
>Release:        NetBSD 1.5.1
System: NetBSD 1.5W NetBSD 1.5W (ZORKMID-$Revision: 1.12 $) #104: Sun Jun 24 21:48:35 EDT 2001 i386

Setting "RES_OPTIONS=debug" does not work for resolver debugging.

This appears to be because, despite the fact that libresolv is built
with -DDEBUG to get this support, res_init.o, which is part of libc,
is not so-built.
"env RES_OPTIONS=debug ping" and watch it fail.

Build res_init.o with -DDEBUG. I'm not sure of the best way, though.
Setting CPPFLAGS+=-DEDBUG in src/lib/libc/Makefile would certainly do
it, but that would build other things with -DDEBUG and that is probably

Conversly, changing the #ifdef DEBUG to #ifdef RES_DEBUG in res_init.c
would probably complicate merging.

Perhaps setting -DRES_DEBUG in the Makefile and then adding

	#ifdef RES_DEBUG
	#define DEBUG

at the head of res_init.c?