bugGNU Octave - Bugs: bug #62648, forthcoming build problem with...


bug #62648: forthcoming build problem with texinfo>6.8

Submitter:  gabriele balducci <balducci>
Submitted:  Fri 17 Jun 2022 01:37:50 PM UTC
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 7.1.90 Operating System:  * GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Fri 17 Jun 2022 01:50:05 PM UTC, comment #1: 

I now see that all the < and > chars in the original submission are being rendered as &lt; and &gt>;
Sorry about that: when I composed the report, using plain < and > messed up the preview, while typing the HTML equivalents seemed to work; so I used &lt; and &gt;.
But apparently, that hasn't worked so nicely in the final version...

gabriele balducci <balducci>
Fri 17 Jun 2022 01:37:50 PM UTC, original submission:  


this isn't actually  a problem at present, but will presumably become a
problem with the next texinfo release.

So take this as a headsup more than a bug report

I just happened to build octave-7.1.90-rc vs a git pull of texinfo &gt;
6.8 (9d588505363a498d14c89db4d9236ea3d70ec3e5, revno 10427).

During the documentation build step (at least with the configuration
options I use, see below) an octave.html directory is created and
populated with:

if /bin/sh '/home/balducci/tmp/install-us-d/octave-7.1.90-rc.d/octave-7.1.90-rc/build-aux/missing' makeinfo --html   \
 -I doc/interpreter -I /home/balducci/tmp/install-us-d/octave-7.1.90-rc.d/octave-7.1.90-rc/doc/interpreter \
 --css-ref=octave.css \
 -o doc/interpreter/octave.htp `test -f 'doc/interpreter/octave.texi' || echo '/home/balducci/tmp/install-us-d/octave-7.1.90-rc.d/octave-7.1.90-rc/'`doc/interpreter/octave.texi; \
then \
  perl ./build-aux/inplace_edit.pl 's|(?<=</a&gt;): ||g' doc/interpreter/octave.htp/* && \
  rm -rf doc/interpreter/octave.html && \
  mv doc/interpreter/octave.htp doc/interpreter/octave.html && \
  touch doc/interpreter/octave.html/.octave-html-stamp; \
else \
  rm -rf doc/interpreter/octave.htp; exit 1; \

Afterwards, the .html files in octave.html are used to generate
"intermediate formats for Qt Help Project (.qhp) and Qt Help
Collection Project (.qhcp)" files, with:

rm -f doc/interpreter/octave_interpreter.qhc doc/interpreter/octave_interpreter.qch && \
perl ./doc/interpreter/mk-qthelp.pl octave.html doc/interpreter/octave_interpreter && \
qcollectiongenerator  doc/interpreter/octave_interpreter.qhcp -o doc/interpreter/octave_interpreter.qhc &gt;/dev/null && \
rm -f doc/interpreter/octave_interpreter.qhcp doc/interpreter/octave_interpreter.qhp

The mk-qthelp.pl perl script relies upon text baits in index.html and
Function-Index.html to do its job:

while (($_ = <$HTML&gt;) !~ /^&lt;div class="contents"&gt;/ ) {;}
while (($_ = <$HTML&gt;) !~ /^&lt;ul class="no-bullet"&gt;/ ) {;}
while (($_ = <$HTML&gt;) !~ /^&lt;table class="index-fn/ ) {;}

And here comes the problem. With texinfo&gt;6.8 (or, at least, with the
git pull I used), the html code generated by "makeinfo &dash;&dash;html" has changed.

In particular, there are no more

/^&lt;div class="contents"&gt;/


/^&lt;table class="index-fn/

baits, which must be replaced, AFAICS, by

/^&lt;ul class="toc-numbered-mark"&gt;/


/^&lt;table class="fn-entries/


As a result, two of the three while loops above become infinite and
perl (both 5.36.0 and 5.34.1, as I could verify) endlessly dumps the

Use of uninitialized value $_ in pattern match (m//) at ./doc/interpreter/mk-qthelp.pl line 30, &lt;$HTML&gt; line 831.

to stderr.

If you are capturing the output of the (unattended) build process into
a file, you end up with an utterly filled up disk (which actually
happened to me).

So I see two fothcoming problems here:
1. mk-qthelp.pl should be extended to catch up with the upcoming changes   in
   "makeinfo --html" output
2. the perl code should be made more robust wrt possible infinite

Just to make clearer the problem I'm reporting, this (crude, no back
compatible) workaround fixes things for me, allowing the build to
complete successfully:

diff -c doc/interpreter/mk-qthelp.pl.FIX_MK_QTHELP_PL doc/interpreter/mk-qthelp.pl
*** doc/interpreter/mk-qthelp.pl.FIX_MK_QTHELP_PL        2022-06-17 13:20:51.636488560 +0200
--- doc/interpreter/mk-qthelp.pl        2022-06-17 13:20:51.636488560 +0200
*** 26,33 ****
  open (my $HTML, "&lt;", $htmlfname) or die "Unable to open $htmlfname";

  # Skip through preamble of file to find start of list
! while (($_ = &lt;$HTML&gt;) !~ /^&lt;div class="contents"&gt;/ ) {;}
! while (($_ = &lt;$HTML&gt;) !~ /^&lt;ul class="no-bullet"&gt;/ ) {;}

  $level = 0;
  while (&lt;$HTML&gt;)
--- 26,34 ----
  open (my $HTML, "&lt;", $htmlfname) or die "Unable to open $htmlfname";

  # Skip through preamble of file to find start of list
! while (&lt;$HTML&gt;){next if $_ !~ /^&lt;div class="contents"&gt;/;last;}
! while (&lt;$HTML&gt;){next if $_ !~ /^&lt;ul class="toc-numbered-mark"&gt;/;last;}
!     die "index.html: reached EOF: bait changed?" if eof($HTML);

  $level = 0;
  while (&lt;$HTML&gt;)
*** 68,74 ****
  open ($HTML, "&lt;", $htmlfname) or die "Unable to open $htmlfname";

  # Skip through preamble of file to find start of list
! while (($_ = &lt;$HTML&gt;) !~ /^&lt;table class="index-fn/ ) {;}

  while (&lt;$HTML&gt;)
--- 69,76 ----
  open ($HTML, "&lt;", $htmlfname) or die "Unable to open $htmlfname";

  # Skip through preamble of file to find start of list
! while(&lt;$HTML&gt;){next if $_ !~ /^&lt;table class="fn-entries/;last;}
!     die "Function-Index.html: reached EOF: bait changed?" if eof($HTML);

  while (&lt;$HTML&gt;)

Building on GNU/linux:

Linux 5.18.1 #1 SMP Tue May 31 08:16:21 CEST 2022 x86_64 GNU/Linux

Configuring with:


Thank you very much for your valuable work


gabriele balducci <balducci>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by balducci (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.





    No changes have been made to this item

    Back to the top

    Powered by Savane 3.9