public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libctf: update regexp to allow makeinfo to build document
@ 2023-01-13 14:42 Enze Li
  2023-01-13 15:05 ` Eli Zaretskii
  2023-01-14  4:23 ` [PATCH v2] " Enze Li
  0 siblings, 2 replies; 9+ messages in thread
From: Enze Li @ 2023-01-13 14:42 UTC (permalink / raw)
  To: binutils; +Cc: gdb-patches, enze.li

While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
following warning,

 checking for makeinfo... makeinfo --split-size=5000000
 configure: WARNING:
 *** Makeinfo is too old. Info documentation will not be built.

then I checked the version of makeinfo, it said,
======
$ makeinfo --version
texi2any (GNU texinfo) 7.0.1

Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
======

After digging a little bit, it became quite obvious that a dot is
missing in regexp that makes it impossible to match versions higher than
7.0.

libctf/ChangeLog:

	* configure: Regenerated.
	* configure.ac: Update regexp to match versions higher than 7.0.
---
 libctf/configure    | 2 +-
 libctf/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libctf/configure b/libctf/configure
index c22f7dffd2c..e9f7125edea 100755
--- a/libctf/configure
+++ b/libctf/configure
@@ -14864,7 +14864,7 @@ esac
     # We require texinfo to be 6.3 or later, for a working synindex
     # and validatemenus: otherwise we fall back to /bin/true.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
       build_info=yes
     else
         build_info=
diff --git a/libctf/configure.ac b/libctf/configure.ac
index 1d0cf4d0fa5..4bc75736542 100644
--- a/libctf/configure.ac
+++ b/libctf/configure.ac
@@ -184,7 +184,7 @@ changequote(,)
     # We require texinfo to be 6.3 or later, for a working synindex
     # and validatemenus: otherwise we fall back to /bin/true.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
       build_info=yes
     else
         build_info=

base-commit: 6f9f448118eaeaf006f867a25699aef7d8c72770
-- 
2.39.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libctf: update regexp to allow makeinfo to build document
  2023-01-13 14:42 [PATCH] libctf: update regexp to allow makeinfo to build document Enze Li
@ 2023-01-13 15:05 ` Eli Zaretskii
  2023-01-13 15:36   ` Andreas Schwab
  2023-01-14  4:23 ` [PATCH v2] " Enze Li
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-01-13 15:05 UTC (permalink / raw)
  To: Enze Li; +Cc: binutils, gdb-patches, enze.li

> Cc: gdb-patches@sourceware.org,
> 	enze.li@gmx.com
> Date: Fri, 13 Jan 2023 22:42:32 +0800
> From: Enze Li via Gdb-patches <gdb-patches@sourceware.org>
> 
> While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
> following warning,
> 
>  checking for makeinfo... makeinfo --split-size=5000000
>  configure: WARNING:
>  *** Makeinfo is too old. Info documentation will not be built.
> 
> then I checked the version of makeinfo, it said,
> ======
> $ makeinfo --version
> texi2any (GNU texinfo) 7.0.1
> 
> Copyright (C) 2022 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> ======
> 
> After digging a little bit, it became quite obvious that a dot is
> missing in regexp that makes it impossible to match versions higher than
> 7.0.

Thanks.

> libctf/ChangeLog:
> 
> 	* configure: Regenerated.
> 	* configure.ac: Update regexp to match versions higher than 7.0.
> ---
>  libctf/configure    | 2 +-
>  libctf/configure.ac | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libctf/configure b/libctf/configure
> index c22f7dffd2c..e9f7125edea 100755
> --- a/libctf/configure
> +++ b/libctf/configure
> @@ -14864,7 +14864,7 @@ esac
>      # We require texinfo to be 6.3 or later, for a working synindex
>      # and validatemenus: otherwise we fall back to /bin/true.
>      if ${MAKEINFO} --version \
> -       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
> +       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
>        build_info=yes
>      else
>          build_info=
> diff --git a/libctf/configure.ac b/libctf/configure.ac
> index 1d0cf4d0fa5..4bc75736542 100644
> --- a/libctf/configure.ac
> +++ b/libctf/configure.ac
> @@ -184,7 +184,7 @@ changequote(,)
>      # We require texinfo to be 6.3 or later, for a working synindex
>      # and validatemenus: otherwise we fall back to /bin/true.
>      if ${MAKEINFO} --version \
> -       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
> +       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
>        build_info=yes
>      else
>          build_info=

IMO, this solution has the same problem: it will stop working when
Texinfo 10.1 will be released.  I think the solution should be to use

  egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9]?)'

That is, we don't care about the minor version for Texinfo > 6.9, we
only care about the major version.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libctf: update regexp to allow makeinfo to build document
  2023-01-13 15:05 ` Eli Zaretskii
@ 2023-01-13 15:36   ` Andreas Schwab
  2023-01-13 15:44     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2023-01-13 15:36 UTC (permalink / raw)
  To: Eli Zaretskii via Gdb-patches; +Cc: Enze Li, Eli Zaretskii, binutils, enze.li

On Jan 13 2023, Eli Zaretskii via Gdb-patches wrote:

> IMO, this solution has the same problem: it will stop working when
> Texinfo 10.1 will be released.  I think the solution should be to use
>
>   egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9]?)'

Since the match is not anchored, the trailing [0-9]? pattern is redundant.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libctf: update regexp to allow makeinfo to build document
  2023-01-13 15:36   ` Andreas Schwab
@ 2023-01-13 15:44     ` Eli Zaretskii
  2023-01-14  4:36       ` Enze Li
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-01-13 15:44 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb-patches, enze.li, binutils, enze.li

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Enze Li <enze.li@hotmail.com>,  Eli Zaretskii <eliz@gnu.org>,
>   binutils@sourceware.org,  enze.li@gmx.com
> Date: Fri, 13 Jan 2023 16:36:09 +0100
> 
> On Jan 13 2023, Eli Zaretskii via Gdb-patches wrote:
> 
> > IMO, this solution has the same problem: it will stop working when
> > Texinfo 10.1 will be released.  I think the solution should be to use
> >
> >   egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9]?)'
> 
> Since the match is not anchored, the trailing [0-9]? pattern is redundant.

Right.  But I now actually think we need something different, like

  egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] libctf: update regexp to allow makeinfo to build document
  2023-01-13 14:42 [PATCH] libctf: update regexp to allow makeinfo to build document Enze Li
  2023-01-13 15:05 ` Eli Zaretskii
@ 2023-01-14  4:23 ` Enze Li
  2023-01-16 13:51   ` Nick Alcock
  1 sibling, 1 reply; 9+ messages in thread
From: Enze Li @ 2023-01-14  4:23 UTC (permalink / raw)
  To: binutils; +Cc: gdb-patches, enze.li, eliz, schwab

While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
following warning,

 checking for makeinfo... makeinfo --split-size=5000000
 configure: WARNING:
 *** Makeinfo is too old. Info documentation will not be built.

then I checked the version of makeinfo, it said,
======
$ makeinfo --version
texi2any (GNU texinfo) 7.0.1

Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
======

After digging a little bit, it became quite obvious that a dot is
missing in regexp that makes it impossible to match versions higher than
7.0, and here's the solution:

-       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then

However, Eli pointed out that the solution above has another problem: it
will stop working when Texinfo 10.1 will be released.  Meanwhile, he
suggested to solve this problem permanently.  That is, we don't care
about the minor version for Texinfo > 6.9, we only care about the major
version.

In this way, problem solved permanently, thanks to Eli.

libctf/ChangeLog:

	* configure: Regenerated.
	* configure.ac: Update regexp to match versions higher than 7.0.
---
 libctf/configure    | 2 +-
 libctf/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libctf/configure b/libctf/configure
index c22f7dffd2c..a0e40f49a80 100755
--- a/libctf/configure
+++ b/libctf/configure
@@ -14864,7 +14864,7 @@ esac
     # We require texinfo to be 6.3 or later, for a working synindex
     # and validatemenus: otherwise we fall back to /bin/true.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
       build_info=yes
     else
         build_info=
diff --git a/libctf/configure.ac b/libctf/configure.ac
index 1d0cf4d0fa5..6a5eade1855 100644
--- a/libctf/configure.ac
+++ b/libctf/configure.ac
@@ -184,7 +184,7 @@ changequote(,)
     # We require texinfo to be 6.3 or later, for a working synindex
     # and validatemenus: otherwise we fall back to /bin/true.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
       build_info=yes
     else
         build_info=

base-commit: dd19001ff621dbdaddadf71d3b4984ea016fd153
-- 
2.39.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libctf: update regexp to allow makeinfo to build document
  2023-01-13 15:44     ` Eli Zaretskii
@ 2023-01-14  4:36       ` Enze Li
  2023-01-14  7:36         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Enze Li @ 2023-01-14  4:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Andreas Schwab, gdb-patches, binutils, enze.li

On Fri, Jan 13 2023 at 10:44:36 AM -0500, Eli Zaretskii wrote:

>> From: Andreas Schwab <schwab@linux-m68k.org>
>> Cc: Enze Li <enze.li@hotmail.com>,  Eli Zaretskii <eliz@gnu.org>,
>>   binutils@sourceware.org,  enze.li@gmx.com
>> Date: Fri, 13 Jan 2023 16:36:09 +0100
>> 
>> On Jan 13 2023, Eli Zaretskii via Gdb-patches wrote:
>> 
>> > IMO, this solution has the same problem: it will stop working when
>> > Texinfo 10.1 will be released.  I think the solution should be to use
>> >
>> >   egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9]?)'
>> 
>> Since the match is not anchored, the trailing [0-9]? pattern is redundant.
>
> Right.  But I now actually think we need something different, like
>
>   egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])'

Hi Eli,

Thanks for your swift reply.

I've tested the following possible version numbers,

6.2.1, 6.3.1, 6.9.1, 7.0.1, 9.9.1, 10.1.1, 60.1.1, 199.1.1, 999.1.1

with the command like this:

$ echo "(GNU texinfo) 6.2" | \
  egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])'

All of these tests are Okay.

I sent a new version to the list, ok for the trunk?

Best Regards,
Enze


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libctf: update regexp to allow makeinfo to build document
  2023-01-14  4:36       ` Enze Li
@ 2023-01-14  7:36         ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-01-14  7:36 UTC (permalink / raw)
  To: Enze Li; +Cc: schwab, gdb-patches, binutils, enze.li

> From: Enze Li <enze.li@hotmail.com>
> Cc: Andreas Schwab <schwab@linux-m68k.org>,  gdb-patches@sourceware.org,
>   binutils@sourceware.org,  enze.li@gmx.com
> Date: Sat, 14 Jan 2023 12:36:41 +0800
> 
> On Fri, Jan 13 2023 at 10:44:36 AM -0500, Eli Zaretskii wrote:
> 
> >> From: Andreas Schwab <schwab@linux-m68k.org>
> >> Cc: Enze Li <enze.li@hotmail.com>,  Eli Zaretskii <eliz@gnu.org>,
> >>   binutils@sourceware.org,  enze.li@gmx.com
> >> Date: Fri, 13 Jan 2023 16:36:09 +0100
> >> 
> >> On Jan 13 2023, Eli Zaretskii via Gdb-patches wrote:
> >> 
> >> > IMO, this solution has the same problem: it will stop working when
> >> > Texinfo 10.1 will be released.  I think the solution should be to use
> >> >
> >> >   egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9]?)'
> >> 
> >> Since the match is not anchored, the trailing [0-9]? pattern is redundant.
> >
> > Right.  But I now actually think we need something different, like
> >
> >   egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])'
> 
> Hi Eli,
> 
> Thanks for your swift reply.
> 
> I've tested the following possible version numbers,
> 
> 6.2.1, 6.3.1, 6.9.1, 7.0.1, 9.9.1, 10.1.1, 60.1.1, 199.1.1, 999.1.1
> 
> with the command like this:
> 
> $ echo "(GNU texinfo) 6.2" | \
>   egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])'
> 
> All of these tests are Okay.
> 
> I sent a new version to the list, ok for the trunk?

It's fine by me, but I cannot approve changes to all the repositories
by myself.  So please wait for others to approve the change before you
install it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] libctf: update regexp to allow makeinfo to build document
  2023-01-14  4:23 ` [PATCH v2] " Enze Li
@ 2023-01-16 13:51   ` Nick Alcock
  2023-01-16 15:19     ` Enze Li
  0 siblings, 1 reply; 9+ messages in thread
From: Nick Alcock @ 2023-01-16 13:51 UTC (permalink / raw)
  To: Enze Li via Binutils; +Cc: Enze Li, gdb-patches, enze.li, eliz, schwab

On 14 Jan 2023, Enze Li via Binutils verbalised:

> While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
> following warning,
>
>  checking for makeinfo... makeinfo --split-size=5000000
>  configure: WARNING:
>  *** Makeinfo is too old. Info documentation will not be built.
>
> then I checked the version of makeinfo, it said,
> ======
> $ makeinfo --version
> texi2any (GNU texinfo) 7.0.1
>
> Copyright (C) 2022 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> ======
>
> After digging a little bit, it became quite obvious that a dot is
> missing in regexp that makes it impossible to match versions higher than
> 7.0, and here's the solution:
>
> -       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
> +       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
>
> However, Eli pointed out that the solution above has another problem: it
> will stop working when Texinfo 10.1 will be released.  Meanwhile, he
> suggested to solve this problem permanently.  That is, we don't care
> about the minor version for Texinfo > 6.9, we only care about the major
> version.
>
> In this way, problem solved permanently, thanks to Eli.

Looks good to me: approved. (I can commit it if you like.)

This should probably also be backported to the 2.40 branch to keep the
latest released GNU tools building with the latest released GNU tools.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] libctf: update regexp to allow makeinfo to build document
  2023-01-16 13:51   ` Nick Alcock
@ 2023-01-16 15:19     ` Enze Li
  0 siblings, 0 replies; 9+ messages in thread
From: Enze Li @ 2023-01-16 15:19 UTC (permalink / raw)
  To: Nick Alcock; +Cc: Enze Li via Binutils, gdb-patches, enze.li, eliz, schwab

On Mon, Jan 16 2023 at 01:51:07 PM +0000, Nick Alcock wrote:

> On 14 Jan 2023, Enze Li via Binutils verbalised:
>
>> While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
>> following warning,
>>
>>  checking for makeinfo... makeinfo --split-size=5000000
>>  configure: WARNING:
>>  *** Makeinfo is too old. Info documentation will not be built.
>>
>> then I checked the version of makeinfo, it said,
>> ======
>> $ makeinfo --version
>> texi2any (GNU texinfo) 7.0.1
>>
>> Copyright (C) 2022 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>> ======
>>
>> After digging a little bit, it became quite obvious that a dot is
>> missing in regexp that makes it impossible to match versions higher than
>> 7.0, and here's the solution:
>>
>> -       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
>> +       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
>>
>> However, Eli pointed out that the solution above has another problem: it
>> will stop working when Texinfo 10.1 will be released.  Meanwhile, he
>> suggested to solve this problem permanently.  That is, we don't care
>> about the minor version for Texinfo > 6.9, we only care about the major
>> version.
>>
>> In this way, problem solved permanently, thanks to Eli.
>
> Looks good to me: approved. (I can commit it if you like.)
>
> This should probably also be backported to the 2.40 branch to keep the
> latest released GNU tools building with the latest released GNU tools.

Hi Nick,

Thanks for your review.  I'm checking this in now, and backporting it to
the 2.40 branch as well.

Best Regards,
Enze

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-01-16 15:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 14:42 [PATCH] libctf: update regexp to allow makeinfo to build document Enze Li
2023-01-13 15:05 ` Eli Zaretskii
2023-01-13 15:36   ` Andreas Schwab
2023-01-13 15:44     ` Eli Zaretskii
2023-01-14  4:36       ` Enze Li
2023-01-14  7:36         ` Eli Zaretskii
2023-01-14  4:23 ` [PATCH v2] " Enze Li
2023-01-16 13:51   ` Nick Alcock
2023-01-16 15:19     ` Enze Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).