Re: 11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-14 Thread Bryan Drewery
On 6/13/2016 7:26 PM, Mark Millard wrote:
> [The following is after the svnltie update -r301873 /usr/src .]
> 
> For the following in a amd64 rebuild on amd64 (a WITH_META_MODE=yes 
> buidlworld buidlkernel just after a without meta mode buildworld buildkernel 
> [no install]). . .
> 
>> # more sys/modules/drm2/radeonkmsfw/Makefile.inc 
>> # $FreeBSD: head/sys/modules/drm2/radeonkmsfw/Makefile.inc 254885 2013-08-25 
>> 19:37:15Z dumbbell $
>> #
>> # Common rules for building firmware.  Note this gets auto-included
>> # by the subdir Makefile's as a consequence of included bsd.kmod.mk.
>>
>> _FIRM=  ${IMG}.bin
>>
>> CLEANFILES+=${_FIRM}
>>
>> FIRMWS= ${_FIRM}:${KMOD}
>>
>> #
>> # Note that a license ack is not needed for iwn.
>> #
>> #FIRMWARE_LICENSE=
>>
>> ${_FIRM}: ${.CURDIR}/../../../../contrib/dev/drm2/radeonkmsfw/${_FIRM}.uu
>> uudecode -p $? > ${.TARGET}
> 
> 
> I just had . . .
> (Note the uudecode line in the .meta file, the reference to stdin, and the 
> resultant "begin" line error.)
> 
>> # more 
>> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin.meta
>>  
>> # Meta data file 
>> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin.meta
>> CMD uudecode -p  > ARUBA_me.bin
>> CWD 
>> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me
>> TARGET ARUBA_me.bin
>> -- command output --
>> uudecode: stdin: missing or bad "begin" line
>> *** Error code 1
>>

This should be fixed after r301900.  Note that it is only fixed once you
get the new bmake installed from that revision.

>> -- filemon acquired metadata --
>> # filemon version 5
>> # Target pid 7146
>> # Start 1465867565.855820
>> V 5
>> E 7163 /bin/sh
>> R 7163 /etc/libmap.conf
>> R 7163 /var/run/ld-elf.so.hints
>> R 7163 /lib/libedit.so.7
>> R 7163 /lib/libc.so.7
>> R 7163 /lib/libncursesw.so.8
>> F 7163 7164
>> W 7164 ARUBA_me.bin
>> E 7164 /usr/bin/uudecode
>> R 7164 /etc/libmap.conf
>> R 7164 /var/run/ld-elf.so.hints
>> R 7164 /lib/libc.so.7
>> X 7164 1 0
>> X 7163 1 0
>> # Stop 1465867565.868045
>> # Bye bye
> 
> 
> ===
> Mark Millard
> markmi at dsl-only.net
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: 11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-14 Thread Simon J. Gerraty
Bryan Drewery  wrote:
> I think my point is getting lost.  With the new missing-meta feature, if

> Yet, via meta_oodate, if there is already a .meta file and .OODATE is
> used and has an empty source list then $.OODATE is forced to be .ALLSRC:

Ah yes forgot about that.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: 11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-14 Thread Simon J. Gerraty
Bryan Drewery  wrote:
> Actually it does seem to be meta-missing bug since $? (.OODATE) is empty
> and yet it is requiring a .meta file.

As I said; .meta files and targets that use $? (.OODATE)
are fundamentally incompatible.

Such a target will not work correctly, if meta_oodate returns TRUE
so add .NOMETA or change the target to not use $?
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: 11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-14 Thread Bryan Drewery
On 6/13/2016 8:18 PM, Simon J. Gerraty wrote:
> Bryan Drewery  wrote:
 ${_FIRM}: ${.CURDIR}/../../../../contrib/dev/drm2/radeonkmsfw/${_FIRM}.uu
 uudecode -p $? > ${.TARGET}
> Targets like this that use $? or ${.OODATE} are a bad fit with META mode.
> 
> If the normal make rules think the target is up to date, .OODATE will be
> empty, thus if meta_oodate says the target is out-of-date, the script
> will run with no args - because $? expands to nothing.
> 
> So either the use of $? should be replaced with ${.ALLSRC} or something
> else that will be consistent, or the target should be marked .NOMETA

I think my point is getting lost.  With the new missing-meta feature, if
a target uses .OODATE and has no .meta file then it is forced to run
*Even if no targets are out-of-date* and yields an empty result.

Yet, via meta_oodate, if there is already a .meta file and .OODATE is
used and has an empty source list then $.OODATE is forced to be .ALLSRC:

> if (oodate && needOODATE) {   
> /*
>  * Target uses .OODATE which is empty; or we wouldn't be here.
>  * We have decided it is oodate, so .OODATE needs to be set.  
>  * All we can sanely do is set it to .ALLSRC. 
>  */   
> Var_Delete(OODATE, gn);   
> Var_Set(OODATE, Var_Value(ALLSRC, gn, ), gn, 0);   
> free(cp); 
> } 

What's missing is setting of needOODATE in the metaMissing case so that
it auto applies the .OODATE=.ALLSRC hack/fixup which is what you're
suggesting as well.

I don't think it is right to force manually adding .NOMETA to all
.OODATE usages since there's already logic to handle .OODATE in the
.meta existing case.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: 11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-14 Thread Simon J. Gerraty
Bryan Drewery  wrote:
> The problem is missing-meta requiring a .meta file here.  The $?/.OODATE
> comparison exception is only used meta_oodate() if there is already a
> .meta file, not for the new missing .meta logic.

Even if there is already a .meta file, if meta_oodate ever returns TRUE
the target will not work correctly.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: 11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-13 Thread Bryan Drewery
On 6/13/16 8:18 PM, Simon J. Gerraty wrote:
> Bryan Drewery  wrote:
 ${_FIRM}: ${.CURDIR}/../../../../contrib/dev/drm2/radeonkmsfw/${_FIRM}.uu
 uudecode -p $? > ${.TARGET}
> 
> Targets like this that use $? or ${.OODATE} are a bad fit with META mode.
> 
> If the normal make rules think the target is up to date, .OODATE will be
> empty, thus if meta_oodate says the target is out-of-date, the script
> will run with no args - because $? expands to nothing.
> 
> So either the use of $? should be replaced with ${.ALLSRC} or something
> else that will be consistent, or the target should be marked .NOMETA
> 
> FYI we can [ab]use ${.OODATE} as a token to prevent a line of a script
> from being compared - meta mode knows that the value of .OODATE is
> inconsistent so should not be compared... thus putting
> ${.OODATE:MNO_META_CMP} on a line expands to nothing - no impact on the
> command but still tells meta_oodate to ignore that line for comparison
> purposes. 
> 

The problem is missing-meta requiring a .meta file here.  The $?/.OODATE
comparison exception is only used meta_oodate() if there is already a
.meta file, not for the new missing .meta logic.

-- 
Regards,
Bryan Drewery
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: 11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-13 Thread Simon J. Gerraty
Bryan Drewery  wrote:
> >> ${_FIRM}: ${.CURDIR}/../../../../contrib/dev/drm2/radeonkmsfw/${_FIRM}.uu
> >> uudecode -p $? > ${.TARGET}

Targets like this that use $? or ${.OODATE} are a bad fit with META mode.

If the normal make rules think the target is up to date, .OODATE will be
empty, thus if meta_oodate says the target is out-of-date, the script
will run with no args - because $? expands to nothing.

So either the use of $? should be replaced with ${.ALLSRC} or something
else that will be consistent, or the target should be marked .NOMETA

FYI we can [ab]use ${.OODATE} as a token to prevent a line of a script
from being compared - meta mode knows that the value of .OODATE is
inconsistent so should not be compared... thus putting
${.OODATE:MNO_META_CMP} on a line expands to nothing - no impact on the
command but still tells meta_oodate to ignore that line for comparison
purposes. 
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: 11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-13 Thread Bryan Drewery
On 6/13/16 7:56 PM, Bryan Drewery wrote:
> On 6/13/2016 7:26 PM, Mark Millard wrote:
>> [The following is after the svnltie update -r301873 /usr/src .]
>>
>> For the following in a amd64 rebuild on amd64 (a WITH_META_MODE=yes 
>> buidlworld buidlkernel just after a without meta mode buildworld buildkernel 
>> [no install]). . .
>>
>>> # more sys/modules/drm2/radeonkmsfw/Makefile.inc 
>>> # $FreeBSD: head/sys/modules/drm2/radeonkmsfw/Makefile.inc 254885 
>>> 2013-08-25 19:37:15Z dumbbell $
>>> #
>>> # Common rules for building firmware.  Note this gets auto-included
>>> # by the subdir Makefile's as a consequence of included bsd.kmod.mk.
>>>
>>> _FIRM=  ${IMG}.bin
>>>
>>> CLEANFILES+=${_FIRM}
>>>
>>> FIRMWS= ${_FIRM}:${KMOD}
>>>
>>> #
>>> # Note that a license ack is not needed for iwn.
>>> #
>>> #FIRMWARE_LICENSE=
>>>
>>> ${_FIRM}: ${.CURDIR}/../../../../contrib/dev/drm2/radeonkmsfw/${_FIRM}.uu
>>> uudecode -p $? > ${.TARGET}
>>
>>
>> I just had . . .
>> (Note the uudecode line in the .meta file, the reference to stdin, and the 
>> resultant "begin" line error.)
>>
>>> # more 
>>> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin.meta
>>>  
>>> # Meta data file 
>>> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin.meta
>>> CMD uudecode -p  > ARUBA_me.bin
>>> CWD 
>>> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me
>>> TARGET ARUBA_me.bin
>>> -- command output --
>>> uudecode: stdin: missing or bad "begin" line
>>> *** Error code 1
>>>
>>> -- filemon acquired metadata --
>>> # filemon version 5
>>> # Target pid 7146
>>> # Start 1465867565.855820
>>> V 5
>>> E 7163 /bin/sh
>>> R 7163 /etc/libmap.conf
>>> R 7163 /var/run/ld-elf.so.hints
>>> R 7163 /lib/libedit.so.7
>>> R 7163 /lib/libc.so.7
>>> R 7163 /lib/libncursesw.so.8
>>> F 7163 7164
>>> W 7164 ARUBA_me.bin
>>> E 7164 /usr/bin/uudecode
>>> R 7164 /etc/libmap.conf
>>> R 7164 /var/run/ld-elf.so.hints
>>> R 7164 /lib/libc.so.7
>>> X 7164 1 0
>>> X 7163 1 0
>>> # Stop 1465867565.868045
>>> # Bye bye
>>
>>
> 
> I don't know what's going on here at first glance but it doesn't look
> related to META_MODE.  I'm not too familiar with $?.
> 

Actually it does seem to be meta-missing bug since $? (.OODATE) is empty
and yet it is requiring a .meta file.

Easy way to recreate it:

cd sys/modules/drm2/radeonkmsfw/ARUBA_me
make cleandir
make obj
make
make -dM # it notes that ARUBA_me.bin cannot be compared due to .OODATE
rm $(make whereobj)/ARUBA_me.bin.meta
make -dM

> /usr/obj/root/git/freebsd/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin.meta:
>  required but missing
> Building 
> /usr/obj/root/git/freebsd/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin
> 
> load: 17.72  cmd: uudecode 86777 [ttyin] 9.98r 0.00u 0.00s 0% 2052k




-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: 11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-13 Thread Bryan Drewery
On 6/13/2016 7:26 PM, Mark Millard wrote:
> [The following is after the svnltie update -r301873 /usr/src .]
> 
> For the following in a amd64 rebuild on amd64 (a WITH_META_MODE=yes 
> buidlworld buidlkernel just after a without meta mode buildworld buildkernel 
> [no install]). . .
> 
>> # more sys/modules/drm2/radeonkmsfw/Makefile.inc 
>> # $FreeBSD: head/sys/modules/drm2/radeonkmsfw/Makefile.inc 254885 2013-08-25 
>> 19:37:15Z dumbbell $
>> #
>> # Common rules for building firmware.  Note this gets auto-included
>> # by the subdir Makefile's as a consequence of included bsd.kmod.mk.
>>
>> _FIRM=  ${IMG}.bin
>>
>> CLEANFILES+=${_FIRM}
>>
>> FIRMWS= ${_FIRM}:${KMOD}
>>
>> #
>> # Note that a license ack is not needed for iwn.
>> #
>> #FIRMWARE_LICENSE=
>>
>> ${_FIRM}: ${.CURDIR}/../../../../contrib/dev/drm2/radeonkmsfw/${_FIRM}.uu
>> uudecode -p $? > ${.TARGET}
> 
> 
> I just had . . .
> (Note the uudecode line in the .meta file, the reference to stdin, and the 
> resultant "begin" line error.)
> 
>> # more 
>> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin.meta
>>  
>> # Meta data file 
>> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin.meta
>> CMD uudecode -p  > ARUBA_me.bin
>> CWD 
>> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me
>> TARGET ARUBA_me.bin
>> -- command output --
>> uudecode: stdin: missing or bad "begin" line
>> *** Error code 1
>>
>> -- filemon acquired metadata --
>> # filemon version 5
>> # Target pid 7146
>> # Start 1465867565.855820
>> V 5
>> E 7163 /bin/sh
>> R 7163 /etc/libmap.conf
>> R 7163 /var/run/ld-elf.so.hints
>> R 7163 /lib/libedit.so.7
>> R 7163 /lib/libc.so.7
>> R 7163 /lib/libncursesw.so.8
>> F 7163 7164
>> W 7164 ARUBA_me.bin
>> E 7164 /usr/bin/uudecode
>> R 7164 /etc/libmap.conf
>> R 7164 /var/run/ld-elf.so.hints
>> R 7164 /lib/libc.so.7
>> X 7164 1 0
>> X 7163 1 0
>> # Stop 1465867565.868045
>> # Bye bye
> 
> 

I don't know what's going on here at first glance but it doesn't look
related to META_MODE.  I'm not too familiar with $?.


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


11.0 -r301815 to -r310873 using WITH_META_MODE=yes : an empty filename failure

2016-06-13 Thread Mark Millard
[The following is after the svnltie update -r301873 /usr/src .]

For the following in a amd64 rebuild on amd64 (a WITH_META_MODE=yes buidlworld 
buidlkernel just after a without meta mode buildworld buildkernel [no 
install]). . .

> # more sys/modules/drm2/radeonkmsfw/Makefile.inc 
> # $FreeBSD: head/sys/modules/drm2/radeonkmsfw/Makefile.inc 254885 2013-08-25 
> 19:37:15Z dumbbell $
> #
> # Common rules for building firmware.  Note this gets auto-included
> # by the subdir Makefile's as a consequence of included bsd.kmod.mk.
> 
> _FIRM=  ${IMG}.bin
> 
> CLEANFILES+=${_FIRM}
> 
> FIRMWS= ${_FIRM}:${KMOD}
> 
> #
> # Note that a license ack is not needed for iwn.
> #
> #FIRMWARE_LICENSE=
> 
> ${_FIRM}: ${.CURDIR}/../../../../contrib/dev/drm2/radeonkmsfw/${_FIRM}.uu
> uudecode -p $? > ${.TARGET}


I just had . . .
(Note the uudecode line in the .meta file, the reference to stdin, and the 
resultant "begin" line error.)

> # more 
> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin.meta
>  
> # Meta data file 
> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me/ARUBA_me.bin.meta
> CMD uudecode -p  > ARUBA_me.bin
> CWD 
> /usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG/modules/usr/src/sys/modules/drm2/radeonkmsfw/ARUBA_me
> TARGET ARUBA_me.bin
> -- command output --
> uudecode: stdin: missing or bad "begin" line
> *** Error code 1
> 
> -- filemon acquired metadata --
> # filemon version 5
> # Target pid 7146
> # Start 1465867565.855820
> V 5
> E 7163 /bin/sh
> R 7163 /etc/libmap.conf
> R 7163 /var/run/ld-elf.so.hints
> R 7163 /lib/libedit.so.7
> R 7163 /lib/libc.so.7
> R 7163 /lib/libncursesw.so.8
> F 7163 7164
> W 7164 ARUBA_me.bin
> E 7164 /usr/bin/uudecode
> R 7164 /etc/libmap.conf
> R 7164 /var/run/ld-elf.so.hints
> R 7164 /lib/libc.so.7
> X 7164 1 0
> X 7163 1 0
> # Stop 1465867565.868045
> # Bye bye


===
Mark Millard
markmi at dsl-only.net

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