On 10/22/21 08:16, Vincent Breton wrote:
> On Oct 18, 2021, at 20:51, Pedro Andres Aranda Gutierrez <paaguti@gmail.com> 
> wrote:
> I'm trying to generate the documentation
> ./org.texi:17579: TeX capacity exceeded, sorry [input stack size=5000].
Jean-Christophe Helary reported too the location of the source of trouble identified by Takesi Ayanokoji.

I think the trouble with "TeX capacity exceeded" is not a trouble with "make doc", Emacs or Org.
Probably a trouble with make or TeX environment as for example the size of available RAM. 
I have already met that on Virtual machine with not enough memory for compilation but just enough for installation of the OS.

It has been a few years since I was deep in the guts of TeX and friends, but as I recall, that error usually means that something somewhere has caused TeX to expand one or more macros in an infinite loop (though there can be other causes). It is generally the result of a syntax error or a package conflict, but as far as I remember there aren't really any packages to conflict during texinfo conversion. Perhaps there are conflicts in the toolchain itself (e.g., between the particular versions of (La)TeX and texinfo that you are using)?

If you're really motivated to get to the bottom of this, inserting "\tracingall" into the TeX code just before the point where the error comes up should help. I can't reproduce the problem (see below), so I can't do it myself.

On my system "make doc" generate an error but I found a temporary solution to generate the documentation in PDF.

For what it is worth, I just did a fresh clone of org-mode and successfully generated the docs using both "make doc" and "make pdf". I used a fully up-to-date TeXLive 2021 and texinfo (v. 6.7) on Ubuntu 21.10.

As a side note, I received the following warning with both "make" commands:

--

WARNING: No org-loaddefs.el file could be found from where org.el is loaded.
You need to run "make" or "make autoloads" from Org lisp directory
--

However, building the docs was successful regardless of whether I ran "make autoloads" first.

Alan