Re: svn commit: r339636 - in head: . share/mk

2018-11-06 Thread Markiyan Kushnir
Here it is. Environment:
# env
SSH_CLIENT=10.1.2.10 43379 22
REPLYTO=markiyan.kush...@gmail.com
LSCOLORS=gxfxcxdxbxegedabagacad
LOGNAME=root
PAGER=less
MAIL=/var/mail/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
EDITOR=vim
ENV=/root/.shrc
SSH_AUTH_SOCK=/tmp/ssh-vx8WNc4TSI/agent.56491
PWD=/root
TERM=xterm-256color
SSH_TTY=/dev/pts/0
HOME=/root
USER=root
GREP_COLOR=1;31
SSH_CONNECTION=10.1.2.10 43379 10.1.2.150 22
COLORTERM=1
SHELL=/bin/sh
BLOCKSIZE=K

# cat /etc/make.conf
MALLOC_PRODUCTION=true
.if ${.CURDIR:M*/multimedia/ffmpeg}
CFLAGS += -ffast-math -fno-finite-math-only
.endif

# cat /etc/src.conf
WITHOUT_ATM=ok
WITH_BSD_GREP=ok
WITHOUT_CROSS_COMPILER=ok
WITH_CTF=ok
WITHOUT_DMAGENT=ok
WITH_EXTRA_TCP_STACKS=ok
WITHOUT_FLOPPY=ok
WITHOUT_GNU_DIFF=ok
WITHOUT_GNU_GREP=ok
WITHOUT_LIB32=ok
WITHOUT_LLVM_TARGET_ALL=ok
WITH_LOADER_LUA=ok
WITHOUT_MAIL=ok

# rm -Rf /usr/obj/*
# cd /usr/src && /usr/bin/make cleandir
# cd /usr/src && /usr/bin/make BUILD_WITH_STRICT_TMPPATH=0  buildworld
TARGET=amd64


yes, "BUILD_WITH_STRICT_TMPPATH=0" fixed buildworld, it has just passed 3.1
stage, now running as usual...

--
Markiyan




вт, 6 лист. 2018 о 19:37 Alexander Richardson 
пише:

> Hi Markiyan,
>
>
> This looks exactly like the SYSTEM_COMPILER/SYSTEM_LINKER build failure
> that should have been fixed by r340167.
> Does passing BUILD_WITH_STRICT_TMPPATH=0 on the make command line fix the
> build error? If so it seems like I missed one more SYSTEM_COMPILER case.
>
> Could you send me your buildworld command+environment variables so I can
> see what's going wrong?
>
> Thanks,
> Alex
>
>
> On Tue, 6 Nov 2018 at 17:12 Markiyan Kushnir 
> wrote:
>
>> Alexander,
>>
>> Cannot tell exactly what change it was, might be one of your recent
>> changes to bsd.compiler.mk or Makefile.inc1? ...
>>
>> Now running "make buildworld" I can proceed with "3.1: recording build
>> metadata" only having USING_SYSTEM_COMPILER=yes USING_SYSTEM_LINKER=yes set
>> in my environment. Otherwise I'm getting this:
>>
>> sh: cc: not found
>> make[2]: "/work/src.svn/share/mk/bsd.compiler.mk" line 176: Unable to
>> determine compiler type for CC=cc -target x86_64-unknown-freebsd13.0
>> --sysroot=//usr/obj/work/src.svn/amd64.amd64/tmp
>> -B//usr/obj/work/src.svn/amd64.amd64/tmp/usr/bin.  Consider setting
>> COMPILER_TYPE.
>> *** Error code 1
>>
>> Stop.
>> make[1]: stopped in /work/src.svn
>> *** Error code 1
>>
>> Stop.
>> make: stopped in /work/src.svn
>> Failed to build world
>>
>> I'm at rev. 340189. Could you please have a look?
>>
>> --
>> Markiyan
>>
>> вт, 6 лист. 2018 о 01:11 Alexander Richardson 
>> пише:
>>
>>> On Mon, 5 Nov 2018 at 23:00, Bryan Drewery  wrote:
>>> >
>>> > On 10/22/2018 11:31 PM, Alex Richardson wrote:
>>> > > Author: arichardson
>>> > > Date: Tue Oct 23 06:31:25 2018
>>> > > New Revision: 339636
>>> > > URL: https://svnweb.freebsd.org/changeset/base/339636
>>> > >
>>> > > Log:
>>> > >   Only compute the X_COMPILER_*/X_LINKER_* variables when needed
>>> > >
>>> > >   When building CheriBSD we have to set XLD/XCC/XCFLAGS on the
>>> command line.
>>> > >   This triggers the $XCC != $CC case in bsd.compiler.mk (and the
>>> same for LD
>>> > >   in bsd.linker.mk) which causes it to call ${XCC} --version and
>>> > >   ${XLD} --version (plus various awk+sed+echo calls) in every
>>> subdirectory.
>>> > >   For incremental builds and stages that only walk the source tree
>>> this is
>>> > >   often the majority of the time spent in that directory.
>>> > >
>>> > ...
>>> >
>>> > >   By only computing the value of the X_COMPILER_*/X_LINKER_*
>>> variables if
>>> > >   _WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of
>>> cc/ld calls
>>> > >   to once per build stage instead of once per recursive make.
>>> >
>>> > This sounds wrong. bsd.compiler.mk *already* handles that kind of
>>> thing
>>> > by exporting its computations. Adding a second hack for a similar
>>> > problem isn't the right solution.
>>> >
>>>
>>> I added debug .info statements for every time bsd.compiler.mk was
>>> running cc --version and it was always running it for $XCC during make
>>> buildworld.
>>> As far as I can tell this happens because $CC and $XCC no longer match.
>>> I believe the problem is that the toplevel makefile runs the cross
>>> stages with CC="${XCC} ${XCFLAGS}" so if you have XCFLAGS set in your
>>> environment $CC will never be equal to $XCC.
>>> This also means there is not cached variable for $XCC since it was
>>> computed for "${XCC} ${XCFLAGS}" rather than $XCC .
>>>
>>> This patch massively reduced the incremental build time for CheriBSD
>>> but if you can suggest I better fix that would be great.
>>>
>>> Alex
>>>
>> ___
>>> svn-src-...@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: r339636 - in head: . share/mk

2018-11-06 Thread Alexander Richardson
Hi Markiyan,


This looks exactly like the SYSTEM_COMPILER/SYSTEM_LINKER build failure
that should have been fixed by r340167.
Does passing BUILD_WITH_STRICT_TMPPATH=0 on the make command line fix the
build error? If so it seems like I missed one more SYSTEM_COMPILER case.

Could you send me your buildworld command+environment variables so I can
see what's going wrong?

Thanks,
Alex


On Tue, 6 Nov 2018 at 17:12 Markiyan Kushnir 
wrote:

> Alexander,
>
> Cannot tell exactly what change it was, might be one of your recent
> changes to bsd.compiler.mk or Makefile.inc1? ...
>
> Now running "make buildworld" I can proceed with "3.1: recording build
> metadata" only having USING_SYSTEM_COMPILER=yes USING_SYSTEM_LINKER=yes set
> in my environment. Otherwise I'm getting this:
>
> sh: cc: not found
> make[2]: "/work/src.svn/share/mk/bsd.compiler.mk" line 176: Unable to
> determine compiler type for CC=cc -target x86_64-unknown-freebsd13.0
> --sysroot=//usr/obj/work/src.svn/amd64.amd64/tmp
> -B//usr/obj/work/src.svn/amd64.amd64/tmp/usr/bin.  Consider setting
> COMPILER_TYPE.
> *** Error code 1
>
> Stop.
> make[1]: stopped in /work/src.svn
> *** Error code 1
>
> Stop.
> make: stopped in /work/src.svn
> Failed to build world
>
> I'm at rev. 340189. Could you please have a look?
>
> --
> Markiyan
>
> вт, 6 лист. 2018 о 01:11 Alexander Richardson 
> пише:
>
>> On Mon, 5 Nov 2018 at 23:00, Bryan Drewery  wrote:
>> >
>> > On 10/22/2018 11:31 PM, Alex Richardson wrote:
>> > > Author: arichardson
>> > > Date: Tue Oct 23 06:31:25 2018
>> > > New Revision: 339636
>> > > URL: https://svnweb.freebsd.org/changeset/base/339636
>> > >
>> > > Log:
>> > >   Only compute the X_COMPILER_*/X_LINKER_* variables when needed
>> > >
>> > >   When building CheriBSD we have to set XLD/XCC/XCFLAGS on the
>> command line.
>> > >   This triggers the $XCC != $CC case in bsd.compiler.mk (and the
>> same for LD
>> > >   in bsd.linker.mk) which causes it to call ${XCC} --version and
>> > >   ${XLD} --version (plus various awk+sed+echo calls) in every
>> subdirectory.
>> > >   For incremental builds and stages that only walk the source tree
>> this is
>> > >   often the majority of the time spent in that directory.
>> > >
>> > ...
>> >
>> > >   By only computing the value of the X_COMPILER_*/X_LINKER_*
>> variables if
>> > >   _WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of cc/ld
>> calls
>> > >   to once per build stage instead of once per recursive make.
>> >
>> > This sounds wrong. bsd.compiler.mk *already* handles that kind of thing
>> > by exporting its computations. Adding a second hack for a similar
>> > problem isn't the right solution.
>> >
>>
>> I added debug .info statements for every time bsd.compiler.mk was
>> running cc --version and it was always running it for $XCC during make
>> buildworld.
>> As far as I can tell this happens because $CC and $XCC no longer match.
>> I believe the problem is that the toplevel makefile runs the cross
>> stages with CC="${XCC} ${XCFLAGS}" so if you have XCFLAGS set in your
>> environment $CC will never be equal to $XCC.
>> This also means there is not cached variable for $XCC since it was
>> computed for "${XCC} ${XCFLAGS}" rather than $XCC .
>>
>> This patch massively reduced the incremental build time for CheriBSD
>> but if you can suggest I better fix that would be great.
>>
>> Alex
>>
> ___
>> svn-src-...@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-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r339636 - in head: . share/mk

2018-11-06 Thread Markiyan Kushnir
Alexander,

Cannot tell exactly what change it was, might be one of your recent changes
to bsd.compiler.mk or Makefile.inc1? ...

Now running "make buildworld" I can proceed with "3.1: recording build
metadata" only having USING_SYSTEM_COMPILER=yes USING_SYSTEM_LINKER=yes set
in my environment. Otherwise I'm getting this:

sh: cc: not found
make[2]: "/work/src.svn/share/mk/bsd.compiler.mk" line 176: Unable to
determine compiler type for CC=cc -target x86_64-unknown-freebsd13.0
--sysroot=//usr/obj/work/src.svn/amd64.amd64/tmp
-B//usr/obj/work/src.svn/amd64.amd64/tmp/usr/bin.  Consider setting
COMPILER_TYPE.
*** Error code 1

Stop.
make[1]: stopped in /work/src.svn
*** Error code 1

Stop.
make: stopped in /work/src.svn
Failed to build world

I'm at rev. 340189. Could you please have a look?

--
Markiyan

вт, 6 лист. 2018 о 01:11 Alexander Richardson 
пише:

> On Mon, 5 Nov 2018 at 23:00, Bryan Drewery  wrote:
> >
> > On 10/22/2018 11:31 PM, Alex Richardson wrote:
> > > Author: arichardson
> > > Date: Tue Oct 23 06:31:25 2018
> > > New Revision: 339636
> > > URL: https://svnweb.freebsd.org/changeset/base/339636
> > >
> > > Log:
> > >   Only compute the X_COMPILER_*/X_LINKER_* variables when needed
> > >
> > >   When building CheriBSD we have to set XLD/XCC/XCFLAGS on the command
> line.
> > >   This triggers the $XCC != $CC case in bsd.compiler.mk (and the same
> for LD
> > >   in bsd.linker.mk) which causes it to call ${XCC} --version and
> > >   ${XLD} --version (plus various awk+sed+echo calls) in every
> subdirectory.
> > >   For incremental builds and stages that only walk the source tree
> this is
> > >   often the majority of the time spent in that directory.
> > >
> > ...
> >
> > >   By only computing the value of the X_COMPILER_*/X_LINKER_* variables
> if
> > >   _WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of cc/ld
> calls
> > >   to once per build stage instead of once per recursive make.
> >
> > This sounds wrong. bsd.compiler.mk *already* handles that kind of thing
> > by exporting its computations. Adding a second hack for a similar
> > problem isn't the right solution.
> >
>
> I added debug .info statements for every time bsd.compiler.mk was
> running cc --version and it was always running it for $XCC during make
> buildworld.
> As far as I can tell this happens because $CC and $XCC no longer match.
> I believe the problem is that the toplevel makefile runs the cross
> stages with CC="${XCC} ${XCFLAGS}" so if you have XCFLAGS set in your
> environment $CC will never be equal to $XCC.
> This also means there is not cached variable for $XCC since it was
> computed for "${XCC} ${XCFLAGS}" rather than $XCC .
>
> This patch massively reduced the incremental build time for CheriBSD
> but if you can suggest I better fix that would be great.
>
> Alex
> ___
> svn-src-...@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-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r339636 - in head: . share/mk

2018-11-05 Thread Alexander Richardson
On Mon, 5 Nov 2018 at 23:00, Bryan Drewery  wrote:
>
> On 10/22/2018 11:31 PM, Alex Richardson wrote:
> > Author: arichardson
> > Date: Tue Oct 23 06:31:25 2018
> > New Revision: 339636
> > URL: https://svnweb.freebsd.org/changeset/base/339636
> >
> > Log:
> >   Only compute the X_COMPILER_*/X_LINKER_* variables when needed
> >
> >   When building CheriBSD we have to set XLD/XCC/XCFLAGS on the command line.
> >   This triggers the $XCC != $CC case in bsd.compiler.mk (and the same for LD
> >   in bsd.linker.mk) which causes it to call ${XCC} --version and
> >   ${XLD} --version (plus various awk+sed+echo calls) in every subdirectory.
> >   For incremental builds and stages that only walk the source tree this is
> >   often the majority of the time spent in that directory.
> >
> ...
>
> >   By only computing the value of the X_COMPILER_*/X_LINKER_* variables if
> >   _WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of cc/ld calls
> >   to once per build stage instead of once per recursive make.
>
> This sounds wrong. bsd.compiler.mk *already* handles that kind of thing
> by exporting its computations. Adding a second hack for a similar
> problem isn't the right solution.
>

I added debug .info statements for every time bsd.compiler.mk was
running cc --version and it was always running it for $XCC during make
buildworld.
As far as I can tell this happens because $CC and $XCC no longer match.
I believe the problem is that the toplevel makefile runs the cross
stages with CC="${XCC} ${XCFLAGS}" so if you have XCFLAGS set in your
environment $CC will never be equal to $XCC.
This also means there is not cached variable for $XCC since it was
computed for "${XCC} ${XCFLAGS}" rather than $XCC .

This patch massively reduced the incremental build time for CheriBSD
but if you can suggest I better fix that would be great.

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


Re: svn commit: r339636 - in head: . share/mk

2018-11-05 Thread Bryan Drewery
On 10/22/2018 11:31 PM, Alex Richardson wrote:
> Author: arichardson
> Date: Tue Oct 23 06:31:25 2018
> New Revision: 339636
> URL: https://svnweb.freebsd.org/changeset/base/339636
> 
> Log:
>   Only compute the X_COMPILER_*/X_LINKER_* variables when needed
>   
>   When building CheriBSD we have to set XLD/XCC/XCFLAGS on the command line.
>   This triggers the $XCC != $CC case in bsd.compiler.mk (and the same for LD
>   in bsd.linker.mk) which causes it to call ${XCC} --version and
>   ${XLD} --version (plus various awk+sed+echo calls) in every subdirectory.
>   For incremental builds and stages that only walk the source tree this is
>   often the majority of the time spent in that directory.
>   
...

>   By only computing the value of the X_COMPILER_*/X_LINKER_* variables if
>   _WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of cc/ld calls
>   to once per build stage instead of once per recursive make.

This sounds wrong. bsd.compiler.mk *already* handles that kind of thing
by exporting its computations. Adding a second hack for a similar
problem isn't the right solution.

>   
>   With this change (and no changes to the sources) the `make includes` stage
>   now takes 28 seconds at -j1 instead of 86 seconds.
>   
>   Approved By:brooks (mentor)
>   Differential Revision: https://reviews.freebsd.org/D17046


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature