Require GNU make 3.82

Message ID 20190715101124.77677-1-alan.hayward@arm.com
State New
Headers show
Series
  • Require GNU make 3.82
Related show

Commit Message

Alan Hayward July 15, 2019, 10:11 a.m.
Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.

Update the NEWS file to state that versions earlier than 3.82 are not
supported.

3.82 was released in 2010, 3.81 was released 2006. A quick investigation
of the default GNU make version provided across various distros found the
earliest provided version to be 3.82:
*RHEL 7, Centos 6 - make 3.82
*Fedora 27 - make 4.2.1
*OpenSuse 42.2, SLES11 - make 4.2.1
*Ubuntu 16.04/18.04 - make 4.1
*Debian Jessie - make 4.0

Note that Glibc requires at least 4.0, whereas GCC still allows 3.81.

gdb/ChangeLog:

2019-07-15  Alan Hayward  <alan.hayward@arm.com>

	* NEWS: Require GNU make 3.82.
---
 gdb/NEWS | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.20.1 (Apple Git-117)

Comments

Kevin Buettner July 16, 2019, 12:51 a.m. | #1
On Mon, 15 Jul 2019 10:11:29 +0000
Alan Hayward <Alan.Hayward@arm.com> wrote:

> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.

> 

> Update the NEWS file to state that versions earlier than 3.82 are not

> supported.

> 

> 3.82 was released in 2010, 3.81 was released 2006. A quick investigation

> of the default GNU make version provided across various distros found the

> earliest provided version to be 3.82:

> *RHEL 7, Centos 6 - make 3.82

> *Fedora 27 - make 4.2.1

> *OpenSuse 42.2, SLES11 - make 4.2.1

> *Ubuntu 16.04/18.04 - make 4.1

> *Debian Jessie - make 4.0

> 

> Note that Glibc requires at least 4.0, whereas GCC still allows 3.81.

> 

> gdb/ChangeLog:

> 

> 2019-07-15  Alan Hayward  <alan.hayward@arm.com>

> 

> 	* NEWS: Require GNU make 3.82.


This seems okay to me, though I think that Eli needs to approve it. 
Regardless, I think you should wait a few days to push it in case
there are any objections.  (The other solution is to rewrite the
Makefile rules that caused the breakage.)

Kevin
Alan Hayward July 16, 2019, 10:35 a.m. | #2
> On 16 Jul 2019, at 01:51, Kevin Buettner <kevinb@redhat.com> wrote:

> 

> On Mon, 15 Jul 2019 10:11:29 +0000

> Alan Hayward <Alan.Hayward@arm.com> wrote:

> 

>> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.

>> 

>> Update the NEWS file to state that versions earlier than 3.82 are not

>> supported.

>> 

>> 3.82 was released in 2010, 3.81 was released 2006. A quick investigation

>> of the default GNU make version provided across various distros found the

>> earliest provided version to be 3.82:

>> *RHEL 7, Centos 6 - make 3.82

>> *Fedora 27 - make 4.2.1

>> *OpenSuse 42.2, SLES11 - make 4.2.1

>> *Ubuntu 16.04/18.04 - make 4.1

>> *Debian Jessie - make 4.0

>> 

>> Note that Glibc requires at least 4.0, whereas GCC still allows 3.81.

>> 

>> gdb/ChangeLog:

>> 

>> 2019-07-15  Alan Hayward  <alan.hayward@arm.com>

>> 

>> 	* NEWS: Require GNU make 3.82.

> 

> This seems okay to me, though I think that Eli needs to approve it. 

> Regardless, I think you should wait a few days to push it in case

> there are any objections.  (The other solution is to rewrite the

> Makefile rules that caused the breakage.)

> 

> Kevin


Agreed. I’ll give it a good week after the last comment before pushing.

I did have a look at why the changes broke. I couldn’t see any reason
why it would break, other than it being a bug in 3.81.


Alan.
Eli Zaretskii July 18, 2019, 6:17 a.m. | #3
> From: Alan Hayward <Alan.Hayward@arm.com>

> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>

> Date: Mon, 15 Jul 2019 10:11:29 +0000

> 

> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.


Which feature of Make 3.82 and later is required to successfully
build gdbserver?

> diff --git a/gdb/NEWS b/gdb/NEWS

> index 4e479bf738..3a92b24e44 100644

> --- a/gdb/NEWS

> +++ b/gdb/NEWS

> @@ -251,6 +251,11 @@ maint show test-options-completion-result

>    GDB) in the output directory for each test script.  Multiple invocations

>    are appended with .1, .2, .3 etc.

>  

> +* Building GDB and GDBserver now requires GNU make >= 3.82.

> +

> +  Using another implementation of the make program or an earlier version of

> +  GNU make to build GDB or GDBserver is not supported.

> +


The test is OK, thanks.
Eli Zaretskii July 18, 2019, 10 a.m. | #4
> Date: Thu, 18 Jul 2019 09:17:23 +0300

> From: Eli Zaretskii <eliz@gnu.org>

> CC: gdb-patches@sourceware.org, nd@arm.com

> 

> The test is OK, thanks.


Sorry, I meant "text".
Alan Hayward July 18, 2019, 10:57 a.m. | #5
> On 18 Jul 2019, at 07:17, Eli Zaretskii <eliz@gnu.org> wrote:

> 

>> From: Alan Hayward <Alan.Hayward@arm.com>

>> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>

>> Date: Mon, 15 Jul 2019 10:11:29 +0000

>> 

>> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.

> 

> Which feature of Make 3.82 and later is required to successfully

> build gdbserver?

> 


It’s not a specific feature in 3.82 that is required.

It looks like it is a bug in 3.81. The GDB makefile isn’t doing anything special
and everything works using 3.82 upwards.

Rewriting the makefile to work around the issue is probably going to be a little
messy.


>> diff --git a/gdb/NEWS b/gdb/NEWS

>> index 4e479bf738..3a92b24e44 100644

>> --- a/gdb/NEWS

>> +++ b/gdb/NEWS

>> @@ -251,6 +251,11 @@ maint show test-options-completion-result

>>   GDB) in the output directory for each test script.  Multiple invocations

>>   are appended with .1, .2, .3 etc.

>> 

>> +* Building GDB and GDBserver now requires GNU make >= 3.82.

>> +

>> +  Using another implementation of the make program or an earlier version of

>> +  GNU make to build GDB or GDBserver is not supported.

>> +

> 

> The test is OK, thanks.


Thanks!

Alan.
Alan Hayward Aug. 1, 2019, 4:09 p.m. | #6
I pushed this patch.


> On 18 Jul 2019, at 11:57, Alan Hayward <Alan.Hayward@arm.com> wrote:

> 

> 

> 

>> On 18 Jul 2019, at 07:17, Eli Zaretskii <eliz@gnu.org> wrote:

>> 

>>> From: Alan Hayward <Alan.Hayward@arm.com>

>>> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>

>>> Date: Mon, 15 Jul 2019 10:11:29 +0000

>>> 

>>> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.

>> 

>> Which feature of Make 3.82 and later is required to successfully

>> build gdbserver?

>> 

> 

> It’s not a specific feature in 3.82 that is required.

> 

> It looks like it is a bug in 3.81. The GDB makefile isn’t doing anything special

> and everything works using 3.82 upwards.

> 

> Rewriting the makefile to work around the issue is probably going to be a little

> messy.

> 

> 

>>> diff --git a/gdb/NEWS b/gdb/NEWS

>>> index 4e479bf738..3a92b24e44 100644

>>> --- a/gdb/NEWS

>>> +++ b/gdb/NEWS

>>> @@ -251,6 +251,11 @@ maint show test-options-completion-result

>>>  GDB) in the output directory for each test script.  Multiple invocations

>>>  are appended with .1, .2, .3 etc.

>>> 

>>> +* Building GDB and GDBserver now requires GNU make >= 3.82.

>>> +

>>> +  Using another implementation of the make program or an earlier version of

>>> +  GNU make to build GDB or GDBserver is not supported.

>>> +

>> 

>> The test is OK, thanks.

> 

> Thanks!

> 

> Alan.
Tom de Vries July 14, 2020, 11:47 a.m. | #7
On 7/15/19 12:11 PM, Alan Hayward wrote:
> *OpenSuse 42.2, SLES11 - make 4.2.1


FWIW, AFAICT:
- SLES11 uses make 3.81.
- openSUSE Leap42.{1,2,3} uses make 4.0

openSUSE Leap 15.{0,1,2} uses make 4.2.1, as well as SLES15

Anyway, I ran into this because gdb 9.1 doesn't build for me on SLES11.

Thanks,
- Tom
Tom de Vries July 14, 2020, 2:30 p.m. | #8
On 7/18/19 12:57 PM, Alan Hayward wrote:
> 

> 

>> On 18 Jul 2019, at 07:17, Eli Zaretskii <eliz@gnu.org> wrote:

>>

>>> From: Alan Hayward <Alan.Hayward@arm.com>

>>> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>

>>> Date: Mon, 15 Jul 2019 10:11:29 +0000

>>>

>>> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.

>>

>> Which feature of Make 3.82 and later is required to successfully

>> build gdbserver?

>>

> 

> It’s not a specific feature in 3.82 that is required.

> 

> It looks like it is a bug in 3.81. The GDB makefile isn’t doing anything special

> and everything works using 3.82 upwards.

> 

> Rewriting the makefile to work around the issue is probably going to be a little

> messy.

> 


This patch (on top of gdb 9.1) works around the issue for make 3.81.

Build with make 3.81 and make 4.2.1 on x86_64-linux.

Thanks,
- Tom
[gdbserver] Fix build with make 3.81

---
 gdb/gdbserver/Makefile.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 16a9f2fd38..687bee2658 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -580,9 +580,22 @@ ax.o: ax.c
 	$(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
 	$(POSTCOMPILE)
 
+ifeq ($(WORKAROUND_ALLOC_IPA),)
+ifeq ($(MAKE_VERSION),3.81)
+WORKAROUND_ALLOC_IPA = 1
+else
+WORKAROUND_ALLOC_IPA = 0
+endif
+endif
+
+ifeq ($(WORKAROUND_ALLOC_IPA),0)
 alloc-ipa.o: ../alloc.c
 	$(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
 	$(POSTCOMPILE)
+else
+alloc-ipa.o: ../alloc.c
+	@$(MAKE) $(FLAGS_TO_PASS) WORKAROUND_ALLOC_IPA=0 alloc-ipa.o
+endif
 
 # Rules for objects that go in the in-process agent.
Tom de Vries July 15, 2020, 7:46 a.m. | #9
On 7/14/20 4:30 PM, Tom de Vries wrote:
> On 7/18/19 12:57 PM, Alan Hayward wrote:

>>

>>

>>> On 18 Jul 2019, at 07:17, Eli Zaretskii <eliz@gnu.org> wrote:

>>>

>>>> From: Alan Hayward <Alan.Hayward@arm.com>

>>>> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>

>>>> Date: Mon, 15 Jul 2019 10:11:29 +0000

>>>>

>>>> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.

>>>

>>> Which feature of Make 3.82 and later is required to successfully

>>> build gdbserver?

>>>

>>

>> It’s not a specific feature in 3.82 that is required.

>>

>> It looks like it is a bug in 3.81. The GDB makefile isn’t doing anything special

>> and everything works using 3.82 upwards.

>>

>> Rewriting the makefile to work around the issue is probably going to be a little

>> messy.

>>

> 

> This patch (on top of gdb 9.1) works around the issue for make 3.81.

> 

> Build with make 3.81 and make 4.2.1 on x86_64-linux.


And here (
https://sourceware.org/pipermail/gdb-patches/2019-December/163800.html )
is a patch (with a detailed analysis of the actual failure) on master
that fixes the build with 3.81.

Thanks,
- Tom
Luis Machado via Gdb-patches July 15, 2020, 5:14 p.m. | #10
On Wed, 15 Jul 2020 09:46:58 +0200
Tom de Vries <tdevries@suse.de> wrote:

> On 7/14/20 4:30 PM, Tom de Vries wrote:

> > On 7/18/19 12:57 PM, Alan Hayward wrote:  

> >>

> >>  

> >>> On 18 Jul 2019, at 07:17, Eli Zaretskii <eliz@gnu.org> wrote:

> >>>  

> >>>> From: Alan Hayward <Alan.Hayward@arm.com>

> >>>> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>

> >>>> Date: Mon, 15 Jul 2019 10:11:29 +0000

> >>>>

> >>>> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.  

> >>>

> >>> Which feature of Make 3.82 and later is required to successfully

> >>> build gdbserver?

> >>>  

> >>

> >> It’s not a specific feature in 3.82 that is required.

> >>

> >> It looks like it is a bug in 3.81. The GDB makefile isn’t doing anything special

> >> and everything works using 3.82 upwards.

> >>

> >> Rewriting the makefile to work around the issue is probably going to be a little

> >> messy.

> >>  

> > 

> > This patch (on top of gdb 9.1) works around the issue for make 3.81.

> > 

> > Build with make 3.81 and make 4.2.1 on x86_64-linux.  

> 

> And here (

> https://sourceware.org/pipermail/gdb-patches/2019-December/163800.html )

> is a patch (with a detailed analysis of the actual failure) on master

> that fixes the build with 3.81.


So Bernd's patch should be backported to 9.1?

Kevin
Tom de Vries July 15, 2020, 5:31 p.m. | #11
On 7/15/20 7:14 PM, Kevin Buettner wrote:
> On Wed, 15 Jul 2020 09:46:58 +0200

> Tom de Vries <tdevries@suse.de> wrote:

> 

>> On 7/14/20 4:30 PM, Tom de Vries wrote:

>>> On 7/18/19 12:57 PM, Alan Hayward wrote:  

>>>>

>>>>  

>>>>> On 18 Jul 2019, at 07:17, Eli Zaretskii <eliz@gnu.org> wrote:

>>>>>  

>>>>>> From: Alan Hayward <Alan.Hayward@arm.com>

>>>>>> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>

>>>>>> Date: Mon, 15 Jul 2019 10:11:29 +0000

>>>>>>

>>>>>> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.  

>>>>>

>>>>> Which feature of Make 3.82 and later is required to successfully

>>>>> build gdbserver?

>>>>>  

>>>>

>>>> It’s not a specific feature in 3.82 that is required.

>>>>

>>>> It looks like it is a bug in 3.81. The GDB makefile isn’t doing anything special

>>>> and everything works using 3.82 upwards.

>>>>

>>>> Rewriting the makefile to work around the issue is probably going to be a little

>>>> messy.

>>>>  

>>>

>>> This patch (on top of gdb 9.1) works around the issue for make 3.81.

>>>

>>> Build with make 3.81 and make 4.2.1 on x86_64-linux.  

>>

>> And here (

>> https://sourceware.org/pipermail/gdb-patches/2019-December/163800.html )

>> is a patch (with a detailed analysis of the actual failure) on master

>> that fixes the build with 3.81.

> 

> So Bernd's patch should be backported to 9.1?


Um, we've already released 9.2, and I presume closed the branch? So I'm
not sure what you mean.

Thanks,
- Tom
Luis Machado via Gdb-patches July 15, 2020, 7:14 p.m. | #12
On Wed, 15 Jul 2020 19:31:44 +0200
Tom de Vries <tdevries@suse.de> wrote:

> On 7/15/20 7:14 PM, Kevin Buettner wrote:

> > On Wed, 15 Jul 2020 09:46:58 +0200

> > Tom de Vries <tdevries@suse.de> wrote:

> >   

> >> On 7/14/20 4:30 PM, Tom de Vries wrote:  

> >>> On 7/18/19 12:57 PM, Alan Hayward wrote:    

> >>>>

> >>>>    

> >>>>> On 18 Jul 2019, at 07:17, Eli Zaretskii <eliz@gnu.org> wrote:

> >>>>>    

> >>>>>> From: Alan Hayward <Alan.Hayward@arm.com>

> >>>>>> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>

> >>>>>> Date: Mon, 15 Jul 2019 10:11:29 +0000

> >>>>>>

> >>>>>> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.    

> >>>>>

> >>>>> Which feature of Make 3.82 and later is required to successfully

> >>>>> build gdbserver?

> >>>>>    

> >>>>

> >>>> It’s not a specific feature in 3.82 that is required.

> >>>>

> >>>> It looks like it is a bug in 3.81. The GDB makefile isn’t doing anything special

> >>>> and everything works using 3.82 upwards.

> >>>>

> >>>> Rewriting the makefile to work around the issue is probably going to be a little

> >>>> messy.

> >>>>    

> >>>

> >>> This patch (on top of gdb 9.1) works around the issue for make 3.81.

> >>>

> >>> Build with make 3.81 and make 4.2.1 on x86_64-linux.    

> >>

> >> And here (

> >> https://sourceware.org/pipermail/gdb-patches/2019-December/163800.html )

> >> is a patch (with a detailed analysis of the actual failure) on master

> >> that fixes the build with 3.81.  

> > 

> > So Bernd's patch should be backported to 9.1?  

> 

> Um, we've already released 9.2, and I presume closed the branch? So I'm

> not sure what you mean.


Back on the July 14, you posted a patch relative to gdb 9.1 which works around the make 3.81 issue.  But it seems that Bernd also has a patch from late last year which fixes that issue.  (It appears to me that Bernd's patch is on the trunk, but I haven't checked to see what branches Bernd's patch might be on.)

Is Bernd's patch insufficient to fix the 3.81 issues that you're seeing?

Kevin
Tom de Vries July 15, 2020, 9:48 p.m. | #13
On 7/15/20 9:14 PM, Kevin Buettner wrote:
> On Wed, 15 Jul 2020 19:31:44 +0200

> Tom de Vries <tdevries@suse.de> wrote:

> 

>> On 7/15/20 7:14 PM, Kevin Buettner wrote:

>>> On Wed, 15 Jul 2020 09:46:58 +0200

>>> Tom de Vries <tdevries@suse.de> wrote:

>>>   

>>>> On 7/14/20 4:30 PM, Tom de Vries wrote:  

>>>>> On 7/18/19 12:57 PM, Alan Hayward wrote:    

>>>>>>

>>>>>>    

>>>>>>> On 18 Jul 2019, at 07:17, Eli Zaretskii <eliz@gnu.org> wrote:

>>>>>>>    

>>>>>>>> From: Alan Hayward <Alan.Hayward@arm.com>

>>>>>>>> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>

>>>>>>>> Date: Mon, 15 Jul 2019 10:11:29 +0000

>>>>>>>>

>>>>>>>> Gdbserver has failed to build with GNU make 3.81 since commit 08f10e02be.    

>>>>>>>

>>>>>>> Which feature of Make 3.82 and later is required to successfully

>>>>>>> build gdbserver?

>>>>>>>    

>>>>>>

>>>>>> It’s not a specific feature in 3.82 that is required.

>>>>>>

>>>>>> It looks like it is a bug in 3.81. The GDB makefile isn’t doing anything special

>>>>>> and everything works using 3.82 upwards.

>>>>>>

>>>>>> Rewriting the makefile to work around the issue is probably going to be a little

>>>>>> messy.

>>>>>>    

>>>>>

>>>>> This patch (on top of gdb 9.1) works around the issue for make 3.81.

>>>>>

>>>>> Build with make 3.81 and make 4.2.1 on x86_64-linux.    

>>>>

>>>> And here (

>>>> https://sourceware.org/pipermail/gdb-patches/2019-December/163800.html )

>>>> is a patch (with a detailed analysis of the actual failure) on master

>>>> that fixes the build with 3.81.  

>>>

>>> So Bernd's patch should be backported to 9.1?  

>>

>> Um, we've already released 9.2, and I presume closed the branch? So I'm

>> not sure what you mean.

> 

> Back on the July 14, you posted a patch relative to gdb 9.1 which works around the make 3.81 issue.  But it seems that Bernd also has a patch from late last year which fixes that issue.  (It appears to me that Bernd's patch is on the trunk, but I haven't checked to see what branches Bernd's patch might be on.)

> 

> Is Bernd's patch insufficient to fix the 3.81 issues that you're seeing?


I've just tested it, and it's sufficient.

The reason why I posted that patch, is because I was not aware of
Bernd's patch.

Thanks,
- Tom

Patch

diff --git a/gdb/NEWS b/gdb/NEWS
index 4e479bf738..3a92b24e44 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -251,6 +251,11 @@  maint show test-options-completion-result
   GDB) in the output directory for each test script.  Multiple invocations
   are appended with .1, .2, .3 etc.
 
+* Building GDB and GDBserver now requires GNU make >= 3.82.
+
+  Using another implementation of the make program or an earlier version of
+  GNU make to build GDB or GDBserver is not supported.
+
 *** Changes in GDB 8.3
 
 * GDB and GDBserver now support access to additional registers on