bugtexinfo - GNU documentation system - Bugs: bug #42067, help2man (1.45.1): can't get...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #42067: help2man (1.45.1): can't get `--help' info from ../util/texi2dvi

Submitted by:  Richard PALO <risto3>
Submitted on:  Mon 07 Apr 2014 04:42:07 PM UTC  
 
Category: texi2dviRelease: 
Priority: 5 - NormalSeverity: 3 - Normal
Item Group: NonePrivacy: Public
Open/Closed: ClosedAssigned to: None
Status: None

(Jump to the original submission Jump to the original submission)

Tue 15 Apr 2014 08:52:23 PM UTC, comment #6:

thanks for the report, richard. gavin made the change, and i've now updated it on ftp.gnu.org.

Karl Berry <karl>
Project Administrator
Sun 13 Apr 2014 05:51:39 AM UTC, comment #5:

Just to communicate where the real problem lies as reported by pkgsrc users (Mr Clausen and Mr Zingelman), the following snippet is not supported by certain shells, namely pdksh and older bash (prior to 2.04) and older ksh.

# "Citation undefined" is for LaTeX, "Undefined citation" for btxmac.tex.
# The no .aux && \bibdata test is also for btxmac, in case it was the
# first run of a bibtex-using document. Otherwise, it's possible that
# bibtex would never be run.
if test -r "$in_noext.aux" \
&& test -r "$in_noext.log" \
&& ((grep 'Warning:.Citation.undefined' "$in_noext.log" \
|| grep '.*Undefined citation' "$in_noext.log" \
|| grep 'No file .*\.bbl\.' "$in_noext.log") \
|| (grep 'No \.aux file' "$in_noext.log" \
&& grep '^\\bibdata' "$in_noext.aux")) \
>&6 2>&1; \
then
for f in `generated_files_get "$in_noext" bibaux_file_p`; do
run $bibtex "$f"
done
fi

=============
the '((grep...))' is the cause...

If I quote, for a simple example, the bash manpage:

((expression))
The expression is evaluated according to the rules
described below under ARITHMETIC EVALUATION. If the
value of the expression is non-zero, the return status
is 0; otherwise the return status is 1. This is
exactly equivalent to let "expression".

for example on netbsd, the following happens when runnig the snippet(called here as bug48075.sh):

> -bash-4.2$ ksh bug48075.sh
> bug48075.sh[5]: syntax error: `if' unmatched
> bug48075.sh[18]:
> -bash-4.2$ pdksh bug48075.sh
> bug48075.sh[5]: syntax error: `if' unmatched
> -bash-4.2$ sh bug48075.sh
> -bash-4.2$ bash bug48075.sh
> -bash-4.2$


One solution is to insert a space as follows:
@@ -1103,7 +1103,7 @@
# bibtex would never be run.
if test -r "$in_noext.aux" \
&& test -r "$in_noext.log" \
- && ((grep 'Warning:.Citation.undefined' "$in_noext.log" \
+ && ( (grep 'Warning:.Citation.undefined' "$in_noext.log" \
|| grep '.*Undefined citation' "$in_noext.log" \
|| grep 'No file .*\.bbl\.' "$in_noext.log") \
|| (grep 'No \.aux file' "$in_noext.log" \

In the end, this could/should be fixed in a portable fashion here in the upstream source in order to allow older (more strict) shells.

Cordially,

Richard PALO <risto3>
Wed 09 Apr 2014 04:42:47 AM UTC, comment #4:

The only change to Makefile.in is the HELP2MAN assignment.
Naturally Makefile.in is used by configure to generate the Makefile hence its value here only when not using automake.

In any event, I agree that this does not appear to be an issue with the sources here. I have now been able to further isolate the problem to be related to a replacement shell being used by pkgsrc.

Sorry for the noise.
This can be closed as a distro specific, that is pkgsrc issue.

cheers

Richard PALO <risto3>
Tue 08 Apr 2014 10:02:48 PM UTC, comment #3:

Hi Richard,

Thanks for the report, but I don't know what to do. --no-discard-stderr isn't the right fix because texi2dvi --help outputs to stdout (as it should). it all works for me. what happens when you run texi2dvi --help by hand (from the shell)?

The other question that comes to mind is why it is running help2man at all. The man page is in the tarball and it is up to date, so that users don't have to have help2man installed.

Makefile.in is a generated file (from Makefile.am), so Gavin is certainly correct that it can't be patched, per se. (it's in the tarball so users don't have to have automake. As usual.) But this has nothing to do with the problem at hand.

As for your other changes to Makefile.in, I don't understand.

best,
karl

Karl Berry <karl>
Project Administrator
Tue 08 Apr 2014 05:19:00 AM UTC, comment #2:

If I freshly extract the tarball texinfo-5.2.tar.gz I clearly see:

richard@x3200:~/src$ ls -la texinfo-5.2/Makefile.in
-rw-r--r-- 1 richard staff 53663 sept. 27 2013 texinfo-5.2/Makefile.in
richard@x3200:~/src$ ls -la texinfo-5.2/util/texi2dvi
-rwxr-xr-x 1 richard staff 58518 sept. 27 2013 texinfo-5.2/util/texi2dvi*

did you try running help2man in a script with output redirected?

Richard PALO <risto3>
Mon 07 Apr 2014 06:08:49 PM UTC, comment #1:

I can't reproduce this. I found that help2man would give this error message if the file didn't exist, so are you sure that the ../util/texi2dvi file exists? Are you running make in the man subdirectory without having first run make in the top-level directory?

Makefile.in is a generated file so cannot be patched.

Gavin D. Smith <gavin>
Project Administrator
Mon 07 Apr 2014 04:42:07 PM UTC, original submission:

when building texinfo 5.2 on pkgsrc with help2man 1.45.1 installed, the following error occurs:

/opt/local/bin/bmake all-am
Making all in man
--- texi2dvi.1 ---
unset TEXI2DVI_BUILD_MODE; unset TEXI2DVI_BUILD_DIRECTORY;
/opt/local/bin/pdksh
/var/tmp/pkgsrc/devel/gtexinfo/work/texinfo-5.2/build-aux/missing help2man
--name="convert Texinfo documents to DVI or PDF" ../util/texi2dvi

> texi2dvi.1

help2man: can't get `--help' info from ../util/texi2dvi
Try `--no-discard-stderr' if option outputs to stderr

      • [texi2dvi.1] Error code 1

Following the hint, the following patch seems to work:
+--- man/Makefile.in.orig 2014-04-04 21:37:08.330805790 +0000
++++ man/Makefile.in
+@@ -670,7 +670,7 @@ HAVE_WMEMSET = @HAVE_WMEMSET@
+ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
+ HAVE__BOOL = @HAVE__BOOL@
+ HAVE__EXIT = @HAVE__EXIT@
+-HELP2MAN = @HELP2MAN@
++HELP2MAN = @HELP2MAN@ --no-discard-stderr
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+ INSTALL = @INSTALL@

Richard PALO <risto3>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by karl (Posted a comment)
  • -unavailable- added by gavin (Posted a comment)
  • -unavailable- added by risto3 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 Apr 2014 08:52:23 PM UTCkarlOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1