octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #62648] forthcoming build problem with texinfo


From: gabriele balducci
Subject: [Octave-bug-tracker] [bug #62648] forthcoming build problem with texinfo>6.8
Date: Fri, 17 Jun 2022 09:37:52 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?62648>

                 Summary: forthcoming build problem with texinfo>6.8
                 Project: GNU Octave
               Submitter: 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: 
        Originator Email: 
             Open/Closed: Open
                 Release: 7.1.90
         Discussion Lock: Any
        Operating System: GNU/Linux


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 17 Jun 2022 01:37:50 PM UTC By: gabriele balducci <balducci>
hello

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; \
fi



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;/

and

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


baits, which must be replaced, AFAICS, by


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

and

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


respectively.

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
message:


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
   loops

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:

--enable-shared
--disable-silent-rules


Thank you very much for your valuable work

ciao
-gabriele








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62648>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]