Build failure for 8-2019-update-q3 on macOS 10.15

Asked by Tom Kornack

Hello! I'm hitting a build failure on 8-2019-update-q3 on macOS 10.15 here:

Doing pdf in bfd
Making pdf in doc
TEXINPUTS="/Users/me/Downloads/gcc-arm-none-eabi-8-2019-q3-update/src/binutils/bfd/doc:$TEXINPUTS" \
 MAKEINFO='makeinfo --split-size=5000000 --split-size=5000000 -I /Users/me/Downloads/gcc-arm-none-eabi-8-2019-q3-update/src/binutils/bfd/doc' \
 texi2dvi --pdf --batch --build-dir=bfd.t2p -o bfd.pdf \
 `test -f 'bfd.texi' || echo '/Users/me/Downloads/gcc-arm-none-eabi-8-2019-q3-update/src/binutils/bfd/doc/'`bfd.texi
/usr/bin/texi2dvi: Can't use option `--output' with more than one argument.
make[3]: *** [bfd.pdf] Error 2
make[2]: *** [pdf-recursive] Error 1
make[1]: *** [pdf-bfd] Error 1
make: *** [do-install-pdf] Error 2

This appears to be in the binutils makefile; the relevant section is this:

bfd.info: bfd.texi $(bfd_TEXINFOS)
 $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
 rm -rf $$backupdir && mkdir $$backupdir && \
 if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
   for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
     if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
   done; \
 else :; fi && \
 if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
  -o $@ `test -f 'bfd.texi' || echo '$(srcdir)/'`bfd.texi; \
 then \
   rc=0; \
 else \
   rc=$$?; \
   $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
 fi; \
 rm -rf $$backupdir; exit $$rc

Can anyone spot or reproduce the problem?

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Tom Kornack
Solved:
Last query:
Last reply:
Revision history for this message
Tejas Belagod (belagod-tejas) said :
#1

You need a later version of texi2dvi than GNU Texinfo 4.8(I build with GNU texinfo 6.5). In the older versions of texi2dvi, there's a bug that parses -b* and --build-dir also gets caught by this regex and gets confused. You need a more recent texi2dvi that parses --batch and --build-dir properly. I dont think this is documented in the How-to that is supplied with this doc - will fix it.

Revision history for this message
Tom Kornack (kornack) said :
#2

Thank you!

For mac users using homebrew, it is possible to install texinfo and wget this way:

    brew install wget texinfo

and

    echo 'export PATH="/usr/local/opt/texinfo/bin:$PATH"' >> ~/.zshrc

would add it to your path.

Revision history for this message
Tom Kornack (kornack) said :
#3

One more small requirement: At the end of the build, tar is called with --owner=0, which requires gnu-tar. What worked for me was:

    brew install wget texinfo gnu-tar
    export PATH=/usr/local/opt/texinfo/bin:$PATH
    export PATH=/usr/local/opt/gnu-tar/libexec/gnubin:$PATH

    ./install-sources.sh
    ./build-prerequisites.sh

    ./build-toolchain.sh

Please note the need for these two elements - texinfo and gnu-tar - when building on macOS.