Bug 14678

Summary: GDB 7.5 fails to build unless makeinfo is installed
Product: gdb Reporter: psmith
Component: gdbAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: aaro.koskinen, palves
Priority: P2    
Version: 7.5   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description psmith 2012-10-06 19:17:21 UTC
I've seen various bugs against earlier releases of GDB stating that they would not build on systems where makeinfo is not installed, but they were supposed to be fixed in the current GDB releases.  So there is a new build failure with GDB 7.5, which will not build properly on systems without makeinfo installed.

It appears that gdb.info is depending on the generated file GDBvn.texi, but that file is not provided in the GDB 7.5 distribution.  As a result make rebuilds it, and as a result of THAT it wants to rebuild gdb.info but this of course fails if makeinfo is not available:

make[7]: Entering directory `/usr/src/cc/obj/f/gdb.i686/gdb/doc'
(test "ln -s" = "ln -s" && \
  ln -s /usr/src/cc/gdb-7.5/gdb/doc/all-cfg.texi gdb-cfg.texi) || \
ln /usr/src/cc/gdb-7.5/gdb/doc/all-cfg.texi gdb-cfg.texi || \
cp /usr/src/cc/gdb-7.5/gdb/doc/all-cfg.texi gdb-cfg.texi
echo "@set GDBVN `sed q /usr/src/cc/gdb-7.5/gdb/doc/../version.in`" > ./GDBvn.new
if [ -n "(GDB) " ]; then \
  echo "@set VERSION_PACKAGE (GDB) " >> ./GDBvn.new; \
fi
echo "@set BUGURL @uref{http://www.gnu.org/software/gdb/bugs/}" >> ./GDBvn.new
if [ "@uref{http://www.gnu.org/software/gdb/bugs/}" = "@uref{http://www.gnu.org/software/gdb/bugs/}" ]; then \
  echo "@set BUGURL_DEFAULT" >> ./GDBvn.new; \
fi
if test -z "-I /usr/src/cc/gdb-7.5/gdb/doc/../../readline/doc"; then \
  echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
fi
mv GDBvn.new GDBvn.texi
/usr/src/cc/gdb-7.5/missing makeinfo --split-size=5000000 --split-size=5000000   -I /usr/src/cc/gdb-7.5/gdb/doc/../../readline/doc -I /usr/src/cc/gdb-7.5/gdb/doc/../mi -I /usr/src/cc/gdb-7.5/gdb/doc \
	-o gdb.info /usr/src/cc/gdb-7.5/gdb/doc/gdb.texinfo
WARNING: `makeinfo' is missing on your system.  You should only need it if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
make[7]: *** [gdb.info] Error 1
Comment 1 Pedro Alves 2013-01-02 18:57:16 UTC
I just tried 7.5.1 (with 'configure MAKEINFO=false'), and I only see that 
if I try to build the info manual, with "make info".  If I just build gdb, with "make", then I get no complaints.  I see gdb.info is included pre-built in the the release tarball.  What exactly were you trying to do?
Comment 2 Aaro Koskinen 2013-06-28 18:12:38 UTC
I see the same error with GDB 7.5.1. This happens during "make install".

There should be a way to prevent docs being installed. I'm cross-building GDB for 5 different targets, it's not like I would need a separate copy of documentation for each one of them in any case.
Comment 3 psmith 2017-08-22 18:19:27 UTC
I'm still seeing this with GDB 8.0 using the tar.xz package from ftp.gnu.org.

$ mkdir obj
$ cd obj
$ ../gdb-8.0/configure
  ...
checking for makeinfo... no
obj/gdb-8.0/missing: 81: obj/gdb-8.0/missing: makeinfo: not found
  ...
checking for makeinfo... obj/gdb-8.0/missing makeinfo --split-size=5000000
configure: WARNING:
*** Makeinfo is missing. Info documentation will not be built.

$ make
$ make install
   ...
mv GDBvn.new GDBvn.texi
/usr/src/cc/gdb-7.5/missing makeinfo --split-size=5000000 --split-size=5000000   -I /usr/src/cc/gdb-7.5/gdb/doc/../../readline/doc -I /usr/src/cc/gdb-7.5/gdb/doc/../mi -I /usr/src/cc/gdb-7.5/gdb/doc \
	-o gdb.info /usr/src/cc/gdb-7.5/gdb/doc/gdb.texinfo
WARNING: `makeinfo' is missing on your system.  You should only need it if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
make[7]: *** [gdb.info] Error 1
Comment 4 psmith 2017-08-22 18:30:28 UTC
Sorry I pasted the wrong cut buffer into my comment above: the error messages refer to gdb-8.0 not gdb-7.5:

if test -z "-I ../gdb-8.0/gdb/doc/../../readline/doc"; then \
  echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
fi
if [ -n "" ]; then \
  echo "@set SYSTEM_GDBINIT " >> ./GDBvn.new; \
fi
mv GDBvn.new GDBvn.texi
../gdb-8.0/missing makeinfo --split-size=5000000 --split-size=5000000   -I ../gdb-8.0/gdb/doc/../../readline/doc -I ../gdb-8.0/gdb/doc/../mi -I ../gdb-8.0/gdb/doc \
        -o gdb.info ../gdb-8.0/gdb/doc/gdb.texinfo
../gdb-8.0/missing: 81: ../gdb-8.0/missing: makeinfo: not found
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <http://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <http://www.gnu.org/software/make/>
make[5]: *** [Makefile:503: gdb.info] Error 127


I'm not sure if I'm supposed to change the status of this bug myself and if so what I should change it to...
Comment 5 Pedro Alves 2017-08-22 19:04:33 UTC
Paul, please feel free to edit the bug status.  I had set it to waiting in comment #1 waiting for your response.
Comment 6 psmith 2017-08-22 19:42:23 UTC
Oops sorry; I dpn't have much to add beyond what Aaro said: you need to run "make install" to see the issue.  Cheers!