Menu

#131 Build docs fails due to makeinfo incompatibility

0.9.0
new
nobody
None
2017-01-26
2016-08-22
Balkin7
No

When building openocd with MSYS2, the build process fails with following message:

make[2]: Nothing to be done for 'install-exec-am'.
restore=: && backupdir=".am$$" && \
am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
rm -rf $backupdir && mkdir $backupdir && \
if (makeinfo --version) >/dev/null 2>&1; then \
  for f in openocd.info openocd.info-[0-9] openocd.info-[0-9][0-9] openocd.i[0-9] openocd.i[0-9][0-9]; do \
    if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
  done; \
else :; fi && \
cd "$am__cwd"; \
if makeinfo   -I . \
 -o openocd.info openocd.texi; \
then \
  rc=0; \
  CDPATH="${ZSH_VERSION+.}:" && cd .; \
else \
  rc=$?; \
  CDPATH="${ZSH_VERSION+.}:" && cd . && \
  $restore $backupdir/* `echo "./openocd.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
'penocd.texi:7986: unknown command `
'penocd.texi:7987: unknown command `
make[2]: *** [Makefile:383: openocd.info] Error 1
make[2]: Leaving directory '/D/projects/openocd-code/doc'
make[1]: *** [Makefile:639: install-am] Error 2
make[1]: Leaving directory '/D/projects/openocd-code/doc'
make: *** [Makefile:513: install-recursive] Error 1

After some search on the internet I found this bug report:
http://savannah.gnu.org/bugs/?40277

I tried the proposed solution and replaced the last @ with @@ (see attached patch) and the build works without errors.

My MSYS2 installation use following makeinfo version:
makeinfo --version
texi2any (GNU texinfo) 6.0

1 Attachments

Discussion

  • Paul Fertser

    Paul Fertser - 2016-12-26

    Hello,

    Thank you for the report.

    On Mon, Aug 22, 2016 at 02:14:09PM +0000, Balkin7 wrote:

    When building openocd with MSYS2, the build process fails with following
    message:
    ...
    'penocd.texi:7986: unknown command 'penocd.texi:7987: unknown command

    This is a really strange message.

    After some search on the internet I found this bug report:
    [3]http://savannah.gnu.org/bugs/?40277

    Seems totally unrelated to your patch as the command you replace is
    intended to do
    https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Def-Cmd-Continuation-Lines.html
    .

    My MSYS2 installation use following makeinfo version:
    makeinfo --version
    texi2any (GNU texinfo) 6.0

    I have texinfo 6.3 here (on Gentoo GNU/Linux) and do not see any error
    manifistations. Can you please provide more details regarding this
    issue? Is it reproducible with current version of openocd and texinfo
    shipped by today's msys2?

    --
    Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
    mailto:fercerpav@gmail.com

     
  • Balkin7

    Balkin7 - 2017-01-03

    Hallo,

    after updating MSYS2 with calling "pacman -Syuu" repeatly until no packages are updated and switch to the latest openocd code (v0.10.0-rc1-1-gc404ff5)

    The build is still only successful with patched source code.

    I am compiling on a Windows 7 machine (x64). For compilation I use MSYS2-MinGW64 Toolchain.

    When testing the build with Linux line endings, the bug did not occur. The build is successful with patched and unpatched source code. It is also enough if only the openocd.texi file contain linux line endings.
    So its looks like it is a side effect of the windows line endings.

    Cheers

    P.S.:
    makeinfo --version
    texi2any (GNU texinfo) 6.1

    make --version
    GNU Make 4.2.1
    Gebaut für x86_64-pc-msys

     
    • Paul Fertser

      Paul Fertser - 2017-01-03

      Hello,

      On Tue, Jan 03, 2017 at 06:18:52AM +0000, Balkin7 wrote:

      When testing the build with Linux line endings, the bug did not occur. The build
      is successful with patched and unpatched source code. It is also enough if only
      the openocd.texi file contain linux line endings.
      So its looks like it is a side effect of the windows line endings.

      So now the question boils down to "how exactly can one end up with
      windows line endings in the openocd.texi file?"

      And btw, 0.10.0-rc1 should be now available in MSYS2 binary repo.

      --
      Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
      mailto:fercerpav@gmail.com

       
  • Balkin7

    Balkin7 - 2017-01-03

    So now the question boils down to "how exactly can one end up with
    windows line endings in the openocd.texi file?"

    On a Windows PC this is quite easy, just checkout the openocd git repository with default settings. Git will convert the line endings in each text file to windows line endings.

    On possibility to prevent this is using the .gitattributes file with something like:
    *.texi eol=lf

    I do not know mutch about makeinfo and its sensivity to windows line endings, but the patched source code works with both line ending styles ;)

     
    • Paul Fertser

      Paul Fertser - 2017-01-04

      On Tue, Jan 03, 2017 at 07:01:09PM +0000, Balkin7 wrote:

      On a Windows PC this is quite easy, just checkout the openocd git repository
      with default settings. Git will convert the line endings in each text file to
      windows line endings.

      Oh, I remember seeing the Git for windows installer asking about
      system-wide newline settings and I thought "who the hell might be
      choosing something other than refraining from any mangling" and "who
      the hell decided that sane default is to do some automagic
      translation"...

      On possibility to prevent this is using the .gitattributes file with something
      like:
      *.texi eol=lf

      Yes, this one is worth considering.

      I do not know mutch about makeinfo and its sensivity to windows line endings,
      but the patched source code works with both line ending styles ;)

      By works you mean makeinfo doesn't complain or you get fully matching
      Info and PDF outputs? Do you know what is the correct way to deal with
      the issue? Probably it's a bug in makeinfo, do you consider reporting
      it upstream?

      --
      Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
      mailto:fercerpav@gmail.com

       
  • Balkin7

    Balkin7 - 2017-01-26

    I do not know mutch about makeinfo and its sensivity to windows line endings,
    but the patched source code works with both line ending styles ;)

    By works you mean makeinfo doesn't complain or you get fully matching
    Info and PDF outputs? Do you know what is the correct way to deal with
    the issue? Probably it's a bug in makeinfo, do you consider reporting
    it upstream?

    With works I mean makeinfo doesn't complain and the build process was completed without errors. I did not compare any outputs. As this is the first time I came into contact with makeinfo, I am probably the wrong person to push this to upstream. I found the solution only by googeling around and try and error.

     

Log in to post a comment.