Re: [ANNOUNCEMENT] GDB 11 release branch created!

Tom de Vries
2021-07-05T13:36:25Z

On 7/5/21 2:33 PM, Eli Zaretskii wrote:
>> Cc: gdb@sourceware.org
>> From: Tom de Vries <tdevries@suse.de>
>> Date: Mon, 5 Jul 2021 12:36:00 +0200
>>
>>> The tarball contains the file gdb/doc/GDBvn.texi which is a generated
>>> file depending on the configuration. This breaks building with
>>> --with-system-readline.
>>
>> I managed to reproduce this.
>>
>> The steps are:
>> - download (or create using src-release.sh) a snapshot
>> - unpack it, into say src
>> - cd src; find -name "*.info*" | xargs rm -f
>> - mkdir build; cd build ; ../src/configure --with-system-readline
>> - cd build; make all-gdb
>>
>> For make output, see below.
>>
>> This can be fixed/worked around by doing:
>> ...
>> $ rm -f gdb/doc/GDBvn.texi
>> ...
>> as Andreas did here (
>> https://build.opensuse.org/package/rdiff/home:AndreasSchwab/gdb?linkrev=base&rev=143
>> ).
>>
>> My guess is that this is a regression since:
>> ...
>> commit ab954e4a53cab8c33728e6708695abc1616c90b1
>> Author: Bernd Edlinger <bernd.edlinger@hotmail.de>
>> Date: Wed Nov 25 18:52:49 2020 +0100
>>
>> Fix building gdb release from tar file without makeinfo
>>
>> Add GDBvn.texi and version.subst to the release tar file,
>> so the gdb.info does not need makeinfo.
>>
>> This avoids the need for makeinfo to be available.
>> ...
>>
>> Interestingly, there are previous commits related to GDBvn.texi where
>> the submission emails show the same problem (
>> https://sourceware.org/pipermail/gdb-patches/2011-January/078980.html ),
>> and the final conclusion of that discussion (
>> https://sourceware.org/pipermail/gdb-patches/2011-January/079001.html ) is:
>> ...
>> So, unless anyone else objects, removing GDBvn.texi from the
>> distributed files is the solution.
>
> But that would again bring the problem that inclusion was intended to
> fix, no?
>
> Wouldn't it be better to modify the configure script so that
> READLINE_TEXI_INCFLAG always includes "-I ${READLINE_DIR}"? Or did I
> misunderstand the reason why makeinfo doesn't find the Readline
> manual?

I was not trying to suggest a fix, but merely trying to point out that
we seem to be going forth and back on this (that, and the reproducer
seemed to be worth sharing at that point).

Anyway, by now I've investigated a bit further.

The difficulty seems to be that the documentation is dependent on
configure options.

I can think of two clean ways to handle pre-generated docs in such a case:
- not including pre-generated docs in the source tarball
- generating a version of the docs for the source
tarball, that conservatively agrees with all configure choices.

Before the regressing commit, we had the first situation. After the
commit, we no longer have the first, but also not the second (and, we
have the build problem).

To give an example of what I'm concerned about: say a user has a system
without makeinfo, and builds with --with-system-readline. Then the gdb
documentation point to the in-source readline docs, which does not
necessarily agree with the actually used readline version.

So, I think that before thinking about solving build problems, we first
have to get clear what kind of pre-generated docs we want, if any.

Thanks,
- Tom