Re: Build problem in -current

2001-09-17 Thread Bruce Evans

On Mon, 17 Sep 2001, Ruslan Ermilov wrote:

> On Sat, Sep 15, 2001 at 03:57:26AM +1000, Bruce Evans wrote:
> > On Wed, 5 Sep 2001, Ruslan Ermilov wrote:
> >
> > > On Wed, Sep 05, 2001 at 09:44:05PM +1000, Bruce Evans wrote:
> > > [...]
> > > 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.
> >
> > I think it's easier to make a fairly general case work than fix special
> > cases as they turn up.
> >
> But we only need to "fix" these special (bootstrapping) cases.

By "special cases", I meant all problems that turn up for FreeBSD-u.v.w
hosts and FreeBSD-x.y.z targets (u >= 2, x >= 2).  There will be about as
many of them as for the more general case of a general POSIX.[1-2]-1990ish
host and a FreeBSD-x.y.z target.

> > > > 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".
> >
> > That's certainly a problem.  I still don't see the point of the runtime
> > test to avoid using strtofflags.c.  strttofflags.c is just as portable as
> > the xinstall sources (modulo the dependency on  declaring the
> > things in it, if WARNS is turned on).
> >
> Probably because you build your world static?  :-)  In a non-static
> case (like for the normal ``make buildworld''), strtofflags.c is the
> version that is getting compiled into, if used unconditionally.

Nah, the static case has better error checking, so it is just more
likely to break if strtofflags is in libc.a and is misimplemented so
that it conflicts with the local version :-).  Tools should be linked
static anyway, if possible.  (This may not be possible.  A POSIX or
even a FreeBSD-2+ host might not have any static libraries.  Or it
might not have any dynamic libraries.  A general POSIX host might not
even have a -static compiler flag to control this.  However, the details
can be hidden in the handling of the NOSHARED flag.  buildworld should
simply set this flag for tools like it used to.)

> If there would be a way to distinguish before bootstrapping and normal
> builds, I would definitely agree.

There is the (slightly misnamed) "WORLD" flag.  mtree/Makefile uses this
flag, but setting of it is broken.  ISTR that there used to be a flag
that said that the build-tools target is being built.

>
> Something as simple as this might work as well:
>
> Index: Makefile.inc1
> ===
> RCS file: /home/ncvs/src/Makefile.inc1,v
> retrieving revision 1.215
> diff -u -r1.215 Makefile.inc1
> --- Makefile.inc1 2001/08/29 09:11:03 1.215
> +++ Makefile.inc1 2001/09/17 07:13:50
> @@ -180,7 +180,7 @@
>  # bootstrap-tool stage
>  BMAKEENV=${BOOTSTRAPENV}
>  BMAKE=   ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOHTML -DNOINFO \
> - -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED
> + -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED -DBOOTSTRAPPING
>
>  # build-tool stage
>  TMAKEENV=MAKEOBJDIRPREFIX=${OBJTREE} \

Hmm, we already use NOSHARED for BMAKE and XMAKE.  We just don't use it
(explicitly?) for TMAKE (and of course for non-tools).  My version uses
-DNOSHARED -DWORLD explicitly for BMAKE, TMAKE and XMAKE.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Build problem in -current

2001-09-16 Thread Ruslan Ermilov

On Sat, Sep 15, 2001 at 03:57:26AM +1000, Bruce Evans wrote:
> On Wed, 5 Sep 2001, Ruslan Ermilov wrote:
> 
> > 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
> > > > --- Makefile2001/04/02 11:54:59 1.15
> > > > +++ Makefile2001/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} >= 50 && ${OSVERSION} < 57
> > > > +.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.
> 
> I think it's easier to make a fairly general case work than fix special
> cases as they turn up.
> 
But we only need to "fix" these special (bootstrapping) cases.

> > > 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".
> 
> That's certainly a problem.  I still don't see the point of the runtime
> test to avoid using strtofflags.c.  strttofflags.c is just as portable as
> the xinstall sources (modulo the dependency on  declaring the
> things in it, if WARNS is turned on).
> 
Probably because you build your world static?  :-)  In a non-static
case (like for the normal ``make buildworld''), strtofflags.c is the
version that is getting compiled into, if used unconditionally.

If there would be a way to distinguish before bootstrapping and normal
builds, I would definitely agree.

Something as simple as this might work as well:

Index: Makefile.inc1
===
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.215
diff -u -r1.215 Makefile.inc1
--- Makefile.inc1   2001/08/29 09:11:03 1.215
+++ Makefile.inc1   2001/09/17 07:13:50
@@ -180,7 +180,7 @@
 # bootstrap-tool stage
 BMAKEENV=  ${BOOTSTRAPENV}
 BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOHTML -DNOINFO \
-   -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED
+   -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED -DBOOTSTRAPPING
 
 # build-tool stage
 TMAKEENV=  MAKEOBJDIRPREFIX=${OBJTREE} \
Index: usr.bin/xinstall/Makefile
===
RCS file: /home/ncvs/src/usr.bin/xinstall/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- usr.bin/xinstall/Makefile   2001/04/02 11:54:59 1.15
+++ usr.bin/xinstall/Makefile   2001/09/17 07:13:50
@@ -3,6 +3,12 @@
 
 PROG=  xinstall
 PROGNAME=  install
+SRCS=  xinstall.c
 MAN=   install.1
+
+.if defined(BOOTSTRAPPING)
+.PATH: ${.CURDIR}/../../lib/libc/gen
+SRCS+= strtofflags.c
+.endif
 
 .include 



Cheers,
-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Build problem in -current

2001-09-14 Thread Bruce Evans

On Wed, 5 Sep 2001, Ruslan Ermilov wrote:

> 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} >= 50 && ${OSVERSION} < 57
> > > +.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.

I think it's easier to make a fairly general case work than fix special
cases as they turn up.

> > 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".

That's certainly a problem.  I still don't see the point of the runtime
test to avoid using strtofflags.c.  strttofflags.c is just as portable as
the xinstall sources (modulo the dependency on  declaring the
things in it, if WARNS is turned on).

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Build problem in -current

2001-09-05 Thread Ruslan Ermilov

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
> > --- Makefile2001/04/02 11:54:59 1.15
> > +++ Makefile2001/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} >= 50 && ${OSVERSION} < 57
> > +.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,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Build problem in -current

2001-09-05 Thread Bruce Evans

On Tue, 4 Sep 2001, Ruslan Ermilov wrote:

> On Mon, Sep 03, 2001 at 09:36:46PM +1000, Bruce Evans wrote:
> > Index: Makefile
> > ===
> > RCS file: /home/ncvs/src/usr.bin/xinstall/Makefile,v
> > retrieving revision 1.15
> > diff -u -2 -r1.15 Makefile
> > --- Makefile2 Apr 2001 11:54:59 -   1.15
> > +++ Makefile3 Sep 2001 11:18:33 -
> > @@ -2,6 +2,9 @@
> >  # $FreeBSD: src/usr.bin/xinstall/Makefile,v 1.15 2001/04/02 11:54:59 ru Exp $
> >
> > +.PATH: ${.CURDIR}/../../lib/libc/gen
> > +
> >  PROG=  xinstall
> >  PROGNAME=  install
> > +SRCS=  strtofflags.c xinstall.c
> >  MAN=   install.1
> >
> I don't like this, as it unconditionally compiles in strtofflags.c, even if
> the host has libc support for it.  This also breaks single-module-checkout
> compilation.  How about this instead?

It shouldn't matter if libc already has strtofflags().  strtofflags is not
in the POSIX namespace and our libc and headers don't have any pollution
;-);-).  (Actually, strtofflags is in the (reserved) ISO namespace and thus
in the (reserved) POSIX namespace, especially since xinstall.c includes
 and it's already a bug that strtofflags in in .)
Single-module checkout is already broken in hundreds of other places, so
I don't much mind one more (it's broken almost everywhere that uses .PATH,
in particular in all Makefiles for contrib'ed programs).

> The strtofflags() interface has been added
> to HEAD in unistd.h,v 1.36, on 2000/06/17, and
> to RELENG_4 in unistd.h,v 1.35.2.1, on 2000/07/03.
>
> This change has not been reflected by the __FreeBSD_version bump.

No problem.  That mistake is not used much outside of /sys :-).
(We've still got ifdefs to support RELENG_2_2 using it :-().

> The nearest (by date) version bumps are as follows:
>
> CURRENT, param.h,v 1.72, 57
> RELENG_4, param.h,v 1.61.2.6: 400021
>
> 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} >= 50 && ${OSVERSION} < 57
> +.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.  It is
unreasonable to expect the target source strtofflags.c to be compilable
in the host environment.  The correct fix is to not support file flags in
the bootstrap version of install.

> 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.

> > Nearby bugs: mtree/Makefile uses !defined(WORLD) to avoid depending on
> > the host having libmd, but someone removed the definition of WORLD from
> > src/Makefile.inc1.
> >
> The correct fix would be:
>
> Index: Makefile
> ===
> RCS file: /home/ncvs/src/usr.sbin/mtree/Makefile,v
> retrieving revision 1.21
> diff -u -r1.21 Makefile
> --- Makefile  2001/07/20 06:20:02 1.21
> +++ Makefile  2001/09/04 08:22:19
> @@ -8,10 +8,10 @@
>  SRCS=compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c \
>   strtofflags.c
>
> -.if !defined(WORLD)
> +.include 
> +
> +.if defined(LIBMD) && exists(${LIBMD})
>  CFLAGS+= -DMD5 -DSHA1 -DRMD160
>  DPADD=   ${LIBMD}
>  LDADD=   -lmd
>  .endif
> -
> -.include 

No, this only detects the presence of libmd, not of the necessary
functions.  Something like autoconfig would be needed to detect the
presence and non-brokenness of the necessary functions, but it shouldn't
be necessary to go there.

Bruce


To Unsubscribe: send

Re: Build problem in -current

2001-09-04 Thread Ruslan Ermilov

On Mon, Sep 03, 2001 at 09:36:46PM +1000, Bruce Evans wrote:
> On Sun, 2 Sep 2001, Jordan Hubbard wrote:
> 
> > cd /usr/src/usr.bin/xinstall; make _EXTRADEPEND
> > echo xinstall: /usr/obj/usr/src/i386/usr/lib/libc.a  >> .depend
> > cc -O -pipe-I/usr/obj/usr/src/i386/usr/include  -c /usr/src/usr.bin/xinstall
> > /xinstall.c
> > cc -O -pipe-I/usr/obj/usr/src/i386/usr/include   -static -o xinstall xinstal
> > l.o
> > xinstall.o: In function `main':
> > xinstall.o(.text+0x83): undefined reference to `strtofflags'
> > *** Error code 1
> >
> > This is from a relatively old -current coming up to a new (today's)
> > -current.  I suspect somebody added a call for install yet forgot to
> > alter the bootstrap tools target accordingly (or did but in the wrong
> > place).  Thanks.
> 
> Index: Makefile
> ===
> RCS file: /home/ncvs/src/usr.bin/xinstall/Makefile,v
> retrieving revision 1.15
> diff -u -2 -r1.15 Makefile
> --- Makefile  2 Apr 2001 11:54:59 -   1.15
> +++ Makefile  3 Sep 2001 11:18:33 -
> @@ -2,6 +2,9 @@
>  # $FreeBSD: src/usr.bin/xinstall/Makefile,v 1.15 2001/04/02 11:54:59 ru Exp $
> 
> +.PATH: ${.CURDIR}/../../lib/libc/gen
> +
>  PROG=xinstall
>  PROGNAME=install
> +SRCS=strtofflags.c xinstall.c
>  MAN= install.1
> 
I don't like this, as it unconditionally compiles in strtofflags.c, even if
the host has libc support for it.  This also breaks single-module-checkout
compilation.  How about this instead?

The strtofflags() interface has been added
to HEAD in unistd.h,v 1.36, on 2000/06/17, and
to RELENG_4 in unistd.h,v 1.35.2.1, on 2000/07/03.

This change has not been reflected by the __FreeBSD_version bump.
The nearest (by date) version bumps are as follows:

CURRENT, param.h,v 1.72, 57
RELENG_4, param.h,v 1.61.2.6: 400021

Index: Makefile
===
RCS file: /home/ncvs/src/usr.bin/xinstall/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile2001/04/02 11:54:59 1.15
+++ Makefile2001/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} >= 50 && ${OSVERSION} < 57
+.PATH: ${.CURDIR}/../../lib/libc/gen
+SRCS+= strtofflags.c
+.endif
 
 .include 

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.

> Nearby bugs: mtree/Makefile uses !defined(WORLD) to avoid depending on
> the host having libmd, but someone removed the definition of WORLD from
> src/Makefile.inc1.
> 
The correct fix would be:

Index: Makefile
===
RCS file: /home/ncvs/src/usr.sbin/mtree/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- Makefile2001/07/20 06:20:02 1.21
+++ Makefile2001/09/04 08:22:19
@@ -8,10 +8,10 @@
 SRCS=  compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c \
strtofflags.c
 
-.if !defined(WORLD)
+.include 
+
+.if defined(LIBMD) && exists(${LIBMD})
 CFLAGS+= -DMD5 -DSHA1 -DRMD160
 DPADD= ${LIBMD}
 LDADD= -lmd
 .endif
-
-.include 


Cheers,
-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Build problem in -current

2001-09-03 Thread Jordan Hubbard

If you think that's an acceptable work-around then by all means
commit it.  Thanks!

- Jordan

From: Bruce Evans <[EMAIL PROTECTED]>
Subject: Re: Build problem in -current
Date: Mon, 3 Sep 2001 21:36:46 +1000 (EST)

> On Sun, 2 Sep 2001, Jordan Hubbard wrote:
> 
> > cd /usr/src/usr.bin/xinstall; make _EXTRADEPEND
> > echo xinstall: /usr/obj/usr/src/i386/usr/lib/libc.a  >> .depend
> > cc -O -pipe-I/usr/obj/usr/src/i386/usr/include  -c /usr/src/usr.bin/xinstall
> > /xinstall.c
> > cc -O -pipe-I/usr/obj/usr/src/i386/usr/include   -static -o xinstall xinstal
> > l.o
> > xinstall.o: In function `main':
> > xinstall.o(.text+0x83): undefined reference to `strtofflags'
> > *** Error code 1
> >
> > This is from a relatively old -current coming up to a new (today's)
> > -current.  I suspect somebody added a call for install yet forgot to
> > alter the bootstrap tools target accordingly (or did but in the wrong
> > place).  Thanks.
> 
> Index: Makefile
> ===
> RCS file: /home/ncvs/src/usr.bin/xinstall/Makefile,v
> retrieving revision 1.15
> diff -u -2 -r1.15 Makefile
> --- Makefile  2 Apr 2001 11:54:59 -   1.15
> +++ Makefile  3 Sep 2001 11:18:33 -
> @@ -2,6 +2,9 @@
>  # $FreeBSD: src/usr.bin/xinstall/Makefile,v 1.15 2001/04/02 11:54:59 ru Exp $
> 
> +.PATH: ${.CURDIR}/../../lib/libc/gen
> +
>  PROG=xinstall
>  PROGNAME=install
> +SRCS=strtofflags.c xinstall.c
>  MAN= install.1
> 
> 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.
> 
> Nearby bugs: mtree/Makefile uses !defined(WORLD) to avoid depending on
> the host having libmd, but someone removed the definition of WORLD from
> src/Makefile.inc1.
> 
> Bruce
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Build problem in -current

2001-09-03 Thread Bruce Evans

On Sun, 2 Sep 2001, Jordan Hubbard wrote:

> cd /usr/src/usr.bin/xinstall; make _EXTRADEPEND
> echo xinstall: /usr/obj/usr/src/i386/usr/lib/libc.a  >> .depend
> cc -O -pipe-I/usr/obj/usr/src/i386/usr/include  -c /usr/src/usr.bin/xinstall
> /xinstall.c
> cc -O -pipe-I/usr/obj/usr/src/i386/usr/include   -static -o xinstall xinstal
> l.o
> xinstall.o: In function `main':
> xinstall.o(.text+0x83): undefined reference to `strtofflags'
> *** Error code 1
>
> This is from a relatively old -current coming up to a new (today's)
> -current.  I suspect somebody added a call for install yet forgot to
> alter the bootstrap tools target accordingly (or did but in the wrong
> place).  Thanks.

Index: Makefile
===
RCS file: /home/ncvs/src/usr.bin/xinstall/Makefile,v
retrieving revision 1.15
diff -u -2 -r1.15 Makefile
--- Makefile2 Apr 2001 11:54:59 -   1.15
+++ Makefile3 Sep 2001 11:18:33 -
@@ -2,6 +2,9 @@
 # $FreeBSD: src/usr.bin/xinstall/Makefile,v 1.15 2001/04/02 11:54:59 ru Exp $

+.PATH: ${.CURDIR}/../../lib/libc/gen
+
 PROG=  xinstall
 PROGNAME=  install
+SRCS=  strtofflags.c xinstall.c
 MAN=   install.1

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.

Nearby bugs: mtree/Makefile uses !defined(WORLD) to avoid depending on
the host having libmd, but someone removed the definition of WORLD from
src/Makefile.inc1.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Build problem in -current

2001-09-02 Thread Jordan Hubbard

cd /usr/src/usr.bin/xinstall; make _EXTRADEPEND
echo xinstall: /usr/obj/usr/src/i386/usr/lib/libc.a  >> .depend
cc -O -pipe-I/usr/obj/usr/src/i386/usr/include  -c /usr/src/usr.bin/xinstall
/xinstall.c
cc -O -pipe-I/usr/obj/usr/src/i386/usr/include   -static -o xinstall xinstal
l.o
xinstall.o: In function `main':
xinstall.o(.text+0x83): undefined reference to `strtofflags'
*** Error code 1

This is from a relatively old -current coming up to a new (today's)
-current.  I suspect somebody added a call for install yet forgot to
alter the bootstrap tools target accordingly (or did but in the wrong
place).  Thanks.

- Jordan

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message