Bug 14678 - GDB 7.5 fails to build unless makeinfo is installed
Summary: GDB 7.5 fails to build unless makeinfo is installed
Status: REOPENED
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: 7.5
: P2 normal
Target Milestone: 11.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 17268 18113 20417 22092 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-06 19:17 UTC by Paul Smith
Modified: 2023-08-28 13:48 UTC (History)
11 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Smith 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 Paul Smith 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 Paul Smith 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 Paul Smith 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!
Comment 7 Paul Smith 2020-03-07 19:18:38 UTC
Just FYI, this problem still is true in the latest GDB 9.1 release package: the GDBvn.texi and gdb-cfg.texi files are not provided with the package, so they need to be rebuilt, which then makes them newer than the info files, which then requires makeinfo to be installed in order to build GDB.
Comment 8 Paul Smith 2020-03-07 19:22:32 UTC
Also I should mention: in GDB 9.1 I get the failure just during a normal invocation of `make`; I don't need to run `make install` to see it.
Comment 9 Miguel Ojeda 2020-11-21 20:48:22 UTC
Still there in 10.1
Comment 10 Tom Tromey 2022-02-22 15:18:53 UTC
*** Bug 17268 has been marked as a duplicate of this bug. ***
Comment 11 Tom Tromey 2022-02-22 15:19:03 UTC
*** Bug 18113 has been marked as a duplicate of this bug. ***
Comment 12 Tom Tromey 2022-02-22 15:19:16 UTC
*** Bug 22092 has been marked as a duplicate of this bug. ***
Comment 13 Tom Tromey 2022-02-22 15:20:35 UTC
*** Bug 20417 has been marked as a duplicate of this bug. ***
Comment 14 Tom de Vries 2022-10-04 15:48:17 UTC
This is fixed by commit ab954e4a53c ("Fix building gdb release from tar file without makeinfo"), available starting release 11.1.
Comment 15 nfall 2022-10-19 01:43:32 UTC
This bug appears to still be occuring in gdb 12.1.

$ mkdir gdbtest
$ cd gdbtest
$ ../tmp/gdb-12.1/configure
...
checking for makeinfo... no
/home/me/tmp/gdb-12.1/missing: line 81: makeinfo: command not found
...
$ make
...
  MAKEINFO doc/bfd.info
/home/me/tmp/gdb-12.1/missing: line 81: makeinfo: command 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[3]: *** [doc/bfd.info] Error 127
make[3]: Leaving directory `/home/me/gdbtest/bfd'
make[2]: *** [info-recursive] Error 1
make[2]: Leaving directory `/home/me/gdbtest/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/home/me/gdbtest'
make: *** [all] Error 2
Comment 16 Tom de Vries 2022-10-19 04:02:04 UTC
(In reply to nfall from comment #15)
> This bug appears to still be occuring in gdb 12.1.

I'm aware of two separate problems with the same symptom:
- not being able to build gdb from a snapshot or release tarball without
  makeinfo
- not being able to build gdb from the repository without makeinfo

[ It's a bit unfortunate that PRs reporting both problems have been marked as duplicate of this PR. ]

The first is gdb-specific, the second is due to top-level configure.

AFAICT, comment 0 reports the first problem, and comment 15 the second.

The first one has been fixed in aforementioned commit.  I've just confirmed that downloading the gdb 12.1 tarball and doing configure MAKEINFO=/usr/bin/false and make all-gdb gets me a complete build.

I'm working on fixing the second, I'm in the process of upstreaming a patch at gcc-patches ( https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602797.html ).

[ FWIW, I have a workaround submitted here https://sourceware.org/pipermail/gdb-patches/2022-September/191642.html if you're looking for something less intrusive.  Note also that this should work: ./configure; make MAKEINFO=/usr/bin/true, it's just a bit cumbersome to have to remember to do this for each make invocation. ]
Comment 17 John Doe 2023-08-28 07:55:18 UTC
[posted to the the one marked as duplicate before, this one is of course the correct one]

Rechecked with GDB 13.1, texinfo seems to be still necessary, or worked around with "make MAKEINFO=/usr/bin/true", so I think this issue should be reopened.

Tom de Vries suggested `--without-makeinfo` but I didn't seen that live yet. If this is included and automatically enabled set on a distribution tarball if makeinfo is not found (possibly instead of configure pointing to the missing script), _then_ this would indeed be resolved-fixed.

Here's a build output that shows the issue with a release tarball, using https://ftp.gnu.org/gnu/gdb/gdb-13.1.tar.xz 

$ cd /tmp
$ tar xf gdb-13.1.tar.gz
$ mkdir gdb-13.1/build
$ cd gdb-13.1/build
$ ../configure --prefix=/opt/gdb-13.1 --with-python --with-lzma
$ gmake -k  # output ignored
$ gmake 
gmake[1]: Entering directory `/tmp/gdb-13.1/build'
gmake[2]: Entering directory `/tmp/gdb-13.1/build/libiberty'
gmake[3]: Entering directory `/tmp/gdb-13.1/build/libiberty/testsuite'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/tmp/gdb-13.1/build/libiberty/testsuite'
gmake[2]: Leaving directory `/tmp/gdb-13.1/build/libiberty'
gmake[2]: Entering directory `/tmp/gdb-13.1/build/intl'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/tmp/gdb-13.1/build/intl'
gmake[2]: Entering directory `/tmp/gdb-13.1/build/zlib'
gmake[2]: Nothing to be done for `all'.
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc -std=gnu99" "CFLAGS=-g -O2    " "CXXFLAGS=-g -O2    " "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/bin/install -c" "INSTALL_DATA=/bin/install -c -m 644" "INSTALL_PROGRAM=/bin/install -c" "INSTALL_SCRIPT=/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2  " "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=gmake" "MAKEINFO=/tmp/gdb-13.1/missing makeinfo --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/opt/gdb-13.1" "infodir=/opt/gdb-13.1/share/info" "libdir=/opt/gdb-13.1/lib" "prefix=/opt/gdb-13.1" "tooldir=/opt/gdb-13.1/x86_64-pc-linux-gnu" "AR=ar " "AS=as" "CC=gcc -std=gnu99" "CXX=g++" "LD=ld" "LIBCFLAGS=-g -O2  " "NM=nm" "PICFLAG=" "RANLIB=ranlib " "DESTDIR=" DO=all multi-do # gmake
gmake[2]: Leaving directory `/tmp/gdb-13.1/build/zlib'
gmake[2]: Entering directory `/tmp/gdb-13.1/build/libsframe'
gmake  all-am
gmake[3]: Entering directory `/tmp/gdb-13.1/build/libsframe'
gmake[3]: Leaving directory `/tmp/gdb-13.1/build/libsframe'
gmake[2]: Leaving directory `/tmp/gdb-13.1/build/libsframe'
gmake[2]: Entering directory `/tmp/gdb-13.1/build/bfd'
Making info in po
gmake[3]: Entering directory `/tmp/gdb-13.1/build/bfd/po'
gmake[3]: Nothing to be done for `info'.
gmake[3]: Leaving directory `/tmp/gdb-13.1/build/bfd/po'
gmake[3]: Entering directory `/tmp/gdb-13.1/build/bfd'
  MAKEINFO doc/bfd.info
/tmp/gdb-13.1/missing: line 81: makeinfo: command 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/>
gmake[3]: *** [doc/bfd.info] Error 127
gmake[3]: Leaving directory `/tmp/gdb-13.1/build/bfd'
gmake[2]: *** [info-recursive] Error 1
gmake[2]: Leaving directory `/tmp/gdb-13.1/build/bfd'
gmake[1]: *** [all-bfd] Error 2
gmake[1]: Leaving directory `/tmp/gdb-13.1/build'
gmake: *** [all] Error 2


So I think the bug should be reopened.
Comment 18 Tom Tromey 2023-08-28 13:48:44 UTC
Reopening.
It looks like the patch that landed fixed a problem with gdb's
info files.  However, a couple of the failures relate to BFD
instead.  So perhaps it also needs some treatment.