On Mon, Mar 23, 2026 at 01:39:48AM +0100, Manuel Jacob wrote: > On 22/03/2026 19.09, Gavin Smith wrote: > > On Tue, Mar 17, 2026 at 11:20:17AM +0100, Manuel Jacob wrote: > > > Hi, > > > > > > When cross-compiling texinfo in an environment where ncurses is available > > > for the host machine (e.g. in a sysroot), but not for the build machine, > > > running `make` fails with the following error: > > > > > > ... > > > > > > The same error has been reported here: > > > https://lists.gnu.org/archive/html/bug-texinfo/2013-11/msg00017.html > > > > > > In the case of cross-compiling, parts of texinfo are built for running on > > > the build machine (in the `tools` directory). For each of the build > > > machine > > > and the host machine, it is decided whether the `info` subdirectory is > > > built > > > or not, based on `HAVE_TERMLIBS`. If `HAVE_TERMLIBS` is false for the > > > build > > > machine and true for the host machine, `tools/info` will not be built, but > > > `info` will be built, trying to execute `../tools/info/makedoc`, which is > > > not there. > > > > > > A possible workaround is to execute `make -C tools/info makedoc` before > > > executing `make`. > > > > Thanks for testing and investigating this. I'm surprised that > > cross-compilation works at all - the support in the build system for it is > > very old and is from before the Perl implementation of makeinfo, as far as > > I am aware. > > > > I've attempted a fix based on your description. I'm not really sure how > > I would test this, but if you can confirm this works, we could make this > > change. > > I can confirm that these two ways to build texinfo produce exactly the same > end result: > > 1) without your patch and with `make -C tools/info makedoc` workaround > 2) with your patch and without `make -C tools/info makedoc` workaround
Thanks, I committed the patch with some minor alterations. > We could avoid building the `info` directory for build if it’s not needed > for host. But, unless you can think of an easy way to that, it’s probably > not worth any extra effort. I didn't spent any time trying to work out how to do that. > You could wrap the whole block in `if ! TOOLS_ONLY` because it doesn’t seem > like the info tool is needed for the build machine. Done. > > > + > > # Use `ginfo' for building to avoid confusion with the standard `info' > > # target. Removes the `g' in the install rule before applying any > > # user-specified name transformations. > > Maybe this comment should be moved up to before the previous block? I reworded and extended the comment. > [unrelated to the diff:] > > info/Makefile.am contains the following: > > funs.h: makedoc$(EXEEXT) $(cmd_sources) > rm -f $(generated_sources) > $(top_builddir)/$(native_tools)/info/makedoc $(cmd_sources) > > I think that the dependency on makedoc$(EXEEXT) is not necessary in the > cross-compilation case. Skipping compilation of it won’t make a big > difference in compilation time, but it probably clarifies things for the > reader (even though it’s more verbose). Yes but it's not worth the complication to have the rule twice, once for TOOLS_ONLY and once for !TOOLS_ONLY. > > (This made me think whether there is a way to actually add a dependency on > `$(top_builddir)/$(native_tools)/info/makedoc`. I’m not at all familiar with > recursive automake, but there doesn’t seem a straightforward way).
