Subject: Re: Build failure in dhcp on 1.5 branch
To: port-vax@netbsd.org,Anders Magnusson <ragge@ludd.luth.se>
From: Chuck McManis <cmcmanis@mcmanis.com>
List: current-users
Date: 07/14/2000 13:47:08
Ragge et al.

Ok, I tracked this problem down to the setting of CFLAGS in /etc/mk.conf.

Basically if you have CFLAGS set there, then bsd.lib.mk resets the CFLAGS 
to that value prior to adding other stuff. In the Makefile the line CFLAGS 
+= -DMINIRESLIB is then nullified and the library doesn't build.

So question for Ragge, is the -O2 still required for VAX to be in /etc/mk.conf?

If the answer is yes, then one fix is to rewrite the minires Makefile to 
have the CFLAGS declaration after the include.

If the answer is no, then I should simply update my environment.

--Chuck


At 12:03 PM 7/14/00 -0700, Chuck McManis wrote:
>Hi All,
>
>I don't know if this is VAX specific, my setup specific, or generic but I 
>do know that the 1.5 build breaks on my machine (and has for a while) 
>trying to build DHCP.
>
>My build machine is a VAX running a 1.4U kernel/userland with build tools 
>that have been rebuilt from the mid June sources. (I have one local change 
>which is to disable the rrs warning.)
>
>I started with a fresh checkout of the 1.5 branch and a clean DESTDIR. Per 
>the VAX issues I've got 'CFLAGS=-O2' in my /etc/mk.conf to alleviate 
>problems with the optimizer crashing.
>
>The build error occurs because the -werror flag is used in 
>src/usr.sbin/dhcp and when building the dns functions in the minires 
>library the following errors occur:
>         res_init.c - res_randomid is implicitly declared
>         res_query.c - res_hostalis is implicitly declared
>         res_send.c - cur_time is undeclared
>         res_update.c - res_mkupdrec isn't declared giving a pointer 
> assignment error
>
>All of this points to some include file not being somewhere. I can 
>manually get around these errors by adding the necessary defines in the 
>source but this has been happening for months now (this happened on 1.4Y 
>IIRC) and it seems that either there is something screwy in the current 
>vax source, or everyone has some include file somewhere that I don't for 
>some reason. Anyone have any ideas? Should I just go ahead and submit a PR 
>or is it something stupid on my part that I forgot to do?
>
>--Chuck
>