* [Buildroot] [PATCH] Makefile: disable 'printvars' and 'show-vars' recipes for Make 4.3
@ 2022-01-01 21:40 Giulio Benetti
2022-01-04 17:15 ` Arnout Vandecappelle
2022-07-21 3:55 ` James Hilliard
0 siblings, 2 replies; 6+ messages in thread
From: Giulio Benetti @ 2022-01-01 21:40 UTC (permalink / raw)
To: buildroot; +Cc: Giulio Benetti, Yann E . MORIN
Make 4.3 is buggy and leads to a "Segmentation fault (core dumped)" when
calling 'make printvars' or 'make show-vars', so let's refuse to execute
those recipes if Make 4.3 by adding 'check-make-version' recipe as
depedendency of 'printvars' and 'show-vars' as suggested by Yann E. Morin.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
Makefile | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 0b8c7b2867..ac98b84425 100644
--- a/Makefile
+++ b/Makefile
@@ -1058,13 +1058,20 @@ ifeq ($(NEED_WRAPPER),y)
$(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
endif
+.PHONY: check-make-version
+check-make-version:
+ifneq ($(filter $(RUNNING_MAKE_VERSION),4.3),)
+ @echo "Make 4.3 doesn't support 'printvars' and 'show-vars' recipes"
+ @exit 1
+endif
+
# printvars prints all the variables currently defined in our
# Makefiles. Alternatively, if a non-empty VARS variable is passed,
# only the variables matching the make pattern passed in VARS are
# displayed.
# show-vars does the same, but as a JSON dictionnary.
.PHONY: printvars
-printvars:
+printvars: check-make-version
@:
$(foreach V, \
$(sort $(filter $(VARS),$(.VARIABLES))), \
@@ -1077,7 +1084,7 @@ printvars:
.PHONY: show-vars
show-vars: VARS?=%
-show-vars:
+show-vars: check-make-version
@:
$(info $(call clean-json, { \
$(foreach V, \
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] Makefile: disable 'printvars' and 'show-vars' recipes for Make 4.3
2022-01-01 21:40 [Buildroot] [PATCH] Makefile: disable 'printvars' and 'show-vars' recipes for Make 4.3 Giulio Benetti
@ 2022-01-04 17:15 ` Arnout Vandecappelle
2022-07-21 3:55 ` James Hilliard
1 sibling, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2022-01-04 17:15 UTC (permalink / raw)
To: Giulio Benetti, buildroot; +Cc: Yann E . MORIN
On 01/01/2022 22:40, Giulio Benetti wrote:
> Make 4.3 is buggy and leads to a "Segmentation fault (core dumped)" when
> calling 'make printvars' or 'make show-vars', so let's refuse to execute
> those recipes if Make 4.3 by adding 'check-make-version' recipe as
> depedendency of 'printvars' and 'show-vars' as suggested by Yann E. Morin.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Yeah, this has been bothering me for ages... I hope this gets fixed soon.
Applied to master, thanks.
Regards,
Arnout
> ---
> Makefile | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 0b8c7b2867..ac98b84425 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1058,13 +1058,20 @@ ifeq ($(NEED_WRAPPER),y)
> $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
> endif
>
> +.PHONY: check-make-version
> +check-make-version:
> +ifneq ($(filter $(RUNNING_MAKE_VERSION),4.3),)
> + @echo "Make 4.3 doesn't support 'printvars' and 'show-vars' recipes"
> + @exit 1
> +endif
> +
> # printvars prints all the variables currently defined in our
> # Makefiles. Alternatively, if a non-empty VARS variable is passed,
> # only the variables matching the make pattern passed in VARS are
> # displayed.
> # show-vars does the same, but as a JSON dictionnary.
> .PHONY: printvars
> -printvars:
> +printvars: check-make-version
> @:
> $(foreach V, \
> $(sort $(filter $(VARS),$(.VARIABLES))), \
> @@ -1077,7 +1084,7 @@ printvars:
>
> .PHONY: show-vars
> show-vars: VARS?=%
> -show-vars:
> +show-vars: check-make-version
> @:
> $(info $(call clean-json, { \
> $(foreach V, \
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] Makefile: disable 'printvars' and 'show-vars' recipes for Make 4.3
2022-01-01 21:40 [Buildroot] [PATCH] Makefile: disable 'printvars' and 'show-vars' recipes for Make 4.3 Giulio Benetti
2022-01-04 17:15 ` Arnout Vandecappelle
@ 2022-07-21 3:55 ` James Hilliard
2022-07-26 21:52 ` Giulio Benetti
1 sibling, 1 reply; 6+ messages in thread
From: James Hilliard @ 2022-07-21 3:55 UTC (permalink / raw)
To: Giulio Benetti; +Cc: Yann E . MORIN, buildroot
On Sat, Jan 1, 2022 at 2:40 PM Giulio Benetti
<giulio.benetti@benettiengineering.com> wrote:
>
> Make 4.3 is buggy and leads to a "Segmentation fault (core dumped)" when
> calling 'make printvars' or 'make show-vars', so let's refuse to execute
> those recipes if Make 4.3 by adding 'check-make-version' recipe as
> depedendency of 'printvars' and 'show-vars' as suggested by Yann E. Morin.
FYI autobuilder threads seem to die when this gets hit:
make: *** [Makefile:1056: check-make-version] Error 1
Process Process-12:
Traceback (most recent call last):
File "/usr/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
748, in run_instance
self.run_one_build()
File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
731, in run_one_build
ret = self.do_reproducible_build()
File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
524, in do_reproducible_build
ret = self.check_reproducibility()
File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
416, in check_reproducibility
prefix = subprocess.check_output(["make", "--no-print-directory",
"O=%s" % self.outputdir,
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['make',
'--no-print-directory',
'O=/home/autobuild/autobuild/instance-11/output-1', '-C',
'instance-11/buildroot', 'printvars', 'VARS=TARGET_CROSS']' returned
non-zero exit status 2.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
> Makefile | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 0b8c7b2867..ac98b84425 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1058,13 +1058,20 @@ ifeq ($(NEED_WRAPPER),y)
> $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
> endif
>
> +.PHONY: check-make-version
> +check-make-version:
> +ifneq ($(filter $(RUNNING_MAKE_VERSION),4.3),)
> + @echo "Make 4.3 doesn't support 'printvars' and 'show-vars' recipes"
> + @exit 1
> +endif
> +
> # printvars prints all the variables currently defined in our
> # Makefiles. Alternatively, if a non-empty VARS variable is passed,
> # only the variables matching the make pattern passed in VARS are
> # displayed.
> # show-vars does the same, but as a JSON dictionnary.
> .PHONY: printvars
> -printvars:
> +printvars: check-make-version
> @:
> $(foreach V, \
> $(sort $(filter $(VARS),$(.VARIABLES))), \
> @@ -1077,7 +1084,7 @@ printvars:
>
> .PHONY: show-vars
> show-vars: VARS?=%
> -show-vars:
> +show-vars: check-make-version
> @:
> $(info $(call clean-json, { \
> $(foreach V, \
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] Makefile: disable 'printvars' and 'show-vars' recipes for Make 4.3
2022-07-21 3:55 ` James Hilliard
@ 2022-07-26 21:52 ` Giulio Benetti
2022-07-27 8:38 ` Arnout Vandecappelle
0 siblings, 1 reply; 6+ messages in thread
From: Giulio Benetti @ 2022-07-26 21:52 UTC (permalink / raw)
To: James Hilliard; +Cc: Yann E . MORIN, buildroot
Hi James,
On 21/07/22 05:55, James Hilliard wrote:
> On Sat, Jan 1, 2022 at 2:40 PM Giulio Benetti
> <giulio.benetti@benettiengineering.com> wrote:
>>
>> Make 4.3 is buggy and leads to a "Segmentation fault (core dumped)" when
>> calling 'make printvars' or 'make show-vars', so let's refuse to execute
>> those recipes if Make 4.3 by adding 'check-make-version' recipe as
>> depedendency of 'printvars' and 'show-vars' as suggested by Yann E. Morin.
>
> FYI autobuilder threads seem to die when this gets hit:
> make: *** [Makefile:1056: check-make-version] Error 1
> Process Process-12:
> Traceback (most recent call last):
> File "/usr/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
> self.run()
> File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
> self._target(*self._args, **self._kwargs)
> File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
> 748, in run_instance
> self.run_one_build()
> File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
> 731, in run_one_build
> ret = self.do_reproducible_build()
> File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
> 524, in do_reproducible_build
> ret = self.check_reproducibility()
> File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
> 416, in check_reproducibility
> prefix = subprocess.check_output(["make", "--no-print-directory",
> "O=%s" % self.outputdir,
> File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
> return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
> File "/usr/lib/python3.10/subprocess.py", line 524, in run
> raise CalledProcessError(retcode, process.args,
> subprocess.CalledProcessError: Command '['make',
> '--no-print-directory',
> 'O=/home/autobuild/autobuild/instance-11/output-1', '-C',
> 'instance-11/buildroot', 'printvars', 'VARS=TARGET_CROSS']' returned
> non-zero exit status 2.
Do you have an autobuilder failure link?
So I can reproduce it here and find a work-around for it.
Thank you!
Best regards
--
Giulio Benetti
Benetti Engineering sas
>
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>> Makefile | 11 +++++++++--
>> 1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 0b8c7b2867..ac98b84425 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1058,13 +1058,20 @@ ifeq ($(NEED_WRAPPER),y)
>> $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
>> endif
>>
>> +.PHONY: check-make-version
>> +check-make-version:
>> +ifneq ($(filter $(RUNNING_MAKE_VERSION),4.3),)
>> + @echo "Make 4.3 doesn't support 'printvars' and 'show-vars' recipes"
>> + @exit 1
>> +endif
>> +
>> # printvars prints all the variables currently defined in our
>> # Makefiles. Alternatively, if a non-empty VARS variable is passed,
>> # only the variables matching the make pattern passed in VARS are
>> # displayed.
>> # show-vars does the same, but as a JSON dictionnary.
>> .PHONY: printvars
>> -printvars:
>> +printvars: check-make-version
>> @:
>> $(foreach V, \
>> $(sort $(filter $(VARS),$(.VARIABLES))), \
>> @@ -1077,7 +1084,7 @@ printvars:
>>
>> .PHONY: show-vars
>> show-vars: VARS?=%
>> -show-vars:
>> +show-vars: check-make-version
>> @:
>> $(info $(call clean-json, { \
>> $(foreach V, \
>> --
>> 2.25.1
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] Makefile: disable 'printvars' and 'show-vars' recipes for Make 4.3
2022-07-26 21:52 ` Giulio Benetti
@ 2022-07-27 8:38 ` Arnout Vandecappelle
2022-07-30 12:22 ` Yann E. MORIN
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2022-07-27 8:38 UTC (permalink / raw)
To: Giulio Benetti, James Hilliard; +Cc: Yann E . MORIN, buildroot
On 26/07/2022 23:52, Giulio Benetti wrote:
> Hi James,
>
> On 21/07/22 05:55, James Hilliard wrote:
>> On Sat, Jan 1, 2022 at 2:40 PM Giulio Benetti
>> <giulio.benetti@benettiengineering.com> wrote:
>>>
>>> Make 4.3 is buggy and leads to a "Segmentation fault (core dumped)" when
>>> calling 'make printvars' or 'make show-vars', so let's refuse to execute
>>> those recipes if Make 4.3 by adding 'check-make-version' recipe as
>>> depedendency of 'printvars' and 'show-vars' as suggested by Yann E. Morin.
>>
>> FYI autobuilder threads seem to die when this gets hit:
>> make: *** [Makefile:1056: check-make-version] Error 1
>> Process Process-12:
>> Traceback (most recent call last):
>> File "/usr/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
>> self.run()
>> File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
>> self._target(*self._args, **self._kwargs)
>> File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
>> 748, in run_instance
>> self.run_one_build()
>> File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
>> 731, in run_one_build
>> ret = self.do_reproducible_build()
>> File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
>> 524, in do_reproducible_build
>> ret = self.check_reproducibility()
>> File "/home/autobuild/buildroot-test/scripts/autobuild-run", line
>> 416, in check_reproducibility
>> prefix = subprocess.check_output(["make", "--no-print-directory",
>> "O=%s" % self.outputdir,
>> File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
>> return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
>> File "/usr/lib/python3.10/subprocess.py", line 524, in run
>> raise CalledProcessError(retcode, process.args,
>> subprocess.CalledProcessError: Command '['make',
>> '--no-print-directory',
>> 'O=/home/autobuild/autobuild/instance-11/output-1', '-C',
>> 'instance-11/buildroot', 'printvars', 'VARS=TARGET_CROSS']' returned
>> non-zero exit status 2.
>
> Do you have an autobuilder failure link?
> So I can reproduce it here and find a work-around for it.
It's the autobuilder script (from the buildroot-test repository) itself that
crashes. I suspect it isn't able to send in its results after that. There is a
separate process for each autobuilder instance, but I don't think they are
restarted when they crash so eventually all instances will die.
Note that this is only invoked if a reproducibility error was detected.
@James: do like Thomas, install an earlier make on your system :-)
Regards,
Arnout
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] Makefile: disable 'printvars' and 'show-vars' recipes for Make 4.3
2022-07-27 8:38 ` Arnout Vandecappelle
@ 2022-07-30 12:22 ` Yann E. MORIN
0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2022-07-30 12:22 UTC (permalink / raw)
To: Arnout Vandecappelle; +Cc: Giulio Benetti, James Hilliard, buildroot
Arnout, Giulio, James, All,
On 2022-07-27 10:38 +0200, Arnout Vandecappelle spake thusly:
> On 26/07/2022 23:52, Giulio Benetti wrote:
> >On 21/07/22 05:55, James Hilliard wrote:
> >>On Sat, Jan 1, 2022 at 2:40 PM Giulio Benetti
> >><giulio.benetti@benettiengineering.com> wrote:
> >>>Make 4.3 is buggy and leads to a "Segmentation fault (core dumped)" when
> >>>calling 'make printvars' or 'make show-vars', so let's refuse to execute
> >>>those recipes if Make 4.3 by adding 'check-make-version' recipe as
> >>>depedendency of 'printvars' and 'show-vars' as suggested by Yann E. Morin.
> >>FYI autobuilder threads seem to die when this gets hit:
[--SNIP--]
> >Do you have an autobuilder failure link?
> >So I can reproduce it here and find a work-around for it.
> It's the autobuilder script (from the buildroot-test repository) itself
> that crashes. I suspect it isn't able to send in its results after that.
> There is a separate process for each autobuilder instance, but I don't think
> they are restarted when they crash so eventually all instances will die.
>
> Note that this is only invoked if a reproducibility error was detected.
>
> @James: do like Thomas, install an earlier make on your system :-)
That will no longer ne necessary, as we now have a working workaround
for that, that I just pushed:
5c54c3ef3db2 Makefile: workaround make 4.3 issue for 'printvars and 'show-vars'
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-30 12:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-01 21:40 [Buildroot] [PATCH] Makefile: disable 'printvars' and 'show-vars' recipes for Make 4.3 Giulio Benetti
2022-01-04 17:15 ` Arnout Vandecappelle
2022-07-21 3:55 ` James Hilliard
2022-07-26 21:52 ` Giulio Benetti
2022-07-27 8:38 ` Arnout Vandecappelle
2022-07-30 12:22 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.