Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Warner Losh
On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert 
wrote:

> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
> free...@gndrsh.dnsmgr.net> wrote:
> >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
> >>  wrote:
> >> >
> >> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
> >"Rodney W.
> >> > > Grimes"
> >> > > writes:
> >> > > > > Author: cy
> >> > > > > Date: Thu Apr 18 01:02:00 2019
> >> > > > > New Revision: 346341
> >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
> >> > > > >
> >> > > > > Log:
> >> > > > >   As an interim measure until a more permanent solution is
> >implemented
> >> > > > >   workaround the following error:
> >> > > > >
> >> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
> >error: use of
> >> > > > >   undeclared identifier
> >> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
> >&rights, FA_OPEN);
> >> > > > >
> >> > > > >   Reported by:O. Hartmann 
> >> > > > >   Reported by:Michael Butler 
> >> > > > >   Reported by:gjb@ & cy@ (implicit)
> >> > > > >   Reviewed by:emaste@
> >> > > > >   Noted by:   rgrimes@
> >> > > > >
> >> > > > > Modified:
> >> > > > >   head/tools/build/Makefile
> >> > > > >
> >> > > > > Modified: head/tools/build/Makefile
> >> > > > >
>
> >===
> >> > > > ===
> >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
> >(r34634
> >> > > > 0)
> >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
> >(r34634
> >> > > > 1)
> >> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> >> > > > >  INCS+=   libcasper.h
> >> > > > >  .endif
> >> > > > >
> >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> >> > > > >  CASPERINC+=
> >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> >> > > > rgs.h
> >> > > > > -.endif
> >> > > >
> >> > > > As a further note, we should probably hunt for any thing
> >> > > > that is explicity looking at /usr/include/... in a Makefile,
> >> > > > as that is minimally missing a ${DESTDIR} argument.
> >> > > >
> >> > > > The above may of actually worked if it had been written:
> >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> >> > > > someone may wish to test that.
> >> > > >
> >> > > > Also a pathname rooted at / without ${DESTDIR} is almost
> >certainly a mistake.
> >> > >
> >> > > This is a better solution. I tested this in a tree with a
> >duplicated
> >> > > environment: Problem solved. Before this is committed it should
> >be
> >> > > tested on one of the universe machines.
> >> >
> >> > From what Ed just said this would also be wrong,
> >> > as well as CASPERINC+= above being wrong, if this
> >> > is being built for the host we should not be using
> >> > any headers from ${SRCTOP} at all.
> >> >
> >> > if capfileargs.h does not exist on the host that functionality
> >> > must not be compiled into the buildtool as the host does not
> >> > have this feature and attempting to use it from SRCTOP is wrong.
> >> >
> >>
> >> Keep in mind that this is bootstrap; it's being built for the host
> >> system, but it will link against a version of libcasper that's been
> >> built in an earlier stage with the proper featureset.
> >
> >Ok, flip flop again, if infact this is linked against a
> >library that implements the stuff from cap_fileargs.h then
> >infact the ${DESTDIR} addition so that the build peaks into
> >the cross build tree is correct, or what ever the equivelent
> >to DESTDIR is for that ?  BUILDDIR?  The point is it should
> >be picking this header up from the object tree, NOT from
> >the running system.
>
> Yes, this was my conclusion when working on kerberos and ntp. This is also
> true of libraries,  else one would need to installworld and buildworld
> again to get a properly built library/binary.
>
> IIRC ngie@ fixed a number of these across the tree a couple of years ago.


OK. There's a number of different issues going on. As the original author
of libegacy (which is what we're seeing fail), let me address the design
generically and comment on different things that have come up in this
thread.

Since this is going into the libegacy that we're using to build the system,
the check for file is bogus, for reasons I'll discuss below.  When we add
new includes to the system, it is appropriate to do it this way. And when
this file was added to the system, the check was correct.

First off, DESTDIR is absolutely not correct since this is to build the
legacy library and legacy includes which augment the host's sources on
legacay system, hence the name. It's never the correct thing to use.

The problem that we have here is not that the file is missing (which is why
it was added the way it was a long time ago), but rather missing
functionality in a file that's been around for a long time.

So, since it is that class of problem, the canonical way we've dealt with
it in the past is to do somethi

Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Rodney W. Grimes
> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>  wrote:
> >
> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney W.
> > > Grimes"
> > > writes:
> > > > > Author: cy
> > > > > Date: Thu Apr 18 01:02:00 2019
> > > > > New Revision: 346341
> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > > >
> > > > > Log:
> > > > >   As an interim measure until a more permanent solution is implemented
> > > > >   workaround the following error:
> > > > >
> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use 
> > > > > of
> > > > >   undeclared identifier
> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, 
> > > > > FA_OPEN);
> > > > >
> > > > >   Reported by:O. Hartmann 
> > > > >   Reported by:Michael Butler 
> > > > >   Reported by:gjb@ & cy@ (implicit)
> > > > >   Reviewed by:emaste@
> > > > >   Noted by:   rgrimes@
> > > > >
> > > > > Modified:
> > > > >   head/tools/build/Makefile
> > > > >
> > > > > Modified: head/tools/build/Makefile
> > > > > ===
> > > > ===
> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
> > > > > (r34634
> > > > 0)
> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
> > > > > (r34634
> > > > 1)
> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> > > > >  INCS+=   libcasper.h
> > > > >  .endif
> > > > >
> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > > > >  CASPERINC+=  
> > > > > ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> > > > rgs.h
> > > > > -.endif
> > > >
> > > > As a further note, we should probably hunt for any thing
> > > > that is explicity looking at /usr/include/... in a Makefile,
> > > > as that is minimally missing a ${DESTDIR} argument.
> > > >
> > > > The above may of actually worked if it had been written:
> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > > > someone may wish to test that.
> > > >
> > > > Also a pathname rooted at / without ${DESTDIR} is almost certainly a 
> > > > mistake.
> > >
> > > This is a better solution. I tested this in a tree with a duplicated
> > > environment: Problem solved. Before this is committed it should be
> > > tested on one of the universe machines.
> >
> > From what Ed just said this would also be wrong,
> > as well as CASPERINC+= above being wrong, if this
> > is being built for the host we should not be using
> > any headers from ${SRCTOP} at all.
> >
> > if capfileargs.h does not exist on the host that functionality
> > must not be compiled into the buildtool as the host does not
> > have this feature and attempting to use it from SRCTOP is wrong.
> >
> 
> Keep in mind that this is bootstrap; it's being built for the host
> system, but it will link against a version of libcasper that's been
> built in an earlier stage with the proper featureset.

Ok, flip flop again, if infact this is linked against a
library that implements the stuff from cap_fileargs.h then
infact the ${DESTDIR} addition so that the build peaks into
the cross build tree is correct, or what ever the equivelent
to DESTDIR is for that ?  BUILDDIR?  The point is it should
be picking this header up from the object tree, NOT from
the running system.


-- 
Rod Grimes rgri...@freebsd.org


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Kyle Evans
On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
 wrote:
>
> > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney W.
> > Grimes"
> > writes:
> > > > Author: cy
> > > > Date: Thu Apr 18 01:02:00 2019
> > > > New Revision: 346341
> > > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > >
> > > > Log:
> > > >   As an interim measure until a more permanent solution is implemented
> > > >   workaround the following error:
> > > >
> > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
> > > >   undeclared identifier
> > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, 
> > > > FA_OPEN);
> > > >
> > > >   Reported by:O. Hartmann 
> > > >   Reported by:Michael Butler 
> > > >   Reported by:gjb@ & cy@ (implicit)
> > > >   Reviewed by:emaste@
> > > >   Noted by:   rgrimes@
> > > >
> > > > Modified:
> > > >   head/tools/build/Makefile
> > > >
> > > > Modified: head/tools/build/Makefile
> > > > ===
> > > ===
> > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
> > > > (r34634
> > > 0)
> > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
> > > > (r34634
> > > 1)
> > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> > > >  INCS+=   libcasper.h
> > > >  .endif
> > > >
> > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > > >  CASPERINC+=  
> > > > ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> > > rgs.h
> > > > -.endif
> > >
> > > As a further note, we should probably hunt for any thing
> > > that is explicity looking at /usr/include/... in a Makefile,
> > > as that is minimally missing a ${DESTDIR} argument.
> > >
> > > The above may of actually worked if it had been written:
> > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > > someone may wish to test that.
> > >
> > > Also a pathname rooted at / without ${DESTDIR} is almost certainly a 
> > > mistake.
> >
> > This is a better solution. I tested this in a tree with a duplicated
> > environment: Problem solved. Before this is committed it should be
> > tested on one of the universe machines.
>
> From what Ed just said this would also be wrong,
> as well as CASPERINC+= above being wrong, if this
> is being built for the host we should not be using
> any headers from ${SRCTOP} at all.
>
> if capfileargs.h does not exist on the host that functionality
> must not be compiled into the buildtool as the host does not
> have this feature and attempting to use it from SRCTOP is wrong.
>

Keep in mind that this is bootstrap; it's being built for the host
system, but it will link against a version of libcasper that's been
built in an earlier stage with the proper featureset.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Cy Schubert
In message 
, Ian Le
pore writes:
> On Wed, 2019-04-17 at 20:32 -0700, Cy Schubert wrote:
> > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney
> > W. 
> > Grimes"
> > writes:
> > > > Author: cy
> > > > Date: Thu Apr 18 01:02:00 2019
> > > > New Revision: 346341
> > > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > > 
> > > > Log:
> > > >   As an interim measure until a more permanent solution is
> > > > implemented
> > > >   workaround the following error:
> > > >   
> > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error:
> > > > use of
> > > >   undeclared identifier
> > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights,
> > > > FA_OPEN);
> > > >   
> > > >   Reported by:  O. Hartmann 
> > > >   Reported by:  Michael Butler 
> > > >   Reported by:  gjb@ & cy@ (implicit)
> > > >   Reviewed by:  emaste@
> > > >   Noted by: rgrimes@
> > > > 
> > > > Modified:
> > > >   head/tools/build/Makefile
> > > > 
> > > > Modified: head/tools/build/Makefile
> > > > =
> > > > ==
> > > 
> > > ===
> > > > --- head/tools/build/Makefile   Thu Apr 18 00:38:54 2019(
> > > > r34634
> > > 
> > > 0)
> > > > +++ head/tools/build/Makefile   Thu Apr 18 01:02:00 2019(
> > > > r34634
> > > 
> > > 1)
> > > > @@ -59,9 +59,7 @@ INCS+=capsicum_helpers.h
> > > >  INCS+= libcasper.h
> > > >  .endif
> > > >  
> > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > > >  CASPERINC+=${SRCTOP}/lib/libcasper/services/cap_fileargs/c
> > > > ap_filea
> > > 
> > > rgs.h
> > > > -.endif
> > > 
> > > As a further note, we should probably hunt for any thing
> > > that is explicity looking at /usr/include/... in a Makefile,
> > > as that is minimally missing a ${DESTDIR} argument.
> > > 
> > > The above may of actually worked if it had been written:
> > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > > someone may wish to test that.
> > > 
> > > Also a pathname rooted at / without ${DESTDIR} is almost certainly
> > > a mistake.
> > 
> > This is a better solution. I tested this in a tree with a duplicated 
> > environment: Problem solved. Before this is committed it should be 
> > tested on one of the universe machines.
> > 
> > 
>
> I'm having a hard time understanding how adding $DESTDIR is any kind of
> solution to something that happens at build time as opposed to install
> time.  I typically run buildworld/kernel without DESTDIR defined.

$DESTDIR is also used as a destination for the temporary build 
directory $WORLDTMP, i.e. /usr/obj/${ARCH}/tmp, also known as $SYSROOT.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.




___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Cy Schubert
On April 18, 2019 9:59:50 AM PDT, Warner Losh  wrote:
>On Thu, Apr 18, 2019 at 10:26 AM Cy Schubert
>
>wrote:
>
>> On April 18, 2019 8:11:49 AM PDT, Warner Losh  wrote:
>>>
>>>
>>>
>>> On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert
>
>>> wrote:
>>>
 On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
 free...@gndrsh.dnsmgr.net> wrote:
 >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
 >>  wrote:
 >> >
 >> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
 >"Rodney W.
 >> > > Grimes"
 >> > > writes:
 >> > > > > Author: cy
 >> > > > > Date: Thu Apr 18 01:02:00 2019
 >> > > > > New Revision: 346341
 >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
 >> > > > >
 >> > > > > Log:
 >> > > > >   As an interim measure until a more permanent solution
>is
 >implemented
 >> > > > >   workaround the following error:
 >> > > > >
 >> > > > >  
>/usr/src/contrib/elftoolchain/strings/strings.c:198:55:
 >error: use of
 >> > > > >   undeclared identifier
 >> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
 >&rights, FA_OPEN);
 >> > > > >
 >> > > > >   Reported by:O. Hartmann 
 >> > > > >   Reported by:Michael Butler
>
 >> > > > >   Reported by:gjb@ & cy@ (implicit)
 >> > > > >   Reviewed by:emaste@
 >> > > > >   Noted by:   rgrimes@
 >> > > > >
 >> > > > > Modified:
 >> > > > >   head/tools/build/Makefile
 >> > > > >
 >> > > > > Modified: head/tools/build/Makefile
 >> > > > >


>>===
 >> > > > ===
 >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54
>2019
 >(r34634
 >> > > > 0)
 >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00
>2019
 >(r34634
 >> > > > 1)
 >> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
 >> > > > >  INCS+=   libcasper.h
 >> > > > >  .endif
 >> > > > >
 >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
 >> > > > >  CASPERINC+=
 >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
 >> > > > rgs.h
 >> > > > > -.endif
 >> > > >
 >> > > > As a further note, we should probably hunt for any thing
 >> > > > that is explicity looking at /usr/include/... in a
>Makefile,
 >> > > > as that is minimally missing a ${DESTDIR} argument.
 >> > > >
 >> > > > The above may of actually worked if it had been written:
 >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
 >> > > > someone may wish to test that.
 >> > > >
 >> > > > Also a pathname rooted at / without ${DESTDIR} is almost
 >certainly a mistake.
 >> > >
 >> > > This is a better solution. I tested this in a tree with a
 >duplicated
 >> > > environment: Problem solved. Before this is committed it
>should
 >be
 >> > > tested on one of the universe machines.
 >> >
 >> > From what Ed just said this would also be wrong,
 >> > as well as CASPERINC+= above being wrong, if this
 >> > is being built for the host we should not be using
 >> > any headers from ${SRCTOP} at all.
 >> >
 >> > if capfileargs.h does not exist on the host that functionality
 >> > must not be compiled into the buildtool as the host does not
 >> > have this feature and attempting to use it from SRCTOP is
>wrong.
 >> >
 >>
 >> Keep in mind that this is bootstrap; it's being built for the
>host
 >> system, but it will link against a version of libcasper that's
>been
 >> built in an earlier stage with the proper featureset.
 >
 >Ok, flip flop again, if infact this is linked against a
 >library that implements the stuff from cap_fileargs.h then
 >infact the ${DESTDIR} addition so that the build peaks into
 >the cross build tree is correct, or what ever the equivelent
 >to DESTDIR is for that ?  BUILDDIR?  The point is it should
 >be picking this header up from the object tree, NOT from
 >the running system.

 Yes, this was my conclusion when working on kerberos and ntp. This
>is
 also true of libraries,  else one would need to installworld and
>buildworld
 again to get a properly built library/binary.

 IIRC ngie@ fixed a number of these across the tree a couple of
>years
 ago.
>>>
>>>
>>> OK. There's a number of different issues going on. As the original
>author
>>> of libegacy (which is what we're seeing fail), let me address the
>design
>>> generically and comment on different things that have come up in
>this
>>> thread.
>>>
>>> Since this is going into the libegacy that we're using to build the
>>> system, the check for file is bogus, for reasons I'll discuss below.
> When
>>> we add new includes to the system, it is appropriate to do it this
>way. And
>>> when this file was added to t

Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Rodney W. Grimes
> In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney W. 
> Grimes"
> writes:
> > > Author: cy
> > > Date: Thu Apr 18 01:02:00 2019
> > > New Revision: 346341
> > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > 
> > > Log:
> > >   As an interim measure until a more permanent solution is implemented
> > >   workaround the following error:
> > >   
> > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
> > >   undeclared identifier
> > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
> > >   
> > >   Reported by:O. Hartmann 
> > >   Reported by:Michael Butler 
> > >   Reported by:gjb@ & cy@ (implicit)
> > >   Reviewed by:emaste@
> > >   Noted by:   rgrimes@
> > > 
> > > Modified:
> > >   head/tools/build/Makefile
> > > 
> > > Modified: head/tools/build/Makefile
> > > ===
> > ===
> > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019(r34634
> > 0)
> > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019(r34634
> > 1)
> > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> > >  INCS+=   libcasper.h
> > >  .endif
> > >  
> > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > >  CASPERINC+=  ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> > rgs.h
> > > -.endif
> >
> > As a further note, we should probably hunt for any thing
> > that is explicity looking at /usr/include/... in a Makefile,
> > as that is minimally missing a ${DESTDIR} argument.
> >
> > The above may of actually worked if it had been written:
> > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > someone may wish to test that.
> >
> > Also a pathname rooted at / without ${DESTDIR} is almost certainly a 
> > mistake.
> 
> This is a better solution. I tested this in a tree with a duplicated 
> environment: Problem solved. Before this is committed it should be 
> tested on one of the universe machines.

>From what Ed just said this would also be wrong,
as well as CASPERINC+= above being wrong, if this
is being built for the host we should not be using
any headers from ${SRCTOP} at all.

if capfileargs.h does not exist on the host that functionality
must not be compiled into the buildtool as the host does not
have this feature and attempting to use it from SRCTOP is wrong.

-- 
Rod Grimes rgri...@freebsd.org


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Cy Schubert
On April 18, 2019 8:11:49 AM PDT, Warner Losh  wrote:
>On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert 
>wrote:
>
>> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
>> free...@gndrsh.dnsmgr.net> wrote:
>> >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>> >>  wrote:
>> >> >
>> >> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
>> >"Rodney W.
>> >> > > Grimes"
>> >> > > writes:
>> >> > > > > Author: cy
>> >> > > > > Date: Thu Apr 18 01:02:00 2019
>> >> > > > > New Revision: 346341
>> >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
>> >> > > > >
>> >> > > > > Log:
>> >> > > > >   As an interim measure until a more permanent solution is
>> >implemented
>> >> > > > >   workaround the following error:
>> >> > > > >
>> >> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
>> >error: use of
>> >> > > > >   undeclared identifier
>> >> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
>> >&rights, FA_OPEN);
>> >> > > > >
>> >> > > > >   Reported by:O. Hartmann 
>> >> > > > >   Reported by:Michael Butler
>
>> >> > > > >   Reported by:gjb@ & cy@ (implicit)
>> >> > > > >   Reviewed by:emaste@
>> >> > > > >   Noted by:   rgrimes@
>> >> > > > >
>> >> > > > > Modified:
>> >> > > > >   head/tools/build/Makefile
>> >> > > > >
>> >> > > > > Modified: head/tools/build/Makefile
>> >> > > > >
>>
>>
>>===
>> >> > > > ===
>> >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
>> >(r34634
>> >> > > > 0)
>> >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
>> >(r34634
>> >> > > > 1)
>> >> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>> >> > > > >  INCS+=   libcasper.h
>> >> > > > >  .endif
>> >> > > > >
>> >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
>> >> > > > >  CASPERINC+=
>> >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
>> >> > > > rgs.h
>> >> > > > > -.endif
>> >> > > >
>> >> > > > As a further note, we should probably hunt for any thing
>> >> > > > that is explicity looking at /usr/include/... in a Makefile,
>> >> > > > as that is minimally missing a ${DESTDIR} argument.
>> >> > > >
>> >> > > > The above may of actually worked if it had been written:
>> >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
>> >> > > > someone may wish to test that.
>> >> > > >
>> >> > > > Also a pathname rooted at / without ${DESTDIR} is almost
>> >certainly a mistake.
>> >> > >
>> >> > > This is a better solution. I tested this in a tree with a
>> >duplicated
>> >> > > environment: Problem solved. Before this is committed it
>should
>> >be
>> >> > > tested on one of the universe machines.
>> >> >
>> >> > From what Ed just said this would also be wrong,
>> >> > as well as CASPERINC+= above being wrong, if this
>> >> > is being built for the host we should not be using
>> >> > any headers from ${SRCTOP} at all.
>> >> >
>> >> > if capfileargs.h does not exist on the host that functionality
>> >> > must not be compiled into the buildtool as the host does not
>> >> > have this feature and attempting to use it from SRCTOP is wrong.
>> >> >
>> >>
>> >> Keep in mind that this is bootstrap; it's being built for the host
>> >> system, but it will link against a version of libcasper that's
>been
>> >> built in an earlier stage with the proper featureset.
>> >
>> >Ok, flip flop again, if infact this is linked against a
>> >library that implements the stuff from cap_fileargs.h then
>> >infact the ${DESTDIR} addition so that the build peaks into
>> >the cross build tree is correct, or what ever the equivelent
>> >to DESTDIR is for that ?  BUILDDIR?  The point is it should
>> >be picking this header up from the object tree, NOT from
>> >the running system.
>>
>> Yes, this was my conclusion when working on kerberos and ntp. This is
>also
>> true of libraries,  else one would need to installworld and
>buildworld
>> again to get a properly built library/binary.
>>
>> IIRC ngie@ fixed a number of these across the tree a couple of years
>ago.
>
>
>OK. There's a number of different issues going on. As the original
>author
>of libegacy (which is what we're seeing fail), let me address the
>design
>generically and comment on different things that have come up in this
>thread.
>
>Since this is going into the libegacy that we're using to build the
>system,
>the check for file is bogus, for reasons I'll discuss below.  When we
>add
>new includes to the system, it is appropriate to do it this way. And
>when
>this file was added to the system, the check was correct.
>
>First off, DESTDIR is absolutely not correct since this is to build the
>legacy library and legacy includes which augment the host's sources on
>legacay system, hence the name. It's never the correct thing to use.
>
>The problem that we have here is not that the file is missing (which is
>why
>it was added the way it was a long time ago)

Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Ed Maste
On Thu, 18 Apr 2019 at 10:03, Kyle Evans  wrote:
>
> Keep in mind that this is bootstrap; it's being built for the host
> system, but it will link against a version of libcasper that's been
> built in an earlier stage with the proper featureset.

Not exactly the case here: if building on a system with too-old Casper
then strings just builds without Capsicum/Casper support. Macros /
static inline stub implementations in the header takes care of this,
it does not actually link against any libcasper.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346341 - head/tools/build

2019-09-03 Thread Cy Schubert
Author: cy
Date: Thu Apr 18 01:02:00 2019
New Revision: 346341
URL: https://svnweb.freebsd.org/changeset/base/346341

Log:
  As an interim measure until a more permanent solution is implemented
  workaround the following error:
  
  /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
  undeclared identifier
  'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
  
  Reported by:  O. Hartmann 
  Reported by:  Michael Butler 
  Reported by:  gjb@ & cy@ (implicit)
  Reviewed by:  emaste@
  Noted by: rgrimes@

Modified:
  head/tools/build/Makefile

Modified: head/tools/build/Makefile
==
--- head/tools/build/Makefile   Thu Apr 18 00:38:54 2019(r346340)
+++ head/tools/build/Makefile   Thu Apr 18 01:02:00 2019(r346341)
@@ -59,9 +59,7 @@ INCS+=capsicum_helpers.h
 INCS+= libcasper.h
 .endif
 
-.if !exists(/usr/include/casper/cap_fileargs.h)
 CASPERINC+=${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h
-.endif
 
 .if empty(SRCS)
 SRCS=  dummy.c


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Cy Schubert
On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" 
 wrote:
>> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>>  wrote:
>> >
>> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
>"Rodney W.
>> > > Grimes"
>> > > writes:
>> > > > > Author: cy
>> > > > > Date: Thu Apr 18 01:02:00 2019
>> > > > > New Revision: 346341
>> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
>> > > > >
>> > > > > Log:
>> > > > >   As an interim measure until a more permanent solution is
>implemented
>> > > > >   workaround the following error:
>> > > > >
>> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
>error: use of
>> > > > >   undeclared identifier
>> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
>&rights, FA_OPEN);
>> > > > >
>> > > > >   Reported by:O. Hartmann 
>> > > > >   Reported by:Michael Butler 
>> > > > >   Reported by:gjb@ & cy@ (implicit)
>> > > > >   Reviewed by:emaste@
>> > > > >   Noted by:   rgrimes@
>> > > > >
>> > > > > Modified:
>> > > > >   head/tools/build/Makefile
>> > > > >
>> > > > > Modified: head/tools/build/Makefile
>> > > > >
>===
>> > > > ===
>> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019   
>(r34634
>> > > > 0)
>> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019   
>(r34634
>> > > > 1)
>> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>> > > > >  INCS+=   libcasper.h
>> > > > >  .endif
>> > > > >
>> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
>> > > > >  CASPERINC+= 
>${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
>> > > > rgs.h
>> > > > > -.endif
>> > > >
>> > > > As a further note, we should probably hunt for any thing
>> > > > that is explicity looking at /usr/include/... in a Makefile,
>> > > > as that is minimally missing a ${DESTDIR} argument.
>> > > >
>> > > > The above may of actually worked if it had been written:
>> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
>> > > > someone may wish to test that.
>> > > >
>> > > > Also a pathname rooted at / without ${DESTDIR} is almost
>certainly a mistake.
>> > >
>> > > This is a better solution. I tested this in a tree with a
>duplicated
>> > > environment: Problem solved. Before this is committed it should
>be
>> > > tested on one of the universe machines.
>> >
>> > From what Ed just said this would also be wrong,
>> > as well as CASPERINC+= above being wrong, if this
>> > is being built for the host we should not be using
>> > any headers from ${SRCTOP} at all.
>> >
>> > if capfileargs.h does not exist on the host that functionality
>> > must not be compiled into the buildtool as the host does not
>> > have this feature and attempting to use it from SRCTOP is wrong.
>> >
>> 
>> Keep in mind that this is bootstrap; it's being built for the host
>> system, but it will link against a version of libcasper that's been
>> built in an earlier stage with the proper featureset.
>
>Ok, flip flop again, if infact this is linked against a
>library that implements the stuff from cap_fileargs.h then
>infact the ${DESTDIR} addition so that the build peaks into
>the cross build tree is correct, or what ever the equivelent
>to DESTDIR is for that ?  BUILDDIR?  The point is it should
>be picking this header up from the object tree, NOT from
>the running system.

Yes, this was my conclusion when working on kerberos and ntp. This is also true 
of libraries,  else one would need to installworld and buildworld again to get 
a properly built library/binary. 

IIRC ngie@ fixed a number of these across the tree a couple of years ago. 

-- 
Pardon the typos and autocorrect, small keyboard in use.
Cheers,
Cy Schubert 
FreeBSD UNIX:  Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Cy Schubert
In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney W. 
Grimes"
writes:
> > Author: cy
> > Date: Thu Apr 18 01:02:00 2019
> > New Revision: 346341
> > URL: https://svnweb.freebsd.org/changeset/base/346341
> > 
> > Log:
> >   As an interim measure until a more permanent solution is implemented
> >   workaround the following error:
> >   
> >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
> >   undeclared identifier
> >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
> >   
> >   Reported by:  O. Hartmann 
> >   Reported by:  Michael Butler 
> >   Reported by:  gjb@ & cy@ (implicit)
> >   Reviewed by:  emaste@
> >   Noted by: rgrimes@
> > 
> > Modified:
> >   head/tools/build/Makefile
> > 
> > Modified: head/tools/build/Makefile
> > ===
> ===
> > --- head/tools/build/Makefile   Thu Apr 18 00:38:54 2019(r34634
> 0)
> > +++ head/tools/build/Makefile   Thu Apr 18 01:02:00 2019(r34634
> 1)
> > @@ -59,9 +59,7 @@ INCS+=capsicum_helpers.h
> >  INCS+= libcasper.h
> >  .endif
> >  
> > -.if !exists(/usr/include/casper/cap_fileargs.h)
> >  CASPERINC+=${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> rgs.h
> > -.endif
>
> As a further note, we should probably hunt for any thing
> that is explicity looking at /usr/include/... in a Makefile,
> as that is minimally missing a ${DESTDIR} argument.
>
> The above may of actually worked if it had been written:
> .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> someone may wish to test that.
>
> Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake.

This is a better solution. I tested this in a tree with a duplicated 
environment: Problem solved. Before this is committed it should be 
tested on one of the universe machines.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.




___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Warner Losh
On Thu, Apr 18, 2019 at 12:03 PM Ed Maste  wrote:

> On Thu, 18 Apr 2019 at 10:03, Kyle Evans  wrote:
> >
> > Keep in mind that this is bootstrap; it's being built for the host
> > system, but it will link against a version of libcasper that's been
> > built in an earlier stage with the proper featureset.
>
> Not exactly the case here: if building on a system with too-old Casper
> then strings just builds without Capsicum/Casper support. Macros /
> static inline stub implementations in the header takes care of this,
> it does not actually link against any libcasper.
>

Yea, we need to do one or the other.

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Ed Maste
On Wed, 17 Apr 2019 at 21:07, Rodney W. Grimes
 wrote:
>
> Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake.

It's not in fact; strings is being built for the host here, and the
headers in /usr/include are the appropriate ones.

In this specific case the Capsicum change needs to be made fully
portable for upstreaming to the ELF Tool Chain project and when that
happens it will build on FreeBSD build hosts older than r346314 the
same way it will build on Linux or other hosts without an up-to-date
cap_fileargs, by using a local portability wrappers.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Rodney W. Grimes
> Author: cy
> Date: Thu Apr 18 01:02:00 2019
> New Revision: 346341
> URL: https://svnweb.freebsd.org/changeset/base/346341
> 
> Log:
>   As an interim measure until a more permanent solution is implemented
>   workaround the following error:
>   
>   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
>   undeclared identifier
>   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
>   
>   Reported by:O. Hartmann 
>   Reported by:Michael Butler 
>   Reported by:gjb@ & cy@ (implicit)
>   Reviewed by:emaste@
>   Noted by:   rgrimes@
> 
> Modified:
>   head/tools/build/Makefile
> 
> Modified: head/tools/build/Makefile
> ==
> --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019(r346340)
> +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019(r346341)
> @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>  INCS+=   libcasper.h
>  .endif
>  
> -.if !exists(/usr/include/casper/cap_fileargs.h)
>  CASPERINC+=  ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h
> -.endif

As a further note, we should probably hunt for any thing
that is explicity looking at /usr/include/... in a Makefile,
as that is minimally missing a ${DESTDIR} argument.

The above may of actually worked if it had been written:
.if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
someone may wish to test that.

Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake.

>  .if empty(SRCS)
>  SRCS=dummy.c

-- 
Rod Grimes rgri...@freebsd.org


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Warner Losh
On Thu, Apr 18, 2019 at 10:26 AM Cy Schubert 
wrote:

> On April 18, 2019 8:11:49 AM PDT, Warner Losh  wrote:
>>
>>
>>
>> On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert 
>> wrote:
>>
>>> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
>>> free...@gndrsh.dnsmgr.net> wrote:
>>> >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>>> >>  wrote:
>>> >> >
>>> >> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
>>> >"Rodney W.
>>> >> > > Grimes"
>>> >> > > writes:
>>> >> > > > > Author: cy
>>> >> > > > > Date: Thu Apr 18 01:02:00 2019
>>> >> > > > > New Revision: 346341
>>> >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
>>> >> > > > >
>>> >> > > > > Log:
>>> >> > > > >   As an interim measure until a more permanent solution is
>>> >implemented
>>> >> > > > >   workaround the following error:
>>> >> > > > >
>>> >> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
>>> >error: use of
>>> >> > > > >   undeclared identifier
>>> >> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
>>> >&rights, FA_OPEN);
>>> >> > > > >
>>> >> > > > >   Reported by:O. Hartmann 
>>> >> > > > >   Reported by:Michael Butler 
>>> >> > > > >   Reported by:gjb@ & cy@ (implicit)
>>> >> > > > >   Reviewed by:emaste@
>>> >> > > > >   Noted by:   rgrimes@
>>> >> > > > >
>>> >> > > > > Modified:
>>> >> > > > >   head/tools/build/Makefile
>>> >> > > > >
>>> >> > > > > Modified: head/tools/build/Makefile
>>> >> > > > >
>>>
>>> >===
>>> >> > > > ===
>>> >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
>>> >(r34634
>>> >> > > > 0)
>>> >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
>>> >(r34634
>>> >> > > > 1)
>>> >> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>>> >> > > > >  INCS+=   libcasper.h
>>> >> > > > >  .endif
>>> >> > > > >
>>> >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
>>> >> > > > >  CASPERINC+=
>>> >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
>>> >> > > > rgs.h
>>> >> > > > > -.endif
>>> >> > > >
>>> >> > > > As a further note, we should probably hunt for any thing
>>> >> > > > that is explicity looking at /usr/include/... in a Makefile,
>>> >> > > > as that is minimally missing a ${DESTDIR} argument.
>>> >> > > >
>>> >> > > > The above may of actually worked if it had been written:
>>> >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
>>> >> > > > someone may wish to test that.
>>> >> > > >
>>> >> > > > Also a pathname rooted at / without ${DESTDIR} is almost
>>> >certainly a mistake.
>>> >> > >
>>> >> > > This is a better solution. I tested this in a tree with a
>>> >duplicated
>>> >> > > environment: Problem solved. Before this is committed it should
>>> >be
>>> >> > > tested on one of the universe machines.
>>> >> >
>>> >> > From what Ed just said this would also be wrong,
>>> >> > as well as CASPERINC+= above being wrong, if this
>>> >> > is being built for the host we should not be using
>>> >> > any headers from ${SRCTOP} at all.
>>> >> >
>>> >> > if capfileargs.h does not exist on the host that functionality
>>> >> > must not be compiled into the buildtool as the host does not
>>> >> > have this feature and attempting to use it from SRCTOP is wrong.
>>> >> >
>>> >>
>>> >> Keep in mind that this is bootstrap; it's being built for the host
>>> >> system, but it will link against a version of libcasper that's been
>>> >> built in an earlier stage with the proper featureset.
>>> >
>>> >Ok, flip flop again, if infact this is linked against a
>>> >library that implements the stuff from cap_fileargs.h then
>>> >infact the ${DESTDIR} addition so that the build peaks into
>>> >the cross build tree is correct, or what ever the equivelent
>>> >to DESTDIR is for that ?  BUILDDIR?  The point is it should
>>> >be picking this header up from the object tree, NOT from
>>> >the running system.
>>>
>>> Yes, this was my conclusion when working on kerberos and ntp. This is
>>> also true of libraries,  else one would need to installworld and buildworld
>>> again to get a properly built library/binary.
>>>
>>> IIRC ngie@ fixed a number of these across the tree a couple of years
>>> ago.
>>
>>
>> OK. There's a number of different issues going on. As the original author
>> of libegacy (which is what we're seeing fail), let me address the design
>> generically and comment on different things that have come up in this
>> thread.
>>
>> Since this is going into the libegacy that we're using to build the
>> system, the check for file is bogus, for reasons I'll discuss below.  When
>> we add new includes to the system, it is appropriate to do it this way. And
>> when this file was added to the system, the check was correct.
>>
>> First off, DESTDIR is absolutely not correct since this is to build the
>> legacy library and legacy includes which augment the host's sources on
>> legacay

Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread John Baldwin
On 4/18/19 9:26 AM, Cy Schubert wrote:
> On April 18, 2019 8:11:49 AM PDT, Warner Losh  wrote:
>> On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert 
>> wrote:
>>
>>> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
>>> free...@gndrsh.dnsmgr.net> wrote:
> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>  wrote:
>>
>>> In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
 "Rodney W.
>>> Grimes"
>>> writes:
> Author: cy
> Date: Thu Apr 18 01:02:00 2019
> New Revision: 346341
> URL: https://svnweb.freebsd.org/changeset/base/346341
>
> Log:
>   As an interim measure until a more permanent solution is
 implemented
>   workaround the following error:
>
>   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
 error: use of
>   undeclared identifier
>   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
 &rights, FA_OPEN);
>
>   Reported by:O. Hartmann 
>   Reported by:Michael Butler
>> 
>   Reported by:gjb@ & cy@ (implicit)
>   Reviewed by:emaste@
>   Noted by:   rgrimes@
>
> Modified:
>   head/tools/build/Makefile
>
> Modified: head/tools/build/Makefile
>
>>>
>>>
>>> ===
 ===
> --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
(r34634
 0)
> +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
(r34634
 1)
> @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>  INCS+=   libcasper.h
>  .endif
>
> -.if !exists(/usr/include/casper/cap_fileargs.h)
>  CASPERINC+=
 ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
 rgs.h
> -.endif

 As a further note, we should probably hunt for any thing
 that is explicity looking at /usr/include/... in a Makefile,
 as that is minimally missing a ${DESTDIR} argument.

 The above may of actually worked if it had been written:
 .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
 someone may wish to test that.

 Also a pathname rooted at / without ${DESTDIR} is almost
 certainly a mistake.
>>>
>>> This is a better solution. I tested this in a tree with a
 duplicated
>>> environment: Problem solved. Before this is committed it
>> should
 be
>>> tested on one of the universe machines.
>>
>> From what Ed just said this would also be wrong,
>> as well as CASPERINC+= above being wrong, if this
>> is being built for the host we should not be using
>> any headers from ${SRCTOP} at all.
>>
>> if capfileargs.h does not exist on the host that functionality
>> must not be compiled into the buildtool as the host does not
>> have this feature and attempting to use it from SRCTOP is wrong.
>>
>
> Keep in mind that this is bootstrap; it's being built for the host
> system, but it will link against a version of libcasper that's
>> been
> built in an earlier stage with the proper featureset.

 Ok, flip flop again, if infact this is linked against a
 library that implements the stuff from cap_fileargs.h then
 infact the ${DESTDIR} addition so that the build peaks into
 the cross build tree is correct, or what ever the equivelent
 to DESTDIR is for that ?  BUILDDIR?  The point is it should
 be picking this header up from the object tree, NOT from
 the running system.
>>>
>>> Yes, this was my conclusion when working on kerberos and ntp. This is
>> also
>>> true of libraries,  else one would need to installworld and
>> buildworld
>>> again to get a properly built library/binary.
>>>
>>> IIRC ngie@ fixed a number of these across the tree a couple of years
>> ago.
>>
>>
>> OK. There's a number of different issues going on. As the original
>> author
>> of libegacy (which is what we're seeing fail), let me address the
>> design
>> generically and comment on different things that have come up in this
>> thread.
>>
>> Since this is going into the libegacy that we're using to build the
>> system,
>> the check for file is bogus, for reasons I'll discuss below.  When we
>> add
>> new includes to the system, it is appropriate to do it this way. And
>> when
>> this file was added to the system, the check was correct.
>>
>> First off, DESTDIR is absolutely not correct since this is to build the
>> legacy library and legacy includes which augment the host's sources on
>> legacay system, hence the name. It's never the correct thing to use.
>>
>> The problem that we have here is not that the file is missing (which is
>> why
>> it was added the way it was a long time ago), but rather missing
>> functionality in a file that's been around for 

Re: svn commit: r346341 - head/tools/build

2019-09-03 Thread Ian Lepore
On Wed, 2019-04-17 at 20:32 -0700, Cy Schubert wrote:
> In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney
> W. 
> Grimes"
> writes:
> > > Author: cy
> > > Date: Thu Apr 18 01:02:00 2019
> > > New Revision: 346341
> > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > 
> > > Log:
> > >   As an interim measure until a more permanent solution is
> > > implemented
> > >   workaround the following error:
> > >   
> > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error:
> > > use of
> > >   undeclared identifier
> > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights,
> > > FA_OPEN);
> > >   
> > >   Reported by:O. Hartmann 
> > >   Reported by:Michael Butler 
> > >   Reported by:gjb@ & cy@ (implicit)
> > >   Reviewed by:emaste@
> > >   Noted by:   rgrimes@
> > > 
> > > Modified:
> > >   head/tools/build/Makefile
> > > 
> > > Modified: head/tools/build/Makefile
> > > =
> > > ==
> > 
> > ===
> > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019(
> > > r34634
> > 
> > 0)
> > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019(
> > > r34634
> > 
> > 1)
> > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> > >  INCS+=   libcasper.h
> > >  .endif
> > >  
> > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > >  CASPERINC+=  ${SRCTOP}/lib/libcasper/services/cap_fileargs/c
> > > ap_filea
> > 
> > rgs.h
> > > -.endif
> > 
> > As a further note, we should probably hunt for any thing
> > that is explicity looking at /usr/include/... in a Makefile,
> > as that is minimally missing a ${DESTDIR} argument.
> > 
> > The above may of actually worked if it had been written:
> > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > someone may wish to test that.
> > 
> > Also a pathname rooted at / without ${DESTDIR} is almost certainly
> > a mistake.
> 
> This is a better solution. I tested this in a tree with a duplicated 
> environment: Problem solved. Before this is committed it should be 
> tested on one of the universe machines.
> 
> 

I'm having a hard time understanding how adding $DESTDIR is any kind of
solution to something that happens at build time as opposed to install
time.  I typically run buildworld/kernel without DESTDIR defined.

-- Ian



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Warner Losh
On Thu, Apr 18, 2019 at 12:03 PM Ed Maste  wrote:

> On Thu, 18 Apr 2019 at 10:03, Kyle Evans  wrote:
> >
> > Keep in mind that this is bootstrap; it's being built for the host
> > system, but it will link against a version of libcasper that's been
> > built in an earlier stage with the proper featureset.
>
> Not exactly the case here: if building on a system with too-old Casper
> then strings just builds without Capsicum/Casper support. Macros /
> static inline stub implementations in the header takes care of this,
> it does not actually link against any libcasper.
>

Yea, we need to do one or the other.

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Ed Maste
On Thu, 18 Apr 2019 at 10:03, Kyle Evans  wrote:
>
> Keep in mind that this is bootstrap; it's being built for the host
> system, but it will link against a version of libcasper that's been
> built in an earlier stage with the proper featureset.

Not exactly the case here: if building on a system with too-old Casper
then strings just builds without Capsicum/Casper support. Macros /
static inline stub implementations in the header takes care of this,
it does not actually link against any libcasper.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Cy Schubert
On April 18, 2019 9:59:50 AM PDT, Warner Losh  wrote:
>On Thu, Apr 18, 2019 at 10:26 AM Cy Schubert
>
>wrote:
>
>> On April 18, 2019 8:11:49 AM PDT, Warner Losh  wrote:
>>>
>>>
>>>
>>> On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert
>
>>> wrote:
>>>
 On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
 free...@gndrsh.dnsmgr.net> wrote:
 >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
 >>  wrote:
 >> >
 >> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
 >"Rodney W.
 >> > > Grimes"
 >> > > writes:
 >> > > > > Author: cy
 >> > > > > Date: Thu Apr 18 01:02:00 2019
 >> > > > > New Revision: 346341
 >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
 >> > > > >
 >> > > > > Log:
 >> > > > >   As an interim measure until a more permanent solution
>is
 >implemented
 >> > > > >   workaround the following error:
 >> > > > >
 >> > > > >  
>/usr/src/contrib/elftoolchain/strings/strings.c:198:55:
 >error: use of
 >> > > > >   undeclared identifier
 >> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
 >&rights, FA_OPEN);
 >> > > > >
 >> > > > >   Reported by:O. Hartmann 
 >> > > > >   Reported by:Michael Butler
>
 >> > > > >   Reported by:gjb@ & cy@ (implicit)
 >> > > > >   Reviewed by:emaste@
 >> > > > >   Noted by:   rgrimes@
 >> > > > >
 >> > > > > Modified:
 >> > > > >   head/tools/build/Makefile
 >> > > > >
 >> > > > > Modified: head/tools/build/Makefile
 >> > > > >


>>===
 >> > > > ===
 >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54
>2019
 >(r34634
 >> > > > 0)
 >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00
>2019
 >(r34634
 >> > > > 1)
 >> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
 >> > > > >  INCS+=   libcasper.h
 >> > > > >  .endif
 >> > > > >
 >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
 >> > > > >  CASPERINC+=
 >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
 >> > > > rgs.h
 >> > > > > -.endif
 >> > > >
 >> > > > As a further note, we should probably hunt for any thing
 >> > > > that is explicity looking at /usr/include/... in a
>Makefile,
 >> > > > as that is minimally missing a ${DESTDIR} argument.
 >> > > >
 >> > > > The above may of actually worked if it had been written:
 >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
 >> > > > someone may wish to test that.
 >> > > >
 >> > > > Also a pathname rooted at / without ${DESTDIR} is almost
 >certainly a mistake.
 >> > >
 >> > > This is a better solution. I tested this in a tree with a
 >duplicated
 >> > > environment: Problem solved. Before this is committed it
>should
 >be
 >> > > tested on one of the universe machines.
 >> >
 >> > From what Ed just said this would also be wrong,
 >> > as well as CASPERINC+= above being wrong, if this
 >> > is being built for the host we should not be using
 >> > any headers from ${SRCTOP} at all.
 >> >
 >> > if capfileargs.h does not exist on the host that functionality
 >> > must not be compiled into the buildtool as the host does not
 >> > have this feature and attempting to use it from SRCTOP is
>wrong.
 >> >
 >>
 >> Keep in mind that this is bootstrap; it's being built for the
>host
 >> system, but it will link against a version of libcasper that's
>been
 >> built in an earlier stage with the proper featureset.
 >
 >Ok, flip flop again, if infact this is linked against a
 >library that implements the stuff from cap_fileargs.h then
 >infact the ${DESTDIR} addition so that the build peaks into
 >the cross build tree is correct, or what ever the equivelent
 >to DESTDIR is for that ?  BUILDDIR?  The point is it should
 >be picking this header up from the object tree, NOT from
 >the running system.

 Yes, this was my conclusion when working on kerberos and ntp. This
>is
 also true of libraries,  else one would need to installworld and
>buildworld
 again to get a properly built library/binary.

 IIRC ngie@ fixed a number of these across the tree a couple of
>years
 ago.
>>>
>>>
>>> OK. There's a number of different issues going on. As the original
>author
>>> of libegacy (which is what we're seeing fail), let me address the
>design
>>> generically and comment on different things that have come up in
>this
>>> thread.
>>>
>>> Since this is going into the libegacy that we're using to build the
>>> system, the check for file is bogus, for reasons I'll discuss below.
> When
>>> we add new includes to the system, it is appropriate to do it this
>way. And
>>> when this file was added to t

Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Warner Losh
On Thu, Apr 18, 2019 at 10:26 AM Cy Schubert 
wrote:

> On April 18, 2019 8:11:49 AM PDT, Warner Losh  wrote:
>>
>>
>>
>> On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert 
>> wrote:
>>
>>> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
>>> free...@gndrsh.dnsmgr.net> wrote:
>>> >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>>> >>  wrote:
>>> >> >
>>> >> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
>>> >"Rodney W.
>>> >> > > Grimes"
>>> >> > > writes:
>>> >> > > > > Author: cy
>>> >> > > > > Date: Thu Apr 18 01:02:00 2019
>>> >> > > > > New Revision: 346341
>>> >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
>>> >> > > > >
>>> >> > > > > Log:
>>> >> > > > >   As an interim measure until a more permanent solution is
>>> >implemented
>>> >> > > > >   workaround the following error:
>>> >> > > > >
>>> >> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
>>> >error: use of
>>> >> > > > >   undeclared identifier
>>> >> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
>>> >&rights, FA_OPEN);
>>> >> > > > >
>>> >> > > > >   Reported by:O. Hartmann 
>>> >> > > > >   Reported by:Michael Butler 
>>> >> > > > >   Reported by:gjb@ & cy@ (implicit)
>>> >> > > > >   Reviewed by:emaste@
>>> >> > > > >   Noted by:   rgrimes@
>>> >> > > > >
>>> >> > > > > Modified:
>>> >> > > > >   head/tools/build/Makefile
>>> >> > > > >
>>> >> > > > > Modified: head/tools/build/Makefile
>>> >> > > > >
>>>
>>> >===
>>> >> > > > ===
>>> >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
>>> >(r34634
>>> >> > > > 0)
>>> >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
>>> >(r34634
>>> >> > > > 1)
>>> >> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>>> >> > > > >  INCS+=   libcasper.h
>>> >> > > > >  .endif
>>> >> > > > >
>>> >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
>>> >> > > > >  CASPERINC+=
>>> >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
>>> >> > > > rgs.h
>>> >> > > > > -.endif
>>> >> > > >
>>> >> > > > As a further note, we should probably hunt for any thing
>>> >> > > > that is explicity looking at /usr/include/... in a Makefile,
>>> >> > > > as that is minimally missing a ${DESTDIR} argument.
>>> >> > > >
>>> >> > > > The above may of actually worked if it had been written:
>>> >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
>>> >> > > > someone may wish to test that.
>>> >> > > >
>>> >> > > > Also a pathname rooted at / without ${DESTDIR} is almost
>>> >certainly a mistake.
>>> >> > >
>>> >> > > This is a better solution. I tested this in a tree with a
>>> >duplicated
>>> >> > > environment: Problem solved. Before this is committed it should
>>> >be
>>> >> > > tested on one of the universe machines.
>>> >> >
>>> >> > From what Ed just said this would also be wrong,
>>> >> > as well as CASPERINC+= above being wrong, if this
>>> >> > is being built for the host we should not be using
>>> >> > any headers from ${SRCTOP} at all.
>>> >> >
>>> >> > if capfileargs.h does not exist on the host that functionality
>>> >> > must not be compiled into the buildtool as the host does not
>>> >> > have this feature and attempting to use it from SRCTOP is wrong.
>>> >> >
>>> >>
>>> >> Keep in mind that this is bootstrap; it's being built for the host
>>> >> system, but it will link against a version of libcasper that's been
>>> >> built in an earlier stage with the proper featureset.
>>> >
>>> >Ok, flip flop again, if infact this is linked against a
>>> >library that implements the stuff from cap_fileargs.h then
>>> >infact the ${DESTDIR} addition so that the build peaks into
>>> >the cross build tree is correct, or what ever the equivelent
>>> >to DESTDIR is for that ?  BUILDDIR?  The point is it should
>>> >be picking this header up from the object tree, NOT from
>>> >the running system.
>>>
>>> Yes, this was my conclusion when working on kerberos and ntp. This is
>>> also true of libraries,  else one would need to installworld and buildworld
>>> again to get a properly built library/binary.
>>>
>>> IIRC ngie@ fixed a number of these across the tree a couple of years
>>> ago.
>>
>>
>> OK. There's a number of different issues going on. As the original author
>> of libegacy (which is what we're seeing fail), let me address the design
>> generically and comment on different things that have come up in this
>> thread.
>>
>> Since this is going into the libegacy that we're using to build the
>> system, the check for file is bogus, for reasons I'll discuss below.  When
>> we add new includes to the system, it is appropriate to do it this way. And
>> when this file was added to the system, the check was correct.
>>
>> First off, DESTDIR is absolutely not correct since this is to build the
>> legacy library and legacy includes which augment the host's sources on
>> legacay

Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread John Baldwin
On 4/18/19 9:26 AM, Cy Schubert wrote:
> On April 18, 2019 8:11:49 AM PDT, Warner Losh  wrote:
>> On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert 
>> wrote:
>>
>>> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
>>> free...@gndrsh.dnsmgr.net> wrote:
> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>  wrote:
>>
>>> In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
 "Rodney W.
>>> Grimes"
>>> writes:
> Author: cy
> Date: Thu Apr 18 01:02:00 2019
> New Revision: 346341
> URL: https://svnweb.freebsd.org/changeset/base/346341
>
> Log:
>   As an interim measure until a more permanent solution is
 implemented
>   workaround the following error:
>
>   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
 error: use of
>   undeclared identifier
>   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
 &rights, FA_OPEN);
>
>   Reported by:O. Hartmann 
>   Reported by:Michael Butler
>> 
>   Reported by:gjb@ & cy@ (implicit)
>   Reviewed by:emaste@
>   Noted by:   rgrimes@
>
> Modified:
>   head/tools/build/Makefile
>
> Modified: head/tools/build/Makefile
>
>>>
>>>
>>> ===
 ===
> --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
(r34634
 0)
> +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
(r34634
 1)
> @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>  INCS+=   libcasper.h
>  .endif
>
> -.if !exists(/usr/include/casper/cap_fileargs.h)
>  CASPERINC+=
 ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
 rgs.h
> -.endif

 As a further note, we should probably hunt for any thing
 that is explicity looking at /usr/include/... in a Makefile,
 as that is minimally missing a ${DESTDIR} argument.

 The above may of actually worked if it had been written:
 .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
 someone may wish to test that.

 Also a pathname rooted at / without ${DESTDIR} is almost
 certainly a mistake.
>>>
>>> This is a better solution. I tested this in a tree with a
 duplicated
>>> environment: Problem solved. Before this is committed it
>> should
 be
>>> tested on one of the universe machines.
>>
>> From what Ed just said this would also be wrong,
>> as well as CASPERINC+= above being wrong, if this
>> is being built for the host we should not be using
>> any headers from ${SRCTOP} at all.
>>
>> if capfileargs.h does not exist on the host that functionality
>> must not be compiled into the buildtool as the host does not
>> have this feature and attempting to use it from SRCTOP is wrong.
>>
>
> Keep in mind that this is bootstrap; it's being built for the host
> system, but it will link against a version of libcasper that's
>> been
> built in an earlier stage with the proper featureset.

 Ok, flip flop again, if infact this is linked against a
 library that implements the stuff from cap_fileargs.h then
 infact the ${DESTDIR} addition so that the build peaks into
 the cross build tree is correct, or what ever the equivelent
 to DESTDIR is for that ?  BUILDDIR?  The point is it should
 be picking this header up from the object tree, NOT from
 the running system.
>>>
>>> Yes, this was my conclusion when working on kerberos and ntp. This is
>> also
>>> true of libraries,  else one would need to installworld and
>> buildworld
>>> again to get a properly built library/binary.
>>>
>>> IIRC ngie@ fixed a number of these across the tree a couple of years
>> ago.
>>
>>
>> OK. There's a number of different issues going on. As the original
>> author
>> of libegacy (which is what we're seeing fail), let me address the
>> design
>> generically and comment on different things that have come up in this
>> thread.
>>
>> Since this is going into the libegacy that we're using to build the
>> system,
>> the check for file is bogus, for reasons I'll discuss below.  When we
>> add
>> new includes to the system, it is appropriate to do it this way. And
>> when
>> this file was added to the system, the check was correct.
>>
>> First off, DESTDIR is absolutely not correct since this is to build the
>> legacy library and legacy includes which augment the host's sources on
>> legacay system, hence the name. It's never the correct thing to use.
>>
>> The problem that we have here is not that the file is missing (which is
>> why
>> it was added the way it was a long time ago), but rather missing
>> functionality in a file that's been around for 

Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Cy Schubert
On April 18, 2019 8:11:49 AM PDT, Warner Losh  wrote:
>On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert 
>wrote:
>
>> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
>> free...@gndrsh.dnsmgr.net> wrote:
>> >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>> >>  wrote:
>> >> >
>> >> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
>> >"Rodney W.
>> >> > > Grimes"
>> >> > > writes:
>> >> > > > > Author: cy
>> >> > > > > Date: Thu Apr 18 01:02:00 2019
>> >> > > > > New Revision: 346341
>> >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
>> >> > > > >
>> >> > > > > Log:
>> >> > > > >   As an interim measure until a more permanent solution is
>> >implemented
>> >> > > > >   workaround the following error:
>> >> > > > >
>> >> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
>> >error: use of
>> >> > > > >   undeclared identifier
>> >> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
>> >&rights, FA_OPEN);
>> >> > > > >
>> >> > > > >   Reported by:O. Hartmann 
>> >> > > > >   Reported by:Michael Butler
>
>> >> > > > >   Reported by:gjb@ & cy@ (implicit)
>> >> > > > >   Reviewed by:emaste@
>> >> > > > >   Noted by:   rgrimes@
>> >> > > > >
>> >> > > > > Modified:
>> >> > > > >   head/tools/build/Makefile
>> >> > > > >
>> >> > > > > Modified: head/tools/build/Makefile
>> >> > > > >
>>
>>
>>===
>> >> > > > ===
>> >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
>> >(r34634
>> >> > > > 0)
>> >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
>> >(r34634
>> >> > > > 1)
>> >> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>> >> > > > >  INCS+=   libcasper.h
>> >> > > > >  .endif
>> >> > > > >
>> >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
>> >> > > > >  CASPERINC+=
>> >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
>> >> > > > rgs.h
>> >> > > > > -.endif
>> >> > > >
>> >> > > > As a further note, we should probably hunt for any thing
>> >> > > > that is explicity looking at /usr/include/... in a Makefile,
>> >> > > > as that is minimally missing a ${DESTDIR} argument.
>> >> > > >
>> >> > > > The above may of actually worked if it had been written:
>> >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
>> >> > > > someone may wish to test that.
>> >> > > >
>> >> > > > Also a pathname rooted at / without ${DESTDIR} is almost
>> >certainly a mistake.
>> >> > >
>> >> > > This is a better solution. I tested this in a tree with a
>> >duplicated
>> >> > > environment: Problem solved. Before this is committed it
>should
>> >be
>> >> > > tested on one of the universe machines.
>> >> >
>> >> > From what Ed just said this would also be wrong,
>> >> > as well as CASPERINC+= above being wrong, if this
>> >> > is being built for the host we should not be using
>> >> > any headers from ${SRCTOP} at all.
>> >> >
>> >> > if capfileargs.h does not exist on the host that functionality
>> >> > must not be compiled into the buildtool as the host does not
>> >> > have this feature and attempting to use it from SRCTOP is wrong.
>> >> >
>> >>
>> >> Keep in mind that this is bootstrap; it's being built for the host
>> >> system, but it will link against a version of libcasper that's
>been
>> >> built in an earlier stage with the proper featureset.
>> >
>> >Ok, flip flop again, if infact this is linked against a
>> >library that implements the stuff from cap_fileargs.h then
>> >infact the ${DESTDIR} addition so that the build peaks into
>> >the cross build tree is correct, or what ever the equivelent
>> >to DESTDIR is for that ?  BUILDDIR?  The point is it should
>> >be picking this header up from the object tree, NOT from
>> >the running system.
>>
>> Yes, this was my conclusion when working on kerberos and ntp. This is
>also
>> true of libraries,  else one would need to installworld and
>buildworld
>> again to get a properly built library/binary.
>>
>> IIRC ngie@ fixed a number of these across the tree a couple of years
>ago.
>
>
>OK. There's a number of different issues going on. As the original
>author
>of libegacy (which is what we're seeing fail), let me address the
>design
>generically and comment on different things that have come up in this
>thread.
>
>Since this is going into the libegacy that we're using to build the
>system,
>the check for file is bogus, for reasons I'll discuss below.  When we
>add
>new includes to the system, it is appropriate to do it this way. And
>when
>this file was added to the system, the check was correct.
>
>First off, DESTDIR is absolutely not correct since this is to build the
>legacy library and legacy includes which augment the host's sources on
>legacay system, hence the name. It's never the correct thing to use.
>
>The problem that we have here is not that the file is missing (which is
>why
>it was added the way it was a long time ago)

Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Warner Losh
On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert 
wrote:

> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" <
> free...@gndrsh.dnsmgr.net> wrote:
> >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
> >>  wrote:
> >> >
> >> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
> >"Rodney W.
> >> > > Grimes"
> >> > > writes:
> >> > > > > Author: cy
> >> > > > > Date: Thu Apr 18 01:02:00 2019
> >> > > > > New Revision: 346341
> >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
> >> > > > >
> >> > > > > Log:
> >> > > > >   As an interim measure until a more permanent solution is
> >implemented
> >> > > > >   workaround the following error:
> >> > > > >
> >> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
> >error: use of
> >> > > > >   undeclared identifier
> >> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
> >&rights, FA_OPEN);
> >> > > > >
> >> > > > >   Reported by:O. Hartmann 
> >> > > > >   Reported by:Michael Butler 
> >> > > > >   Reported by:gjb@ & cy@ (implicit)
> >> > > > >   Reviewed by:emaste@
> >> > > > >   Noted by:   rgrimes@
> >> > > > >
> >> > > > > Modified:
> >> > > > >   head/tools/build/Makefile
> >> > > > >
> >> > > > > Modified: head/tools/build/Makefile
> >> > > > >
>
> >===
> >> > > > ===
> >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
> >(r34634
> >> > > > 0)
> >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
> >(r34634
> >> > > > 1)
> >> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> >> > > > >  INCS+=   libcasper.h
> >> > > > >  .endif
> >> > > > >
> >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> >> > > > >  CASPERINC+=
> >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> >> > > > rgs.h
> >> > > > > -.endif
> >> > > >
> >> > > > As a further note, we should probably hunt for any thing
> >> > > > that is explicity looking at /usr/include/... in a Makefile,
> >> > > > as that is minimally missing a ${DESTDIR} argument.
> >> > > >
> >> > > > The above may of actually worked if it had been written:
> >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> >> > > > someone may wish to test that.
> >> > > >
> >> > > > Also a pathname rooted at / without ${DESTDIR} is almost
> >certainly a mistake.
> >> > >
> >> > > This is a better solution. I tested this in a tree with a
> >duplicated
> >> > > environment: Problem solved. Before this is committed it should
> >be
> >> > > tested on one of the universe machines.
> >> >
> >> > From what Ed just said this would also be wrong,
> >> > as well as CASPERINC+= above being wrong, if this
> >> > is being built for the host we should not be using
> >> > any headers from ${SRCTOP} at all.
> >> >
> >> > if capfileargs.h does not exist on the host that functionality
> >> > must not be compiled into the buildtool as the host does not
> >> > have this feature and attempting to use it from SRCTOP is wrong.
> >> >
> >>
> >> Keep in mind that this is bootstrap; it's being built for the host
> >> system, but it will link against a version of libcasper that's been
> >> built in an earlier stage with the proper featureset.
> >
> >Ok, flip flop again, if infact this is linked against a
> >library that implements the stuff from cap_fileargs.h then
> >infact the ${DESTDIR} addition so that the build peaks into
> >the cross build tree is correct, or what ever the equivelent
> >to DESTDIR is for that ?  BUILDDIR?  The point is it should
> >be picking this header up from the object tree, NOT from
> >the running system.
>
> Yes, this was my conclusion when working on kerberos and ntp. This is also
> true of libraries,  else one would need to installworld and buildworld
> again to get a properly built library/binary.
>
> IIRC ngie@ fixed a number of these across the tree a couple of years ago.


OK. There's a number of different issues going on. As the original author
of libegacy (which is what we're seeing fail), let me address the design
generically and comment on different things that have come up in this
thread.

Since this is going into the libegacy that we're using to build the system,
the check for file is bogus, for reasons I'll discuss below.  When we add
new includes to the system, it is appropriate to do it this way. And when
this file was added to the system, the check was correct.

First off, DESTDIR is absolutely not correct since this is to build the
legacy library and legacy includes which augment the host's sources on
legacay system, hence the name. It's never the correct thing to use.

The problem that we have here is not that the file is missing (which is why
it was added the way it was a long time ago), but rather missing
functionality in a file that's been around for a long time.

So, since it is that class of problem, the canonical way we've dealt with
it in the past is to do somethi

Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Cy Schubert
On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" 
 wrote:
>> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>>  wrote:
>> >
>> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>,
>"Rodney W.
>> > > Grimes"
>> > > writes:
>> > > > > Author: cy
>> > > > > Date: Thu Apr 18 01:02:00 2019
>> > > > > New Revision: 346341
>> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
>> > > > >
>> > > > > Log:
>> > > > >   As an interim measure until a more permanent solution is
>implemented
>> > > > >   workaround the following error:
>> > > > >
>> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55:
>error: use of
>> > > > >   undeclared identifier
>> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0,
>&rights, FA_OPEN);
>> > > > >
>> > > > >   Reported by:O. Hartmann 
>> > > > >   Reported by:Michael Butler 
>> > > > >   Reported by:gjb@ & cy@ (implicit)
>> > > > >   Reviewed by:emaste@
>> > > > >   Noted by:   rgrimes@
>> > > > >
>> > > > > Modified:
>> > > > >   head/tools/build/Makefile
>> > > > >
>> > > > > Modified: head/tools/build/Makefile
>> > > > >
>===
>> > > > ===
>> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019   
>(r34634
>> > > > 0)
>> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019   
>(r34634
>> > > > 1)
>> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>> > > > >  INCS+=   libcasper.h
>> > > > >  .endif
>> > > > >
>> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
>> > > > >  CASPERINC+= 
>${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
>> > > > rgs.h
>> > > > > -.endif
>> > > >
>> > > > As a further note, we should probably hunt for any thing
>> > > > that is explicity looking at /usr/include/... in a Makefile,
>> > > > as that is minimally missing a ${DESTDIR} argument.
>> > > >
>> > > > The above may of actually worked if it had been written:
>> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
>> > > > someone may wish to test that.
>> > > >
>> > > > Also a pathname rooted at / without ${DESTDIR} is almost
>certainly a mistake.
>> > >
>> > > This is a better solution. I tested this in a tree with a
>duplicated
>> > > environment: Problem solved. Before this is committed it should
>be
>> > > tested on one of the universe machines.
>> >
>> > From what Ed just said this would also be wrong,
>> > as well as CASPERINC+= above being wrong, if this
>> > is being built for the host we should not be using
>> > any headers from ${SRCTOP} at all.
>> >
>> > if capfileargs.h does not exist on the host that functionality
>> > must not be compiled into the buildtool as the host does not
>> > have this feature and attempting to use it from SRCTOP is wrong.
>> >
>> 
>> Keep in mind that this is bootstrap; it's being built for the host
>> system, but it will link against a version of libcasper that's been
>> built in an earlier stage with the proper featureset.
>
>Ok, flip flop again, if infact this is linked against a
>library that implements the stuff from cap_fileargs.h then
>infact the ${DESTDIR} addition so that the build peaks into
>the cross build tree is correct, or what ever the equivelent
>to DESTDIR is for that ?  BUILDDIR?  The point is it should
>be picking this header up from the object tree, NOT from
>the running system.

Yes, this was my conclusion when working on kerberos and ntp. This is also true 
of libraries,  else one would need to installworld and buildworld again to get 
a properly built library/binary. 

IIRC ngie@ fixed a number of these across the tree a couple of years ago. 

-- 
Pardon the typos and autocorrect, small keyboard in use.
Cheers,
Cy Schubert 
FreeBSD UNIX:  Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Rodney W. Grimes
> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
>  wrote:
> >
> > > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney W.
> > > Grimes"
> > > writes:
> > > > > Author: cy
> > > > > Date: Thu Apr 18 01:02:00 2019
> > > > > New Revision: 346341
> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > > >
> > > > > Log:
> > > > >   As an interim measure until a more permanent solution is implemented
> > > > >   workaround the following error:
> > > > >
> > > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use 
> > > > > of
> > > > >   undeclared identifier
> > > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, 
> > > > > FA_OPEN);
> > > > >
> > > > >   Reported by:O. Hartmann 
> > > > >   Reported by:Michael Butler 
> > > > >   Reported by:gjb@ & cy@ (implicit)
> > > > >   Reviewed by:emaste@
> > > > >   Noted by:   rgrimes@
> > > > >
> > > > > Modified:
> > > > >   head/tools/build/Makefile
> > > > >
> > > > > Modified: head/tools/build/Makefile
> > > > > ===
> > > > ===
> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
> > > > > (r34634
> > > > 0)
> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
> > > > > (r34634
> > > > 1)
> > > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> > > > >  INCS+=   libcasper.h
> > > > >  .endif
> > > > >
> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > > > >  CASPERINC+=  
> > > > > ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> > > > rgs.h
> > > > > -.endif
> > > >
> > > > As a further note, we should probably hunt for any thing
> > > > that is explicity looking at /usr/include/... in a Makefile,
> > > > as that is minimally missing a ${DESTDIR} argument.
> > > >
> > > > The above may of actually worked if it had been written:
> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > > > someone may wish to test that.
> > > >
> > > > Also a pathname rooted at / without ${DESTDIR} is almost certainly a 
> > > > mistake.
> > >
> > > This is a better solution. I tested this in a tree with a duplicated
> > > environment: Problem solved. Before this is committed it should be
> > > tested on one of the universe machines.
> >
> > From what Ed just said this would also be wrong,
> > as well as CASPERINC+= above being wrong, if this
> > is being built for the host we should not be using
> > any headers from ${SRCTOP} at all.
> >
> > if capfileargs.h does not exist on the host that functionality
> > must not be compiled into the buildtool as the host does not
> > have this feature and attempting to use it from SRCTOP is wrong.
> >
> 
> Keep in mind that this is bootstrap; it's being built for the host
> system, but it will link against a version of libcasper that's been
> built in an earlier stage with the proper featureset.

Ok, flip flop again, if infact this is linked against a
library that implements the stuff from cap_fileargs.h then
infact the ${DESTDIR} addition so that the build peaks into
the cross build tree is correct, or what ever the equivelent
to DESTDIR is for that ?  BUILDDIR?  The point is it should
be picking this header up from the object tree, NOT from
the running system.


-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Kyle Evans
On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes
 wrote:
>
> > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney W.
> > Grimes"
> > writes:
> > > > Author: cy
> > > > Date: Thu Apr 18 01:02:00 2019
> > > > New Revision: 346341
> > > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > >
> > > > Log:
> > > >   As an interim measure until a more permanent solution is implemented
> > > >   workaround the following error:
> > > >
> > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
> > > >   undeclared identifier
> > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, 
> > > > FA_OPEN);
> > > >
> > > >   Reported by:O. Hartmann 
> > > >   Reported by:Michael Butler 
> > > >   Reported by:gjb@ & cy@ (implicit)
> > > >   Reviewed by:emaste@
> > > >   Noted by:   rgrimes@
> > > >
> > > > Modified:
> > > >   head/tools/build/Makefile
> > > >
> > > > Modified: head/tools/build/Makefile
> > > > ===
> > > ===
> > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019
> > > > (r34634
> > > 0)
> > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019
> > > > (r34634
> > > 1)
> > > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> > > >  INCS+=   libcasper.h
> > > >  .endif
> > > >
> > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > > >  CASPERINC+=  
> > > > ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> > > rgs.h
> > > > -.endif
> > >
> > > As a further note, we should probably hunt for any thing
> > > that is explicity looking at /usr/include/... in a Makefile,
> > > as that is minimally missing a ${DESTDIR} argument.
> > >
> > > The above may of actually worked if it had been written:
> > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > > someone may wish to test that.
> > >
> > > Also a pathname rooted at / without ${DESTDIR} is almost certainly a 
> > > mistake.
> >
> > This is a better solution. I tested this in a tree with a duplicated
> > environment: Problem solved. Before this is committed it should be
> > tested on one of the universe machines.
>
> From what Ed just said this would also be wrong,
> as well as CASPERINC+= above being wrong, if this
> is being built for the host we should not be using
> any headers from ${SRCTOP} at all.
>
> if capfileargs.h does not exist on the host that functionality
> must not be compiled into the buildtool as the host does not
> have this feature and attempting to use it from SRCTOP is wrong.
>

Keep in mind that this is bootstrap; it's being built for the host
system, but it will link against a version of libcasper that's been
built in an earlier stage with the proper featureset.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Rodney W. Grimes
> In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney W. 
> Grimes"
> writes:
> > > Author: cy
> > > Date: Thu Apr 18 01:02:00 2019
> > > New Revision: 346341
> > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > 
> > > Log:
> > >   As an interim measure until a more permanent solution is implemented
> > >   workaround the following error:
> > >   
> > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
> > >   undeclared identifier
> > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
> > >   
> > >   Reported by:O. Hartmann 
> > >   Reported by:Michael Butler 
> > >   Reported by:gjb@ & cy@ (implicit)
> > >   Reviewed by:emaste@
> > >   Noted by:   rgrimes@
> > > 
> > > Modified:
> > >   head/tools/build/Makefile
> > > 
> > > Modified: head/tools/build/Makefile
> > > ===
> > ===
> > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019(r34634
> > 0)
> > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019(r34634
> > 1)
> > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> > >  INCS+=   libcasper.h
> > >  .endif
> > >  
> > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > >  CASPERINC+=  ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> > rgs.h
> > > -.endif
> >
> > As a further note, we should probably hunt for any thing
> > that is explicity looking at /usr/include/... in a Makefile,
> > as that is minimally missing a ${DESTDIR} argument.
> >
> > The above may of actually worked if it had been written:
> > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > someone may wish to test that.
> >
> > Also a pathname rooted at / without ${DESTDIR} is almost certainly a 
> > mistake.
> 
> This is a better solution. I tested this in a tree with a duplicated 
> environment: Problem solved. Before this is committed it should be 
> tested on one of the universe machines.

>From what Ed just said this would also be wrong,
as well as CASPERINC+= above being wrong, if this
is being built for the host we should not be using
any headers from ${SRCTOP} at all.

if capfileargs.h does not exist on the host that functionality
must not be compiled into the buildtool as the host does not
have this feature and attempting to use it from SRCTOP is wrong.

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-18 Thread Ed Maste
On Wed, 17 Apr 2019 at 21:07, Rodney W. Grimes
 wrote:
>
> Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake.

It's not in fact; strings is being built for the host here, and the
headers in /usr/include are the appropriate ones.

In this specific case the Capsicum change needs to be made fully
portable for upstreaming to the ELF Tool Chain project and when that
happens it will build on FreeBSD build hosts older than r346314 the
same way it will build on Linux or other hosts without an up-to-date
cap_fileargs, by using a local portability wrappers.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-17 Thread Cy Schubert
In message 
, Ian Le
pore writes:
> On Wed, 2019-04-17 at 20:32 -0700, Cy Schubert wrote:
> > In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney
> > W. 
> > Grimes"
> > writes:
> > > > Author: cy
> > > > Date: Thu Apr 18 01:02:00 2019
> > > > New Revision: 346341
> > > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > > 
> > > > Log:
> > > >   As an interim measure until a more permanent solution is
> > > > implemented
> > > >   workaround the following error:
> > > >   
> > > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error:
> > > > use of
> > > >   undeclared identifier
> > > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights,
> > > > FA_OPEN);
> > > >   
> > > >   Reported by:  O. Hartmann 
> > > >   Reported by:  Michael Butler 
> > > >   Reported by:  gjb@ & cy@ (implicit)
> > > >   Reviewed by:  emaste@
> > > >   Noted by: rgrimes@
> > > > 
> > > > Modified:
> > > >   head/tools/build/Makefile
> > > > 
> > > > Modified: head/tools/build/Makefile
> > > > =
> > > > ==
> > > 
> > > ===
> > > > --- head/tools/build/Makefile   Thu Apr 18 00:38:54 2019(
> > > > r34634
> > > 
> > > 0)
> > > > +++ head/tools/build/Makefile   Thu Apr 18 01:02:00 2019(
> > > > r34634
> > > 
> > > 1)
> > > > @@ -59,9 +59,7 @@ INCS+=capsicum_helpers.h
> > > >  INCS+= libcasper.h
> > > >  .endif
> > > >  
> > > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > > >  CASPERINC+=${SRCTOP}/lib/libcasper/services/cap_fileargs/c
> > > > ap_filea
> > > 
> > > rgs.h
> > > > -.endif
> > > 
> > > As a further note, we should probably hunt for any thing
> > > that is explicity looking at /usr/include/... in a Makefile,
> > > as that is minimally missing a ${DESTDIR} argument.
> > > 
> > > The above may of actually worked if it had been written:
> > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > > someone may wish to test that.
> > > 
> > > Also a pathname rooted at / without ${DESTDIR} is almost certainly
> > > a mistake.
> > 
> > This is a better solution. I tested this in a tree with a duplicated 
> > environment: Problem solved. Before this is committed it should be 
> > tested on one of the universe machines.
> > 
> > 
>
> I'm having a hard time understanding how adding $DESTDIR is any kind of
> solution to something that happens at build time as opposed to install
> time.  I typically run buildworld/kernel without DESTDIR defined.

$DESTDIR is also used as a destination for the temporary build 
directory $WORLDTMP, i.e. /usr/obj/${ARCH}/tmp, also known as $SYSROOT.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-17 Thread Ian Lepore
On Wed, 2019-04-17 at 20:32 -0700, Cy Schubert wrote:
> In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney
> W. 
> Grimes"
> writes:
> > > Author: cy
> > > Date: Thu Apr 18 01:02:00 2019
> > > New Revision: 346341
> > > URL: https://svnweb.freebsd.org/changeset/base/346341
> > > 
> > > Log:
> > >   As an interim measure until a more permanent solution is
> > > implemented
> > >   workaround the following error:
> > >   
> > >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error:
> > > use of
> > >   undeclared identifier
> > >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights,
> > > FA_OPEN);
> > >   
> > >   Reported by:O. Hartmann 
> > >   Reported by:Michael Butler 
> > >   Reported by:gjb@ & cy@ (implicit)
> > >   Reviewed by:emaste@
> > >   Noted by:   rgrimes@
> > > 
> > > Modified:
> > >   head/tools/build/Makefile
> > > 
> > > Modified: head/tools/build/Makefile
> > > =
> > > ==
> > 
> > ===
> > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019(
> > > r34634
> > 
> > 0)
> > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019(
> > > r34634
> > 
> > 1)
> > > @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
> > >  INCS+=   libcasper.h
> > >  .endif
> > >  
> > > -.if !exists(/usr/include/casper/cap_fileargs.h)
> > >  CASPERINC+=  ${SRCTOP}/lib/libcasper/services/cap_fileargs/c
> > > ap_filea
> > 
> > rgs.h
> > > -.endif
> > 
> > As a further note, we should probably hunt for any thing
> > that is explicity looking at /usr/include/... in a Makefile,
> > as that is minimally missing a ${DESTDIR} argument.
> > 
> > The above may of actually worked if it had been written:
> > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> > someone may wish to test that.
> > 
> > Also a pathname rooted at / without ${DESTDIR} is almost certainly
> > a mistake.
> 
> This is a better solution. I tested this in a tree with a duplicated 
> environment: Problem solved. Before this is committed it should be 
> tested on one of the universe machines.
> 
> 

I'm having a hard time understanding how adding $DESTDIR is any kind of
solution to something that happens at build time as opposed to install
time.  I typically run buildworld/kernel without DESTDIR defined.

-- Ian

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-17 Thread Cy Schubert
In message <201904180107.x3i17qdc002...@gndrsh.dnsmgr.net>, "Rodney W. 
Grimes"
writes:
> > Author: cy
> > Date: Thu Apr 18 01:02:00 2019
> > New Revision: 346341
> > URL: https://svnweb.freebsd.org/changeset/base/346341
> > 
> > Log:
> >   As an interim measure until a more permanent solution is implemented
> >   workaround the following error:
> >   
> >   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
> >   undeclared identifier
> >   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
> >   
> >   Reported by:  O. Hartmann 
> >   Reported by:  Michael Butler 
> >   Reported by:  gjb@ & cy@ (implicit)
> >   Reviewed by:  emaste@
> >   Noted by: rgrimes@
> > 
> > Modified:
> >   head/tools/build/Makefile
> > 
> > Modified: head/tools/build/Makefile
> > ===
> ===
> > --- head/tools/build/Makefile   Thu Apr 18 00:38:54 2019(r34634
> 0)
> > +++ head/tools/build/Makefile   Thu Apr 18 01:02:00 2019(r34634
> 1)
> > @@ -59,9 +59,7 @@ INCS+=capsicum_helpers.h
> >  INCS+= libcasper.h
> >  .endif
> >  
> > -.if !exists(/usr/include/casper/cap_fileargs.h)
> >  CASPERINC+=${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea
> rgs.h
> > -.endif
>
> As a further note, we should probably hunt for any thing
> that is explicity looking at /usr/include/... in a Makefile,
> as that is minimally missing a ${DESTDIR} argument.
>
> The above may of actually worked if it had been written:
> .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
> someone may wish to test that.
>
> Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake.

This is a better solution. I tested this in a tree with a duplicated 
environment: Problem solved. Before this is committed it should be 
tested on one of the universe machines.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346341 - head/tools/build

2019-04-17 Thread Rodney W. Grimes
> Author: cy
> Date: Thu Apr 18 01:02:00 2019
> New Revision: 346341
> URL: https://svnweb.freebsd.org/changeset/base/346341
> 
> Log:
>   As an interim measure until a more permanent solution is implemented
>   workaround the following error:
>   
>   /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
>   undeclared identifier
>   'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
>   
>   Reported by:O. Hartmann 
>   Reported by:Michael Butler 
>   Reported by:gjb@ & cy@ (implicit)
>   Reviewed by:emaste@
>   Noted by:   rgrimes@
> 
> Modified:
>   head/tools/build/Makefile
> 
> Modified: head/tools/build/Makefile
> ==
> --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019(r346340)
> +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019(r346341)
> @@ -59,9 +59,7 @@ INCS+=  capsicum_helpers.h
>  INCS+=   libcasper.h
>  .endif
>  
> -.if !exists(/usr/include/casper/cap_fileargs.h)
>  CASPERINC+=  ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h
> -.endif

As a further note, we should probably hunt for any thing
that is explicity looking at /usr/include/... in a Makefile,
as that is minimally missing a ${DESTDIR} argument.

The above may of actually worked if it had been written:
.if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h)
someone may wish to test that.

Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake.

>  .if empty(SRCS)
>  SRCS=dummy.c

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346341 - head/tools/build

2019-04-17 Thread Cy Schubert
Author: cy
Date: Thu Apr 18 01:02:00 2019
New Revision: 346341
URL: https://svnweb.freebsd.org/changeset/base/346341

Log:
  As an interim measure until a more permanent solution is implemented
  workaround the following error:
  
  /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
  undeclared identifier
  'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
  
  Reported by:  O. Hartmann 
  Reported by:  Michael Butler 
  Reported by:  gjb@ & cy@ (implicit)
  Reviewed by:  emaste@
  Noted by: rgrimes@

Modified:
  head/tools/build/Makefile

Modified: head/tools/build/Makefile
==
--- head/tools/build/Makefile   Thu Apr 18 00:38:54 2019(r346340)
+++ head/tools/build/Makefile   Thu Apr 18 01:02:00 2019(r346341)
@@ -59,9 +59,7 @@ INCS+=capsicum_helpers.h
 INCS+= libcasper.h
 .endif
 
-.if !exists(/usr/include/casper/cap_fileargs.h)
 CASPERINC+=${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h
-.endif
 
 .if empty(SRCS)
 SRCS=  dummy.c
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"