From owner-freebsd-current Wed Sep 5 8:18:40 2001 Delivered-To: freebsd-current@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 0BE7C37B403; Wed, 5 Sep 2001 08:18:30 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f85FIAt79430; Wed, 5 Sep 2001 18:18:10 +0300 (EEST) (envelope-from ru) Date: Wed, 5 Sep 2001 18:18:10 +0300 From: Ruslan Ermilov To: Bruce Evans Cc: Jordan Hubbard , current@FreeBSD.ORG Subject: Re: Build problem in -current Message-ID: <20010905181810.V96906@sunbay.com> References: <20010904112429.A32825@sunbay.com> <20010905210408.D22853-100000@alphplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010905210408.D22853-100000@alphplex.bde.org>; from bde@zeta.org.au on Wed, Sep 05, 2001 at 09:44:05PM +1000 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Sep 05, 2001 at 09:44:05PM +1000, Bruce Evans wrote: [...] > > Index: Makefile > > =================================================================== > > RCS file: /home/ncvs/src/usr.bin/xinstall/Makefile,v > > retrieving revision 1.15 > > diff -u -r1.15 Makefile > > --- Makefile 2001/04/02 11:54:59 1.15 > > +++ Makefile 2001/09/04 08:11:52 > > @@ -3,6 +3,22 @@ > > > > PROG= xinstall > > PROGNAME= install > > +SRCS= xinstall.c > > MAN= install.1 > > + > > +# Get __FreeBSD_version > > +.if !defined(OSVERSION) > > +.if exists(/sbin/sysctl) > > +OSVERSION!= /sbin/sysctl -n kern.osreldate > > +.else > > +OSVERSION!= /usr/sbin/sysctl -n kern.osreldate > > +.endif > > +.endif > > + > > +.if ${OSVERSION} < 400021 || \ > > + ${OSVERSION} >= 500000 && ${OSVERSION} < 500007 > > +.PATH: ${.CURDIR}/../../lib/libc/gen > > +SRCS+= strtofflags.c > > +.endif > > > > .include > > Ugh. This is even worse than using __FreeBSD_version. It is broken > for non-FreeBSD hosts. Hmm, this case is broken in my version too. > Non-FreeBSD hosts might not have have FreeBSD file flags, so they might > not have the definitions of the magic numbers necessary for strtofflags.c > to compile; they might not even have the necessary headers. > What do I hear?! Are we required to support non-FreeBSD hosts at the Makefile level? That would be too conservative, and is already broken in many other ways. > It is unreasonable to expect the target source strtofflags.c to be > compilable in the host environment. > But we can at least try (with high probability of success) -- this is better than the current breakage Jordan observes. > The correct fix is to not support file flags in the bootstrap > version of install. > But we now always bootstrap install(1). Not including support for file flags here would mean "no support for file flags during the installworld". > > I also think that the ${OSVERSION} stuff should be in sys.mk. > > > > > Unfixed bugs: this will have to be fixed better before turning on WARNS. > > > strtofflags() won't be declared in the host includes if the host libraries > > > don't have it. Similarly in mtree (where I obtained this fix from) and > > > in any other tools that use strtofflags(). All these bugs were missing in > > > the old versions that used ls's version of strtofflags. > > > > > This could be solved similarly from within xinstall.c. I.e., we could > > prototype strtofflags() and fflagstostr() manually if __FreeBSD_version > > checks fail. > > Better to leave it out. > OK. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message