radian-software / straight.el

🍀 Next-generation, purely functional package manager for the Emacs hacker.
MIT License
2.71k stars 150 forks source link

Straight freezed at `Building auctex` forever. #836

Closed hongyi-zhao closed 2 years ago

hongyi-zhao commented 3 years ago

Now, I've updated to Ubuntu 20.04.2 LTS, and use the following configuration as recipe to install auctex:

(straight-use-package 
   '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
     :pre-build (("./autogen.sh") ("./configure" "--without-texmf-dir" "--with-lispdir=.") ("make"))
                 ))

But Emacs is stuck at Building auctex forever, as shown below:

image

OTOH, if I commented out the :pre-build directive as follows:

(straight-use-package 
   '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
     ;:pre-build (("./autogen.sh") ("./configure" "--without-texmf-dir" "--with-lispdir=.") ("make"))
                 ))

Then each time when I start Emacs, autctex will be built by straight, and the following message will appear:

Building auctex...done

Regards, HY

progfolio commented 3 years ago

I would check the output of the *straight-process-buffer and *straight-byte-compilation buffers to see if there are any errors.

If there are not, I would manually try invoking the pre-build steps via the command line in the repository to see if they work in your regular shell environment.

hongyi-zhao commented 3 years ago

I would check the output of the straight-process-buffer and straight-byte-compilation buffers to see if there are any errors.

When the :pre-build directive is used, Emacs is stuck there, and doesn't response to any keystroke.

If there are not, I would manually try invoking the pre-build steps via the command line in the repository to see if they work in your regular shell environment.

Yes. It works smoothly.

progfolio commented 3 years ago

In that case I would try adding

(setq debug-on-quit t)

Prior to the straight-use-package call for auctex. Then, when Emacs hangs you can try hitting C-g until the process is interrupted. It may take several times, but you should be dumped into the backtrace buffer once the process is interrupted. Copy that backtrace here.

If that does not work you can try sending the SIGUSR2 signal to Emacs from the command line as described here:

http://irreal.org/blog/?p=5218

progfolio commented 3 years ago

I was able to successfully install with this recipe:

(straight-bug-report
  :interactive t
  :user-dir "auctex.straight"
  :post-bootstrap
  (setq debug-on-quit t)
  (straight-use-package
   '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
            :pre-build (("autoconf")
                        ("autoupdate")
                        ("./autogen.sh")
                        ("./configure" "--without-texmf-dir" "--with-lispdir=.")
                        ("make")))))

Though I did have to install the required tex system packages.

hongyi-zhao commented 3 years ago
(straight-bug-report
  :interactive t
  :user-dir "auctex.straight"
  :post-bootstrap
  (setq debug-on-quit t)
  (straight-use-package
   '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
            :pre-build (("autoconf")
                        ("autoupdate")
                        ("./autogen.sh")
                        ("./configure" "--without-texmf-dir" "--with-lispdir=.")
                        ("make")))))

I tried with your above code snippet, but meet the following warning and get stopped there:

Warning (initialization): An error occurred while loading ‘/home/werner/.emacs.d/init.el’:

: Lexical binding required for straight-bug-report

image

Then I tried the following code:

  (setq debug-on-quit t)
  (straight-use-package
   '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
            :pre-build (("autoconf")
                        ("autoupdate")
                        ("./autogen.sh")
                        ("./configure" "--without-texmf-dir" "--with-lispdir=.")
                        ("make"))))

Then, when Emacs hangs you can try hitting C-g until the process is interrupted. It may take several times, but you should be dumped into the backtrace buffer once the process is interrupted. Copy that backtrace here.

See the following:

Debugger entered--Lisp error: (quit)
  call-process("/home/werner/.emacs.d/straight/repos/auctex/config..." nil (#<buffer  *temp*> "/tmp/straight-stderr-30020") nil "--without-texmf-dir" "--with-lispdir=.")
  apply(call-process "/home/werner/.emacs.d/straight/repos/auctex/config..." nil (#<buffer  *temp*> "/tmp/straight-stderr-30020") nil ("--without-texmf-dir" "--with-lispdir=."))
  straight--process-call("./configure" "--without-texmf-dir" "--with-lispdir=.")
  apply(straight--process-call "./configure" ("--without-texmf-dir" "--with-lispdir=."))
  straight--process-run("./configure" "--without-texmf-dir" "--with-lispdir=.")
  apply(straight--process-run "./configure" ("--without-texmf-dir" "--with-lispdir=."))
  straight--process-run-p("./configure" "--without-texmf-dir" "--with-lispdir=.")
  apply(straight--process-run-p ("./configure" "--without-texmf-dir" "--with-lispdir=."))
  straight--run-build-commands((:type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git" :pre-build (("autoconf") ("autoupdate") ("./autogen.sh") ("./configure" "--without-texmf-dir" "--with-lispdir=.") ("make")) :files ("*" (:exclude ".git")) :package "auctex" :local-repo "auctex"))
  straight--build-package((:type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git" :pre-build (("autoconf") ("autoupdate") ("./autogen.sh") ("./configure" "--without-texmf-dir" "--with-lispdir=.") ("make")) :files ("*" (:exclude ".git")) :package "auctex" :local-repo "auctex") nil)
  #f(compiled-function () #<bytecode -0x17fc52cb6bf6aedb>)()
  straight--transaction-exec(use-package-\(:type\ git\ :host\ nil\ :repo\ \"https://git\.savannah\.gnu\.org/git/auctex\.git\"\ :pre-build\ \(\(\"autoconf\"\)\ \(\"autoupdate\"\)\ \(\"\./autogen\.sh\"\)\ \(\"\./configure\"\ \"--without-texmf-dir\"\ \"--with-lispdir=\.\"\)\ \(\"make\"\)\)\ :files\ \(\"*\"\ \(:exclude\ \"\.git\"\)\)\ :package\ \"auctex\"\ :local-repo\ \"auctex\"\)-nil-nil :now #f(compiled-function () #<bytecode -0x17fc52cb6bf6aedb>))
  straight-use-package((auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git" :pre-build (("autoconf") ("autoupdate") ("./autogen.sh") ("./configure" "--without-texmf-dir" "--with-lispdir=.") ("make")) :files ("*" (:exclude ".git"))))
  eval-buffer(#<buffer  *load*> nil "/home/werner/.emacs.d/init.el" nil t)  ; Reading at buffer position 15367
  load-with-code-conversion("/home/werner/.emacs.d/init.el" "/home/werner/.emacs.d/init.el" t t)
  load("/home/werner/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0xe873284c9c18f52>) #f(compiled-function () #<bytecode -0x1f3c686ddc0ddd35>) t)
  command-line()
  normal-top-level()
progfolio commented 3 years ago

Is there any output in the *straight-process-buffer* after exiting that backtrace?

progfolio commented 3 years ago

The straight-bug-report form should be evaluated in the *scratch* buffer of an existing Emacs session, not added to your init file.

hongyi-zhao commented 3 years ago

Is there any output in the straight-process-buffer after exiting that backtrace?

How to exit that backtrace? I see the followng in *straight-process* buffer?

[Return code: 0]

$ cd /home/werner/.emacs.d/straight/repos/auctex/
$ autoconf

[Return code: 0]

$ cd /home/werner/.emacs.d/straight/repos/auctex/
$ autoupdate

[Return code: 0]

$ cd /home/werner/.emacs.d/straight/repos/auctex/
$ ./autogen.sh

echo @set VERSION 2021-08-13 >version.texi
echo @set UPDATED 2021-08-13 >>version.texi
makeinfo preview-latex.texi
makeinfo auctex.texi

[Return code: 0]
progfolio commented 3 years ago

It looks as if the snag is occurring during the configure pre-build step. What output do you get in a shell if you manually run the :pre-build steps in the auctex repo?

hongyi-zhao commented 3 years ago

The straight-bug-report form should be evaluated in the scratch buffer of an existing Emacs session, not added to your init file.

C-x C-e will trigger a new Emacs window, and finally C-g captured the same backtrace info:

image

hongyi-zhao commented 3 years ago

It looks as if the snag is occurring during the configure pre-build step. What output do you get in a shell if you manually run the :pre-build steps in the auctex repo?

werner@X10DAi-00:~/.emacs.d/straight/repos/auctex$ autoconf 
werner@X10DAi-00:~/.emacs.d/straight/repos/auctex$ autoupdate 
werner@X10DAi-00:~/.emacs.d/straight/repos/auctex$ ./autogen.sh 
makeinfo -D rawfile --no-headers intro.texi --output ../README
makeinfo -D rawfile --no-headers preview-readme.texi --output - >> ../README
makeinfo -D rawfile --no-headers install.texi --output ../INSTALL
makeinfo -D rawfile --no-headers todo.texi --output ../TODO
makeinfo -D rawfile --no-headers preview-todo.texi --output - >> ../TODO
makeinfo -D rawfile --no-headers wininstall.texi --output ../INSTALL.windows
wininstall.texi:50: warning: entry for index `cp' outside of any node
wininstall.texi:51: warning: entry for index `cp' outside of any node
wininstall.texi:306: warning: entry for index `cp' outside of any node
makeinfo -D rawfile --no-headers faq.texi --output ../FAQ
makeinfo -D rawfile --no-headers --number-sections preview-faq.texi --output - >> ../FAQ
makeinfo -D rawfile --no-headers changes.texi --output ../CHANGES
changes.texi:999: warning: entry for index `cp' outside of any node
changes.texi:1000: warning: entry for index `cp' outside of any node
makeinfo -D rawfile --no-headers --number-sections preview-problems.texi --output ../PROBLEMS.preview
perl preview-dtxdoc.pl ../latex/preview.dtx \
    preview-dtxdoc.texi
echo @set VERSION 2021-08-13 >version.texi
echo @set UPDATED 2021-08-13 >>version.texi
makeinfo preview-latex.texi
makeinfo auctex.texi
pdftex tex-ref.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdftex)
 restricted \write18 enabled.
entering extended mode
(./tex-ref.tex [3 columns per page]
Underfull \vbox (badness 10000) detected at line 401

Underfull \vbox (badness 10000) detected at line 442
[1{/opt/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2] )
(see the transcript file for additional information)</opt/texlive/2021/texmf-di
st/fonts/type1/public/amsfonts/cm/cmbx10.pfb></opt/texlive/2021/texmf-dist/font
s/type1/public/amsfonts/cm/cmbx8.pfb></opt/texlive/2021/texmf-dist/fonts/type1/
public/amsfonts/cmextra/cmcsc8.pfb></opt/texlive/2021/texmf-dist/fonts/type1/pu
blic/amsfonts/cm/cmmi10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/am
sfonts/cm/cmr6.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm
/cmr7.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb
></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmsl8.pfb></opt/t
exlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy6.pfb></opt/texlive/2
021/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy8.pfb></opt/texlive/2021/texm
f-dist/fonts/type1/public/amsfonts/cm/cmti8.pfb></opt/texlive/2021/texmf-dist/f
onts/type1/public/amsfonts/cm/cmtt8.pfb>
Output written on tex-ref.pdf (2 pages, 153426 bytes).
Transcript written on tex-ref.log.
werner@X10DAi-00:~/.emacs.d/straight/repos/auctex$ ./configure --without-texmf-dir --with-lispdir=.
checking for make... make
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for date with git... 2021-08-13
checking for release with git... not found, using 2021-08-13 instead
checking for date with git... 2021-08-13
checking for release with git... not found, using 2021-08-13 instead
checking for emacs... /home/werner/.local/bin/emacs
checking for Emacs prefix... "/home/werner/.local"
checking if Emacs is recent enough... yes
checking if build directory is valid... yes
checking where lisp files go... .
checking what file to use for auctex startup... ./auctex.el
checking what file to use for preview startup... ./preview-latex.el
checking where the package lisp files go... ./auctex
checking where the data files go... ./auctex
checking where the info files go... ${datarootdir}/info
checking where automatically generated global style hooks go... ${localstatedir}/auctex
checking for tex... /opt/texlive/2021/bin/x86_64-linux/tex
checking for pdftex... /opt/texlive/2021/bin/x86_64-linux/pdftex
checking for dvips... /opt/texlive/2021/bin/x86_64-linux/dvips
checking for gs... gs
checking for latex... /opt/texlive/2021/bin/x86_64-linux/latex
checking for pdflatex... /opt/texlive/2021/bin/x86_64-linux/pdflatex
checking for tex... (cached) /opt/texlive/2021/bin/x86_64-linux/tex
Preview will be placed in ./auctex/latex
Preview docs will be placed in ./auctex/doc
checking for glaring installation conflicts... probably none
checking for perl... /usr/bin/perl
checking for makeinfo... /usr/bin/makeinfo
checking for texi2html... :
checking for texi2dvi... /usr/bin/texi2dvi
checking for texi2pdf... /usr/bin/texi2pdf
checking for install-info... /usr/bin/install-info
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tex-site.el.out
config.status: creating doc/Makefile
config.status: creating auctex.el
config.status: creating preview.el
config.status: creating latex/Makefile

Congratulations!  Configuration of AUCTeX is complete.

Type "make" at the prompt to build.
werner@X10DAi-00:~/.emacs.d/straight/repos/auctex$ make
(cd latex ; make all)
make[1]: Entering directory '/home/werner/.emacs.d/straight/repos/auctex/latex'
/opt/texlive/2021/bin/x86_64-linux/tex '\nonstopmode \input bootstrap.ins'
This is TeX, Version 3.141592653 (TeX Live 2021) (preloaded format=tex)

(./bootstrap.ins (/opt/texlive/2021/texmf-dist/tex/latex/base/docstrip.tex
Utility: `docstrip' v2.6a <2020-07-07>
English documentation    <2020-07-11>

**********************************************************
* This program converts documented macro-files into fast *
* loadable files by stripping off (nearly) all comments! *
**********************************************************

********************************************************
* No Configuration file found, using default settings. *
********************************************************

)

Generating file(s) preview-mk.ins 

Processing file preview.dtx (installer,make) -> preview-mk.ins
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % <*style <*!active . . . . . . . . . . . . % % % % % % % % % % % % .
> % % % % % % % <*active . . > % % % % % % % % % % % % % % % % % % % % % % % %
% % % <*!active . . . . . . % % % % . . . % % % % . . . . . . % % % % % % % %
% % % % % . . . . . % % % % % % % % . . . % % % % % % % % % % % % % % . . . .
. . . % % % % % % . . . . . . . . . . % % % . . % % % . . > % % % % % %
<*active % % % % % % . . % % % % % % . . . % % % % % % % % % % % % % % . . % %
% % % % % % . . % % % . . % % % % % % % % % % % % % % . . . . . . . . . . . .
. . . . . % % % % % % % % % % % % % % % . . . . . . . . . . . . . . . . . . .
. . . . . . . % % % % % % % % % % % % % % % % % % % % % % % % % % . . . . . .
. . . . . . . . . . . . . % % % % % % % % % % . . . . % % % % % % % % % % % %
% % % % % % % % % % % % % % . . . . . . . % % % % % % % % % . . . . % % % % %
% % % % % . . . . . . % % % % % % % % . % % % % % % . . . % % % % % % % % . .
. . . . . % % % % % % % . . % % % % % . . . . . % % % % % % % % . . . . . % %
% % % % % % . . . . . . . > % % % % % % % % % % % % <*!active . . . . . . . .
. . . . . . . . . . . . . % % % % % % % % % % % % % % % % . . . . . . . . . .
. . . . . . . . . > % % % % % <*active . > % % % % % <*!active . . . % % % % %
% % . . . . . . . . . . . . . . . . . . . . . . . . . % % % % . . . . % % % %
% % % % . . % % % % % % % . % % % % % % % . . . . . . . . . . % % % % % % % %
% % % % . . . . . . . % % % % % % % . % % % % . . . . . . . . % % % % % % % .
% % % % . . . . . % % % % % % % % % . . . . . . . . . . . . . . . . % % % % %
% . . . . . > % % % % % % % % % % <*active . . . . . . . . . . . . > % % % % %
% % % % % % % % % % % % % % % % % % <*!active . . % % % % % % % % % . . % % %
% % % . . > % % % % <*active . . . . . . . % % % % % % % % % . . . . . . . % %
% % % % . . . . . . . . . . . . . . . . . % % % % % . > > % % % % % % % % % %
% % % % % % % % % % % <auctex . > <auctex . > <auctex . > % % % % % % % %
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > % % % % % % % % % % % % % % % % % % % <auctex . >
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > <auctex . > % % % <auctex . > % % % % <auccfg . >
<auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . >
<auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . >
<auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . >
<auccfg . > <auccfg . > % % % % % % <lyx . > <lyx . > <lyx . > <lyx . >
<lyx . > % % % % % % % % % % <counters . > <counters . > <counters . >
<counters . > <counters . > <counters . > <counters . > <counters . >
<counters . > <counters . > <counters . > % % % % % % % % % % % % % % % % %
<showbox . > <showbox . > <showbox . > <showbox . > <showbox . > % % % % % % %
% <tracingall . > <tracingall . > <tracingall . > % % % % % % % % % % % % % %
% % % % % % % % % % % % % <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . > % %
% % % <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > % % % % % % % % % % % % <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > % % % % <tightpage . > <tightpage . > % % % % % <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > % % % % % <tightpage . > <tightpage . > <tightpage . >
<tightpage . > % % % % % % <tightpage . > % % % % % % % <tightpage . >
<tightpage . > <tightpage . > % % % % <tightpage . > % % % % % %
<tightpage . > <tightpage . > <tightpage . > % % % % <tightpage . >
<tightpage . > % % % % % % % % % % % % % % % % % % % % <showlabels . >
<showlabels . > % % % % % % % % % <showlabels . > % % % % <showlabels . >
<showlabels . > <showlabels . > % % % % % % % % % % % % % % % % % %
<showlabels . > <showlabels . > <showlabels . > % % % <showlabels . >
<showlabels . > <showlabels . > % % % <showlabels . > <showlabels . >
<showlabels . > <showlabels . > <showlabels . > % % % % % % % <showlabels . >
<showlabels . > % % % % % % % <showlabels . > <showlabels . > <showlabels . >
<showlabels . > <showlabels . > % % % % <showlabels . > % % % % %
<showlabels . > <showlabels . > <showlabels . > % % % % <showlabels . >
<showlabels . > <showlabels . > <showlabels . > % % % % % <showlabels . >
<showlabels . > <showlabels . > <showlabels . > <showlabels . >
<showlabels . > <showlabels . > <showlabels . > % % % % % % <footnotes . > % %
% % % % % % % % <installer . > <installer&make . > <installer . >
<installer . > <installer&!make . > <installer . > <installer . >
<installer . > <installer . > <installer . > <installer . > <installer . >
<installer . > <installer . > <installer . > <installer . > <installer . >
<installer . > % % % <driver . > <driver . > <driver . > <driver . >
<driver . > <driver . > <driver . > % % % % % % % %
Lines  processed: 1877
Comments removed: 1227
Comments  passed: 2
Codelines passed: 362

 )
No pages of output.
Transcript written on bootstrap.log.
/opt/texlive/2021/bin/x86_64-linux/tex '\nonstopmode \input preview-mk.ins'
This is TeX, Version 3.141592653 (TeX Live 2021) (preloaded format=tex)

(./preview-mk.ins (/opt/texlive/2021/texmf-dist/tex/latex/base/docstrip.tex
Utility: `docstrip' v2.6a <2020-07-07>
English documentation    <2020-07-11>

**********************************************************
* This program converts documented macro-files into fast *
* loadable files by stripping off (nearly) all comments! *
**********************************************************

********************************************************
* No Configuration file found, using default settings. *
********************************************************

)

Generating file(s) preview.drv preview.sty prauctex.def prauctex.cfg prshowbox.
def prshowlabels.def prtracingall.def prtightpage.def prlyx.def prcounters.def 
prfootnotes.def 

Processing file preview.dtx (driver) -> preview.drv
                            (style) -> preview.sty
                            (auctex) -> prauctex.def
                            (auccfg) -> prauctex.cfg
                            (showbox) -> prshowbox.def
                            (showlabels) -> prshowlabels.def
                            (tracingall) -> prtracingall.def
                            (tightpage) -> prtightpage.def
                            (lyx) -> prlyx.def
                            (counters) -> prcounters.def
                            (footnotes) -> prfootnotes.def
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % <*style <*!active . . . . . . . . . . . . % % % % % % % % % % % % .
> % % % % % % % <*active . . > % % % % % % % % % % % % % % % % % % % % % % % %
% % % <*!active . . . . . . % % % % . . . % % % % . . . . . . % % % % % % % %
% % % % % . . . . . % % % % % % % % . . . % % % % % % % % % % % % % % . . . .
. . . % % % % % % . . . . . . . . . . % % % . . % % % . . > % % % % % %
<*active % % % % % % . . % % % % % % . . . % % % % % % % % % % % % % % . . % %
% % % % % % . . % % % . . % % % % % % % % % % % % % % . . . . . . . . . . . .
. . . . . % % % % % % % % % % % % % % % . . . . . . . . . . . . . . . . . . .
. . . . . . . % % % % % % % % % % % % % % % % % % % % % % % % % % . . . . . .
. . . . . . . . . . . . . % % % % % % % % % % . . . . % % % % % % % % % % % %
% % % % % % % % % % % % % % . . . . . . . % % % % % % % % % . . . . % % % % %
% % % % % . . . . . . % % % % % % % % . % % % % % % . . . % % % % % % % % . .
. . . . . % % % % % % % . . % % % % % . . . . . % % % % % % % % . . . . . % %
% % % % % % . . . . . . . > % % % % % % % % % % % % <*!active . . . . . . . .
. . . . . . . . . . . . . % % % % % % % % % % % % % % % % . . . . . . . . . .
. . . . . . . . . > % % % % % <*active . > % % % % % <*!active . . . % % % % %
% % . . . . . . . . . . . . . . . . . . . . . . . . . % % % % . . . . % % % %
% % % % . . % % % % % % % . % % % % % % % . . . . . . . . . . % % % % % % % %
% % % % . . . . . . . % % % % % % % . % % % % . . . . . . . . % % % % % % % .
% % % % . . . . . % % % % % % % % % . . . . . . . . . . . . . . . . % % % % %
% . . . . . > % % % % % % % % % % <*active . . . . . . . . . . . . > % % % % %
% % % % % % % % % % % % % % % % % % <*!active . . % % % % % % % % % . . % % %
% % % . . > % % % % <*active . . . . . . . % % % % % % % % % . . . . . . . % %
% % % % . . . . . . . . . . . . . . . . . % % % % % . > > % % % % % % % % % %
% % % % % % % % % % % <auctex . > <auctex . > <auctex . > % % % % % % % %
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > % % % % % % % % % % % % % % % % % % % <auctex . >
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > <auctex . > % % % <auctex . > % % % % <auccfg . >
<auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . >
<auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . >
<auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . >
<auccfg . > <auccfg . > % % % % % % <lyx . > <lyx . > <lyx . > <lyx . >
<lyx . > % % % % % % % % % % <counters . > <counters . > <counters . >
<counters . > <counters . > <counters . > <counters . > <counters . >
<counters . > <counters . > <counters . > % % % % % % % % % % % % % % % % %
<showbox . > <showbox . > <showbox . > <showbox . > <showbox . > % % % % % % %
% <tracingall . > <tracingall . > <tracingall . > % % % % % % % % % % % % % %
% % % % % % % % % % % % % <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . > % %
% % % <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > % % % % % % % % % % % % <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > % % % % <tightpage . > <tightpage . > % % % % % <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > % % % % % <tightpage . > <tightpage . > <tightpage . >
<tightpage . > % % % % % % <tightpage . > % % % % % % % <tightpage . >
<tightpage . > <tightpage . > % % % % <tightpage . > % % % % % %
<tightpage . > <tightpage . > <tightpage . > % % % % <tightpage . >
<tightpage . > % % % % % % % % % % % % % % % % % % % % <showlabels . >
<showlabels . > % % % % % % % % % <showlabels . > % % % % <showlabels . >
<showlabels . > <showlabels . > % % % % % % % % % % % % % % % % % %
<showlabels . > <showlabels . > <showlabels . > % % % <showlabels . >
<showlabels . > <showlabels . > % % % <showlabels . > <showlabels . >
<showlabels . > <showlabels . > <showlabels . > % % % % % % % <showlabels . >
<showlabels . > % % % % % % % <showlabels . > <showlabels . > <showlabels . >
<showlabels . > <showlabels . > % % % % <showlabels . > % % % % %
<showlabels . > <showlabels . > <showlabels . > % % % % <showlabels . >
<showlabels . > <showlabels . > <showlabels . > % % % % % <showlabels . >
<showlabels . > <showlabels . > <showlabels . > <showlabels . >
<showlabels . > <showlabels . > <showlabels . > % % % % % % <footnotes . > % %
% % % % % % % % <installer . > <installer&make . > <installer . >
<installer . > <installer&!make . > <installer . > <installer . >
<installer . > <installer . > <installer . > <installer . > <installer . >
<installer . > <installer . > <installer . > <installer . > <installer . >
<installer . > % % % <driver . > <driver . > <driver . > <driver . >
<driver . > <driver . > <driver . > % % % % % % % %
Lines  processed: 1877
Comments removed: 1227
Comments  passed: 2
Codelines passed: 362

Processing file preview.dtx (style,active) -> preview.sty
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % <*style <*!active . . . . . . . . . . . . % % % % % % % % % % % % .
> % % % % % % % <*active . . > % % % % % % % % % % % % % % % % % % % % % % % %
% % % <*!active . . . . . . % % % % . . . % % % % . . . . . . % % % % % % % %
% % % % % . . . . . % % % % % % % % . . . % % % % % % % % % % % % % % . . . .
. . . % % % % % % . . . . . . . . . . % % % . . % % % . . > % % % % % %
<*active % % % % % % . . % % % % % % . . . % % % % % % % % % % % % % % . . % %
% % % % % % . . % % % . . % % % % % % % % % % % % % % . . . . . . . . . . . .
. . . . . % % % % % % % % % % % % % % % . . . . . . . . . . . . . . . . . . .
. . . . . . . % % % % % % % % % % % % % % % % % % % % % % % % % % . . . . . .
. . . . . . . . . . . . . % % % % % % % % % % . . . . % % % % % % % % % % % %
% % % % % % % % % % % % % % . . . . . . . % % % % % % % % % . . . . % % % % %
% % % % % . . . . . . % % % % % % % % . % % % % % % . . . % % % % % % % % . .
. . . . . % % % % % % % . . % % % % % . . . . . % % % % % % % % . . . . . % %
% % % % % % . . . . . . . > % % % % % % % % % % % % <*!active . . . . . . . .
. . . . . . . . . . . . . % % % % % % % % % % % % % % % % . . . . . . . . . .
. . . . . . . . . > % % % % % <*active . > % % % % % <*!active . . . % % % % %
% % . . . . . . . . . . . . . . . . . . . . . . . . . % % % % . . . . % % % %
% % % % . . % % % % % % % . % % % % % % % . . . . . . . . . . % % % % % % % %
% % % % . . . . . . . % % % % % % % . % % % % . . . . . . . . % % % % % % % .
% % % % . . . . . % % % % % % % % % . . . . . . . . . . . . . . . . % % % % %
% . . . . . > % % % % % % % % % % <*active . . . . . . . . . . . . > % % % % %
% % % % % % % % % % % % % % % % % % <*!active . . % % % % % % % % % . . % % %
% % % . . > % % % % <*active . . . . . . . % % % % % % % % % . . . . . . . % %
% % % % . . . . . . . . . . . . . . . . . % % % % % . > > % % % % % % % % % %
% % % % % % % % % % % <auctex . > <auctex . > <auctex . > % % % % % % % %
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > % % % % % % % % % % % % % % % % % % % <auctex . >
<auctex . > <auctex . > <auctex . > <auctex . > <auctex . > <auctex . >
<auctex . > <auctex . > <auctex . > % % % <auctex . > % % % % <auccfg . >
<auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . >
<auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . >
<auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . > <auccfg . >
<auccfg . > <auccfg . > % % % % % % <lyx . > <lyx . > <lyx . > <lyx . >
<lyx . > % % % % % % % % % % <counters . > <counters . > <counters . >
<counters . > <counters . > <counters . > <counters . > <counters . >
<counters . > <counters . > <counters . > % % % % % % % % % % % % % % % % %
<showbox . > <showbox . > <showbox . > <showbox . > <showbox . > % % % % % % %
% <tracingall . > <tracingall . > <tracingall . > % % % % % % % % % % % % % %
% % % % % % % % % % % % % <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . > % %
% % % <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > % % % % % % % % % % % % <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > % % % % <tightpage . > <tightpage . > % % % % % <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > <tightpage . > <tightpage . > <tightpage . > <tightpage . >
<tightpage . > % % % % % <tightpage . > <tightpage . > <tightpage . >
<tightpage . > % % % % % % <tightpage . > % % % % % % % <tightpage . >
<tightpage . > <tightpage . > % % % % <tightpage . > % % % % % %
<tightpage . > <tightpage . > <tightpage . > % % % % <tightpage . >
<tightpage . > % % % % % % % % % % % % % % % % % % % % <showlabels . >
<showlabels . > % % % % % % % % % <showlabels . > % % % % <showlabels . >
<showlabels . > <showlabels . > % % % % % % % % % % % % % % % % % %
<showlabels . > <showlabels . > <showlabels . > % % % <showlabels . >
<showlabels . > <showlabels . > % % % <showlabels . > <showlabels . >
<showlabels . > <showlabels . > <showlabels . > % % % % % % % <showlabels . >
<showlabels . > % % % % % % % <showlabels . > <showlabels . > <showlabels . >
<showlabels . > <showlabels . > % % % % <showlabels . > % % % % %
<showlabels . > <showlabels . > <showlabels . > % % % % <showlabels . >
<showlabels . > <showlabels . > <showlabels . > % % % % % <showlabels . >
<showlabels . > <showlabels . > <showlabels . > <showlabels . >
<showlabels . > <showlabels . > <showlabels . > % % % % % % <footnotes . > % %
% % % % % % % % <installer . > <installer&make . > <installer . >
<installer . > <installer&!make . > <installer . > <installer . >
<installer . > <installer . > <installer . > <installer . > <installer . >
<installer . > <installer . > <installer . > <installer . > <installer . >
<installer . > % % % <driver . > <driver . > <driver . > <driver . >
<driver . > <driver . > <driver . > % % % % % % % %
Lines  processed: 1877
Comments removed: 1227
Comments  passed: 2
Codelines passed: 362

Overall statistics:
Files  processed: 2
Lines  processed: 3754
Comments removed: 2454
Comments  passed: 4
Codelines passed: 724
 )
No pages of output.
Transcript written on preview-mk.log.
/opt/texlive/2021/bin/x86_64-linux/pdflatex '\nonstopmode \input{preview.drv}'
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-05-07>
(./preview.drv (/opt/texlive/2021/texmf-dist/tex/latex/base/ltxdoc.cls
Document Class: ltxdoc 2020/10/04 v2.1b Standard LaTeX documentation class
(/opt/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/opt/texlive/2021/texmf-dist/tex/latex/base/size10.clo))
(/opt/texlive/2021/texmf-dist/tex/latex/base/doc.sty
(/opt/texlive/2021/texmf-dist/tex/latex/tools/multicol.sty))) (./preview.sty
(/opt/texlive/2021/texmf-dist/tex/generic/luatex85/luatex85.sty))
(/opt/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
No file preview.aux.
(./preview.dtx
Overfull \hbox (2.944pt too wide) in paragraph at lines 42--51
\OT1/cmr/m/n/10 good al-ter-na-tive: Peo-ple make do by fid-dling around with [
]\OT1/cmtt/m/n/10 \thispagestyle{empty}
[1{/opt/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2]
Overfull \hbox (6.0296pt too wide) in paragraph at lines 152--154
[][]\OT1/cmtt/m/n/10 latex '\RequirePackage[active,delayed,$\OMS/cmsy/m/n/10 h$
[]\OT1/cmr/m/it/10 options$\OMS/cmsy/m/n/10 i$[][]\OT1/cmtt/m/n/10 ]{preview}
[3] [4] [5] [6] [7]

LaTeX Warning: Marginpar on page 8 moved.

[8]
Overfull \hbox (0.58882pt too wide) in paragraph at lines 527--527
 [][]  \OT1/cmtt/m/sl/9 \long\def\pr@advise@ship#1#2#3{\pr@advise#1{\pr@protect
@ship{#2}{#3}}}% 
[9] [10] [11] [12] [13] [14] [15] [16] [17]
Overfull \hbox (0.58882pt too wide) in paragraph at lines 1095--1095
 [][]    \OT1/cmtt/m/sl/9 \noexpand\pr@advise@ship{##2}{\the\toks@{##1\noexpand
\pr@endbox}}{}}% 
[18] [19]

LaTeX Warning: Reference `sec:prshipend' on page 20 undefined on input line 123
3.

[20]
Overfull \hbox (5.31378pt too wide) in paragraph at lines 1309--1309
 [][]      \OT1/cmtt/m/sl/9 % FIXME: The message should not be emitted if XeTeX
 does not produce 
[21] [22] [23] [24] [25] [26] [27] [28] [29] [30]
*******************
* Checksum passed *
*******************
) [31] (./preview.aux)

LaTeX Warning: There were undefined references.

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

 )
(see the transcript file for additional information)</opt/texlive/2021/texmf-di
st/fonts/type1/public/amsfonts/cm/cmbx10.pfb></opt/texlive/2021/texmf-dist/font
s/type1/public/amsfonts/cm/cmbx12.pfb></opt/texlive/2021/texmf-dist/fonts/type1
/public/amsfonts/cm/cmbxti10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/publ
ic/amsfonts/cm/cmex10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsf
onts/cm/cmitt10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/c
m/cmmi10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9
.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></o
pt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></opt/texli
ve/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb></opt/texlive/2021/
texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb></opt/texlive/2021/texmf-dis
t/fonts/type1/public/amsfonts/cm/cmr9.pfb></opt/texlive/2021/texmf-dist/fonts/t
ype1/public/amsfonts/cm/cmsltt10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/
public/amsfonts/cm/cmss9.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/a
msfonts/cm/cmsy10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts
/cm/cmsy6.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy
8.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy9.pfb></
opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/tex
live/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></opt/texlive/20
21/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt12.pfb></opt/texlive/2021/texm
f-dist/fonts/type1/public/amsfonts/cm/cmtt8.pfb></opt/texlive/2021/texmf-dist/f
onts/type1/public/amsfonts/cm/cmtt9.pfb>
Output written on preview.pdf (31 pages, 312821 bytes).
Transcript written on preview.log.
/opt/texlive/2021/bin/x86_64-linux/pdflatex '\nonstopmode \input{preview.drv}'
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-05-07>
(./preview.drv (/opt/texlive/2021/texmf-dist/tex/latex/base/ltxdoc.cls
Document Class: ltxdoc 2020/10/04 v2.1b Standard LaTeX documentation class
(/opt/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/opt/texlive/2021/texmf-dist/tex/latex/base/size10.clo))
(/opt/texlive/2021/texmf-dist/tex/latex/base/doc.sty
(/opt/texlive/2021/texmf-dist/tex/latex/tools/multicol.sty))) (./preview.sty
(/opt/texlive/2021/texmf-dist/tex/generic/luatex85/luatex85.sty))
(/opt/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
(./preview.aux) (./preview.dtx
Overfull \hbox (2.944pt too wide) in paragraph at lines 42--51
\OT1/cmr/m/n/10 good al-ter-na-tive: Peo-ple make do by fid-dling around with [
]\OT1/cmtt/m/n/10 \thispagestyle{empty}
[1{/opt/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2]
Overfull \hbox (6.0296pt too wide) in paragraph at lines 152--154
[][]\OT1/cmtt/m/n/10 latex '\RequirePackage[active,delayed,$\OMS/cmsy/m/n/10 h$
[]\OT1/cmr/m/it/10 options$\OMS/cmsy/m/n/10 i$[][]\OT1/cmtt/m/n/10 ]{preview}
[3] [4] [5] [6] [7]

LaTeX Warning: Marginpar on page 8 moved.

[8]
Overfull \hbox (0.58882pt too wide) in paragraph at lines 527--527
 [][]  \OT1/cmtt/m/sl/9 \long\def\pr@advise@ship#1#2#3{\pr@advise#1{\pr@protect
@ship{#2}{#3}}}% 
[9] [10] [11] [12] [13] [14] [15] [16] [17]
Overfull \hbox (0.58882pt too wide) in paragraph at lines 1095--1095
 [][]    \OT1/cmtt/m/sl/9 \noexpand\pr@advise@ship{##2}{\the\toks@{##1\noexpand
\pr@endbox}}{}}% 
[18] [19] [20]
Overfull \hbox (5.31378pt too wide) in paragraph at lines 1309--1309
 [][]      \OT1/cmtt/m/sl/9 % FIXME: The message should not be emitted if XeTeX
 does not produce 
[21] [22] [23] [24] [25] [26] [27] [28] [29] [30]
*******************
* Checksum passed *
*******************
) [31] (./preview.aux) )
(see the transcript file for additional information)</opt/texlive/2021/texmf-di
st/fonts/type1/public/amsfonts/cm/cmbx10.pfb></opt/texlive/2021/texmf-dist/font
s/type1/public/amsfonts/cm/cmbx12.pfb></opt/texlive/2021/texmf-dist/fonts/type1
/public/amsfonts/cm/cmbxti10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/publ
ic/amsfonts/cm/cmex10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsf
onts/cm/cmitt10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/c
m/cmmi10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9
.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></o
pt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></opt/texli
ve/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb></opt/texlive/2021/
texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb></opt/texlive/2021/texmf-dis
t/fonts/type1/public/amsfonts/cm/cmr9.pfb></opt/texlive/2021/texmf-dist/fonts/t
ype1/public/amsfonts/cm/cmsltt10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/
public/amsfonts/cm/cmss9.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/a
msfonts/cm/cmsy10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts
/cm/cmsy6.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy
8.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy9.pfb></
opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/tex
live/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></opt/texlive/20
21/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt12.pfb></opt/texlive/2021/texm
f-dist/fonts/type1/public/amsfonts/cm/cmtt8.pfb></opt/texlive/2021/texmf-dist/f
onts/type1/public/amsfonts/cm/cmtt9.pfb>
Output written on preview.pdf (31 pages, 312510 bytes).
Transcript written on preview.log.
/opt/texlive/2021/bin/x86_64-linux/pdflatex '\nonstopmode \input{preview.drv}'
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-05-07>
(./preview.drv (/opt/texlive/2021/texmf-dist/tex/latex/base/ltxdoc.cls
Document Class: ltxdoc 2020/10/04 v2.1b Standard LaTeX documentation class
(/opt/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/opt/texlive/2021/texmf-dist/tex/latex/base/size10.clo))
(/opt/texlive/2021/texmf-dist/tex/latex/base/doc.sty
(/opt/texlive/2021/texmf-dist/tex/latex/tools/multicol.sty))) (./preview.sty
(/opt/texlive/2021/texmf-dist/tex/generic/luatex85/luatex85.sty))
(/opt/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
(./preview.aux) (./preview.dtx
Overfull \hbox (2.944pt too wide) in paragraph at lines 42--51
\OT1/cmr/m/n/10 good al-ter-na-tive: Peo-ple make do by fid-dling around with [
]\OT1/cmtt/m/n/10 \thispagestyle{empty}
[1{/opt/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2]
Overfull \hbox (6.0296pt too wide) in paragraph at lines 152--154
[][]\OT1/cmtt/m/n/10 latex '\RequirePackage[active,delayed,$\OMS/cmsy/m/n/10 h$
[]\OT1/cmr/m/it/10 options$\OMS/cmsy/m/n/10 i$[][]\OT1/cmtt/m/n/10 ]{preview}
[3] [4] [5] [6] [7]

LaTeX Warning: Marginpar on page 8 moved.

[8]
Overfull \hbox (0.58882pt too wide) in paragraph at lines 527--527
 [][]  \OT1/cmtt/m/sl/9 \long\def\pr@advise@ship#1#2#3{\pr@advise#1{\pr@protect
@ship{#2}{#3}}}% 
[9] [10] [11] [12] [13] [14] [15] [16] [17]
Overfull \hbox (0.58882pt too wide) in paragraph at lines 1095--1095
 [][]    \OT1/cmtt/m/sl/9 \noexpand\pr@advise@ship{##2}{\the\toks@{##1\noexpand
\pr@endbox}}{}}% 
[18] [19] [20]
Overfull \hbox (5.31378pt too wide) in paragraph at lines 1309--1309
 [][]      \OT1/cmtt/m/sl/9 % FIXME: The message should not be emitted if XeTeX
 does not produce 
[21] [22] [23] [24] [25] [26] [27] [28] [29] [30]
*******************
* Checksum passed *
*******************
) [31] (./preview.aux) )
(see the transcript file for additional information)</opt/texlive/2021/texmf-di
st/fonts/type1/public/amsfonts/cm/cmbx10.pfb></opt/texlive/2021/texmf-dist/font
s/type1/public/amsfonts/cm/cmbx12.pfb></opt/texlive/2021/texmf-dist/fonts/type1
/public/amsfonts/cm/cmbxti10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/publ
ic/amsfonts/cm/cmex10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsf
onts/cm/cmitt10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/c
m/cmmi10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9
.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></o
pt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></opt/texli
ve/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb></opt/texlive/2021/
texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb></opt/texlive/2021/texmf-dis
t/fonts/type1/public/amsfonts/cm/cmr9.pfb></opt/texlive/2021/texmf-dist/fonts/t
ype1/public/amsfonts/cm/cmsltt10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/
public/amsfonts/cm/cmss9.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/a
msfonts/cm/cmsy10.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts
/cm/cmsy6.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy
8.pfb></opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy9.pfb></
opt/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/tex
live/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></opt/texlive/20
21/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt12.pfb></opt/texlive/2021/texm
f-dist/fonts/type1/public/amsfonts/cm/cmtt8.pfb></opt/texlive/2021/texmf-dist/f
onts/type1/public/amsfonts/cm/cmtt9.pfb>
Output written on preview.pdf (31 pages, 312510 bytes).
Transcript written on preview.log.
make[1]: Leaving directory '/home/werner/.emacs.d/straight/repos/auctex/latex'
rm -f auto-loads.el
/home/werner/.local/bin/emacs -batch -q -no-site-file -no-init-file -l lpath.el --eval '(let ((autoload-file (expand-file-name "auto-loads.el"))) (mapcar (lambda (file) (update-file-autoloads file nil autoload-file)) command-line-args-left) (save-buffers-kill-emacs t))' tex.el tex-buf.el tex-style.el plain-tex.el latex.el tex-info.el texmathp.el multi-prompt.el tex-mik.el font-latex.el tex-font.el context.el context-en.el context-nl.el tex-fold.el tex-jp.el toolbar-x.el tex-bar.el bib-cite.el tex-ispell.el latex-flymake.el

test -r auto-loads.el || { \
  echo ";; Auto-generated part of tex-site.el" > auto-loads.el ; \
  echo "
        " >> auto-loads.el ; \
  /home/werner/.local/bin/emacs -batch -q -no-site-file -no-init-file -l lpath.el --eval '(let ((autoload-file (expand-file-name "auto-loads.el"))) (mapcar (lambda (file) (update-file-autoloads file nil autoload-file)) command-line-args-left) (save-buffers-kill-emacs t))' tex.el tex-buf.el tex-style.el plain-tex.el latex.el tex-info.el texmathp.el multi-prompt.el tex-mik.el font-latex.el tex-font.el context.el context-en.el context-nl.el tex-fold.el tex-jp.el toolbar-x.el tex-bar.el bib-cite.el tex-ispell.el latex-flymake.el ; \
}
cat tex-site.el.out >tex-site.el
cat auto-loads.el >>tex-site.el
echo "(provide 'tex-site)" >>tex-site.el ; \
echo ";;; tex-site.el ends here" >>tex-site.el
/home/werner/.local/bin/emacs -batch -q -no-site-file -no-init-file -l lpath.el -f batch-byte-compile tex.el tex-buf.el tex-style.el plain-tex.el latex.el tex-info.el texmathp.el multi-prompt.el tex-mik.el font-latex.el tex-font.el context.el context-en.el context-nl.el tex-fold.el tex-jp.el toolbar-x.el tex-bar.el bib-cite.el tex-ispell.el latex-flymake.el style/prosper.el style/slides.el    style/foils.el     style/amstex.el style/article.el   style/book.el      style/letter.el style/report.el    style/amsart.el    style/amsbook.el style/epsf.el      style/psfig.el style/dutch.el     style/german.el    style/dk.el style/j-article.el style/j-book.el    style/j-report.el style/jarticle.el  style/jbook.el     style/jreport.el style/tarticle.el  style/tbook.el     style/treport.el style/jsarticle.el style/jsbook.el    style/jsreport.el style/dinbrief.el  style/virtex.el    style/plfonts.el style/plhb.el      style/harvard.el     style/swedish.el style/danish.el    style/slovak.el    style/czech.el style/amsmath.el   style/amstext.el   style/amsbsy.el style/amsopn.el    style/amsthm.el  style/natbib.el style/index.el     style/makeidx.el   style/multind.el style/varioref.el  style/fancyref.el     style/mdwlist.el style/ngerman.el   style/graphicx.el   style/graphics.el style/verbatim.el  style/scrbase.el   style/scrartcl.el style/scrbook.el   style/scrreprt.el  style/scrlttr2.el style/scrpage2.el  style/captcont.el  style/subfigure.el style/paralist.el  style/booktabs.el  style/emp.el style/jura.el      style/alphanum.el  style/beamer.el style/alltt.el     style/italian.el   style/doc.el style/ltxdoc.el    style/ltx-base.el     style/units.el style/nicefrac.el  style/url.el       style/listings.el style/inputenc.el  style/frenchb.el   style/francais.el style/MinionPro.el style/pdfsync.el   style/polish.el style/polski.el    style/icelandic.el style/comment.el style/flashcards.el style/pstricks.el style/nomencl.el style/hyperref.el  style/bulgarian.el style/CJK.el style/ruby.el      style/CJKutf8.el   style/tabularx.el style/multido.el   style/pst-grad.el  style/pst-node.el style/pst-plot.el  style/pst-slpe.el  style/shortvrb.el style/austrian.el  style/naustrian.el style/french.el style/lettrine.el  style/multicol.el  style/xspace.el style/setspace.el  style/biblatex.el  style/siunitx.el style/bm.el        style/footmisc.el  style/ulem.el style/bigdelim.el  style/bigstrut.el  style/everysel.el style/mathtools.el style/ragged2e.el  style/amssymb.el style/lscape.el    style/epigraph.el  style/mflogo.el style/multirow.el  style/imakeidx.el  style/afterpage.el style/longtable.el style/lipsum.el    style/kantlipsum.el style/memoir.el    style/placeins.el  style/nameref.el style/fancynum.el  style/fancyhdr.el    style/filecontents.el style/array.el     style/kpfonts.el   style/acro.el style/acronym.el   style/xparse.el    style/fancyvrb.el style/tabulary.el  style/fontspec.el  style/unicode-math.el style/luacode.el   style/metalogo.el  style/english.el style/exercise.el  style/plext.el     style/cleveref.el style/eso-pic.el   style/fontaxes.el  style/AnonymousPro.el style/mdsymbol.el  style/MyriadPro.el style/textcomp.el style/XCharter.el  style/zlmtt.el     style/ifluatex.el style/luatextra.el style/erewhon.el   style/baskervaldx.el style/fbb.el       style/newtxmath.el style/newtxsf.el style/newtxtext.el style/newtxttt.el  style/minted.el style/wrapfig.el   style/relsize.el   style/currvita.el style/tcolorbox.el style/color.el  style/expl3.el style/bidibeamer.el style/enumitem.el style/caption.el style/geometry.el  style/ltablex.el   style/ltxtable.el style/mn2e.el      style/colortbl.el  style/attachfile.el style/newpxtext.el style/newpxmath.el style/pdfpages.el style/mnras.el     style/environ.el   style/polyglossia.el style/vwcol.el     style/textpos.el   style/transparent.el style/fontenc.el   style/Alegreya.el  style/gloss-italian.el style/newfloat.el  style/subcaption.el style/AlegreyaSans.el style/hologo.el    style/theorem.el   style/ntheorem.el style/splitidx.el  style/tikz.el      style/xcolor.el style/pdflscape.el style/commath.el   style/empheq.el style/framed.el    style/paracol.el   style/menukeys.el style/bidi.el      style/FiraMono.el  style/FiraSans.el style/bicaption.el style/amsfonts.el  style/subfiles.el style/dcolumn.el   style/mdframed.el  style/tcolorboxlib-raster.el style/titleps.el   style/titlesec.el  style/titletoc.el style/exam.el      style/breqn.el     style/sourcecodepro.el style/preview.el   style/fvextra.el   style/jurabib.el style/csquotes.el  style/babel.el     style/dk-bib.el style/floatrow.el  style/moodle.el    style/canadian.el style/arabxetex.el style/australian.el style/newzealand.el style/xltabular.el style/marginnote.el style/thmtools.el style/ocg-p.el     style/ocgx.el      style/thm-restate.el style/pythontex.el style/dashundergaps.el style/beamerarticle.el style/changelog.el style/ltugboat.el  style/beamerswitch.el style/multitoc.el  style/fbox.el      style/xkcdcolors.el style/ltxguide.el  style/revtex4-2.el style/overpic.el style/tex-live.el  style/algorithm.el style/algpseudocode.el style/appendix.el  style/scholax.el   style/extramarks.el style/truncate.el  style/changes.el   style/footnotehyper.el style/brazil.el    style/brazilian.el style/portuguese.el style/portuges.el preview.el

In TeX-parse-TeX:
tex-buf.el:2426:27: Warning: Unused lexical variable `default-major-mode'

In TeX-error-overview-goto-source:
tex-buf.el:3140:32: Warning: Unused lexical variable `default-major-mode'

In bib-find-next:
bib-cite.el:943:8: Warning: ‘find-tag’ is an obsolete function (as of 25.1);
    use ‘xref-find-definitions’ instead.

In toplevel form:
style/pstricks.el:119:1: Warning: Variable ‘compl’ left uninitialized
make preview-latex.el
make[1]: Entering directory '/home/werner/.emacs.d/straight/repos/auctex'
rm -f preview-latex.el
/home/werner/.local/bin/emacs -batch -no-site-file -no-init-file --eval '(let ((autoload-file (expand-file-name "preview-latex.el"))) (update-file-autoloads "preview.el" nil autoload-file) (save-buffers-kill-emacs t))' ; \
test -r preview-latex.el || { \
  echo ";; Auto-generated preview-latex.el" > preview-latex.el ; \
  echo "
        " >> preview-latex.el ; \
  /home/werner/.local/bin/emacs -batch -no-site-file -no-init-file --eval '(let ((autoload-file (expand-file-name "preview-latex.el"))) (update-file-autoloads "preview.el" nil autoload-file) (save-buffers-kill-emacs t))' ; \
}

make[1]: Leaving directory '/home/werner/.emacs.d/straight/repos/auctex'
cd doc ; make all
make[1]: Entering directory '/home/werner/.emacs.d/straight/repos/auctex/doc'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/werner/.emacs.d/straight/repos/auctex/doc'
werner@X10DAi-00:~/.emacs.d/straight/repos/auctex$ 
progfolio commented 3 years ago

What happens if you drop the args to the configure script in the recipe?

progfolio commented 3 years ago
(straight-use-package
 '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
          :pre-build (("./autogen.sh") ("./configure") ("make"))))
hongyi-zhao commented 3 years ago

With the following code:

(setq debug-on-quit t)
(straight-use-package
 '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
          :pre-build (("./autogen.sh") ("./configure") ("make"))))        

The backtrace info obtained by C-g:

Debugger entered--Lisp error: (quit)
  call-process("/home/werner/.emacs.d/straight/repos/auctex/config..." nil (#<buffer  *temp*> "/tmp/straight-stderr-58317") nil)
  apply(call-process "/home/werner/.emacs.d/straight/repos/auctex/config..." nil (#<buffer  *temp*> "/tmp/straight-stderr-58317") nil nil)
  straight--process-call("./configure")
  apply(straight--process-call "./configure" nil)
  straight--process-run("./configure")
  apply(straight--process-run "./configure" nil)
  straight--process-run-p("./configure")
  apply(straight--process-run-p "./configure")
  straight--run-build-commands((:type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git" :pre-build (("./autogen.sh") ("./configure") ("make")) :files ("*" (:exclude ".git")) :package "auctex" :local-repo "auctex"))
  straight--build-package((:type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git" :pre-build (("./autogen.sh") ("./configure") ("make")) :files ("*" (:exclude ".git")) :package "auctex" :local-repo "auctex") nil)
  #f(compiled-function () #<bytecode -0x105d1323d4eededb>)()
  straight--transaction-exec(use-package-\(:type\ git\ :host\ nil\ :repo\ \"https://git\.savannah\.gnu\.org/git/auctex\.git\"\ :pre-build\ \(\(\"\./autogen\.sh\"\)\ \(\"\./configure\"\)\ \(\"make\"\)\)\ :files\ \(\"*\"\ \(:exclude\ \"\.git\"\)\)\ :package\ \"auctex\"\ :local-repo\ \"auctex\"\)-nil-nil :now #f(compiled-function () #<bytecode -0x105d1323d4eededb>))
  straight-use-package((auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git" :pre-build (("./autogen.sh") ("./configure") ("make")) :files ("*" (:exclude ".git"))))
  eval-buffer(#<buffer  *load*> nil "/home/werner/.emacs.d/init.el" nil t)  ; Reading at buffer position 15248
  load-with-code-conversion("/home/werner/.emacs.d/init.el" "/home/werner/.emacs.d/init.el" t t)
  load("/home/werner/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0xdd436fc6282ff52>) #f(compiled-function () #<bytecode -0x1f3c686ddc0ddd35>) t)
  command-line()
  normal-top-level()
progfolio commented 3 years ago

How long are you letting the process run before quitting?

hongyi-zhao commented 3 years ago

Sufficient length of time. See the following:

$ time emacs

real    3m0.740s
user    0m3.991s
sys 0m0.327s
hongyi-zhao commented 3 years ago

I also tried with the following code, but meet the similar problem:

(setq debug-on-quit t)
(straight-use-package
   '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
            :pre-build (
                        ;("autoconf")
                        ;("autoupdate")
                        ;("./autogen.sh")
                        ;("./configure" "--without-texmf-dir" "--with-lispdir=.")
                        ;("make")
                        (shell-command "./autogen.sh && ./configure --without-texmf-dir --with-lispdir=. && make")  
                        )))

image

hongyi-zhao commented 3 years ago

Anyway, if I first run the corresponding shell commands in the auctex repo directory:

$ autoconf && autoupdate && ./autogen.sh && ./configure --without-texmf-dir --with-lispdir=. && make
#or
$ ./autogen.sh && ./configure --without-texmf-dir --with-lispdir=. && make
#or
$ ./autogen.sh && ./configure && make

Then just let straight build the package, and it will work:

(straight-use-package
   '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"))
progfolio commented 3 years ago

Came across your post on the emacs-devel archive today:

https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00564.html

In general, the appropriate place to report Emacs bugs is:

https://lists.gnu.org/archive/html/bug-gnu-emacs/

However, it's unlikely that this is an Emacs bug. This is most likely a bug with straight.el, or (my hunch) a system configuration issue. What I would suggest is manually cloning the auctex repo and manually running each :pre-build step via something like shell-command. This way you can see the output/errors Emacs is emitting when running these commands. If there are no errors and everything works as it should, that points us in the direction of a straight.el bug. If there are any it may give some insight into how the pre-build steps are failing.

Try evaluating the following in your *scratch* buffer:

(straight-bug-report
  :user-dir "auctex.straight"
  :post-bootstrap
  (straight-vc-git-clone
   (straight--convert-recipe (straight-recipes-retrieve 'auctex)) nil)
  (let ((default-directory (straight--repos-dir "auctex"))
        (buffer (get-buffer-create "* straight-bug *")))
    (dolist (command '("autouconf" "autoupdate" "./autogen.sh" "./configure"))
      (shell-command command buffer buffer))
    (message "%S" (with-current-buffer buffer (buffer-string)))))

The output from the commands will be collected in a buffer named * straight-bug *.

hongyi-zhao commented 3 years ago

However, it's unlikely that this is an Emacs bug. This is most likely a bug with straight.el, or (my hunch) a system configuration issue.

I agree with you. In fact, I've cross posted my discussion both on emacs-devel and auctex mailing lists. Your hunch is consistent with the following comment from Tassilo Horn:

Hm, then I'd ask the straight.el developers.

Try evaluating the following in your scratch buffer: [...] The output from the commands will be collected in a buffer named straight-bug .

I can't find the * straight-bug * buffer, and only find a *straight-bug-report-process* with the following messages:

Test run with version: prerelease (HEAD -> develop, origin/develop) 45eb611 2021-08-13
(Shell command succeeded with no output)
(Shell command succeeded with no output)
(Shell command failed with code 126 and some error output)

And I also encounter with the following output, but to be frank, at the subsequent testings, I can't reproduce the same messages, or do not know how to call the corresponding message:

Test Case ```emacs-lisp (straight-bug-report :user-dir "auctex.straight" :post-bootstrap (straight-vc-git-clone (straight--convert-recipe (straight-recipes-retrieve 'auctex)) nil) (let ((default-directory (straight--repos-dir "auctex")) (buffer (get-buffer-create "* straight-bug *"))) (dolist (command '("autouconf" "autoupdate" "./autogen.sh" "./configure")) ``` Should be `autoconf`. ``` (shell-command command buffer buffer)) (message "%S" (with-current-buffer buffer (buffer-string))))) ```
Output ```emacs-lisp Bootstrapping straight.el... Bootstrapping straight.el...done Rebuilding all packages due to build cache schema change Looking for gnu-elpa-mirror recipe → Cloning melpa... Looking for gnu-elpa-mirror recipe → Cloning melpa...done Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror... Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...done Looking for emacsmirror-mirror recipe → Cloning el-get... Looking for emacsmirror-mirror recipe → Cloning el-get...done Looking for straight recipe → Cloning emacsmirror-mirror... Looking for straight recipe → Cloning emacsmirror-mirror...done Building straight... Building straight...done Test run with version: prerelease (HEAD -> develop, origin/develop) 45eb611 2021-08-13 (Shell command failed with code 127 and some error output) (Shell command succeeded with no output) (Shell command failed with code 126 and some error output) (Shell command failed with code 127 and some error output) "/bin/bash: line 1: ./configure: No such file or directory " Packages: "org-elpa" n/a n/a "melpa" n/a master 949eb5d8 2021-08-15 "gnu-elpa-mirror" n/a master 8ce05c5 2021-08-10 "el-get" melpa master ec47ecf2 2021-08-17 "emacsmirror-mirror" n/a master cf43858 2021-08-17 "straight" n/a develop 45eb611 2021-08-13 ```
progfolio commented 3 years ago

Should be autoconf.

Apologies for the typo.

I'm not sure I follow you in the thread auctex dev thread you've linked. Tassilo is suggesting essentially the same thing I am (run the commands via Emacs, bypassing straight). We need to figure out if the sequence of :pre-build commands works in general. To summarize: You seem to be able to build just fine when manually running them from a shell environment. But we're still not clear on whether or not the commands are running fine when called from an Emacs process. Is that correct?

From the thread you've linked:

Then I'd try something like

(let ((default-directory "~/auctex-checkout")) (call-process "~/auctex-checkout/configure" nil "configure-output" t))

I try to `C-x C-e' the following code in scratch buffer:

(let ((default-directory "~/auctex")) .(call-process "~/auctex/configure" nil "configure-output" t))

and check what's in the configure-output buffer afterwards.

It seems to work, but the cursor/point always stays in busy state. See the following in the configure-output buffer:

What did you mean by "cursor/point always stays in busy state"? Is the process blocking Emacs? Is it the subprocess waiting for input?

It's important to run these steps in a clean environment each time. If you've previously built successfully from the command line, you should not re-use that environment for testing. straight-bug-report should ensure this.

I can't find the * straight-bug * buffer, and only find a straight-bug-report-process with the following messages:

That's fine, the * straight-bug * buffer will only be present in the child Emacs process when the test is run with :interactive t. For now all the info we need is in the test case output.

And I also encounter with the following output, but to be frank, at the subsequent testings, I can't reproduce the same messages, or do not know how to call the corresponding message:

I'm not sure what you mean by "know how to call the corresponding message".

I did discover that emacs-straight's mirror of auctex is missing preview.el.in:

https://github.com/emacs-straight/auctex

@raxod502 would have more insight into that than I.

So let's bypass that mirror as well as straight's :pre-build machinery. See what output you get from evaluating the following test case (please ensure that /tmp/auctext.straight/ does not exist before the first time you run this):

Test Case ```emacs-lisp (straight-bug-report :user-dir "auctext.straight" :post-bootstrap (straight-use-package '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git" :build nil)) (let ((default-directory (straight--repos-dir "auctex")) (buffer (get-buffer-create "* straight-bug *"))) (dolist (command '("autoconf" "autoupdate" "./autogen.sh" "./configure")) (shell-command command buffer buffer)) (message "%S" (with-current-buffer buffer (buffer-string))))) ```
Output ```emacs-lisp Bootstrapping straight.el... Bootstrapping straight.el...done Rebuilding all packages due to build cache schema change Looking for gnu-elpa-mirror recipe -> Cloning melpa... Looking for gnu-elpa-mirror recipe -> Cloning melpa...done Looking for emacsmirror-mirror recipe -> Cloning gnu-elpa-mirror... Looking for emacsmirror-mirror recipe -> Cloning gnu-elpa-mirror...done Looking for emacsmirror-mirror recipe -> Cloning el-get... Looking for emacsmirror-mirror recipe -> Cloning el-get...done Looking for straight recipe -> Cloning emacsmirror-mirror... Looking for straight recipe -> Cloning emacsmirror-mirror...done Building straight... Building straight...done Test run with version: prerelease (HEAD -> develop, origin/develop) 45eb611 2021-08-13 Cloning auctex... Cloning auctex...done (Shell command succeeded with some error output) (Shell command succeeded with no output) "checking for make... make checking whether make sets $(MAKE)... yes checking for a BSD-compatible install... /usr/bin/install -c checking for date with git... 2021-08-20 checking for release with git... not found, using 2021-08-20 instead checking for date with git... 2021-08-20 checking for release with git... not found, using 2021-08-20 instead checking for emacs... /usr/bin/emacs checking for Emacs prefix... \"/usr\" checking if Emacs is recent enough... yes checking if build directory is valid... yes checking where lisp files go... /usr/share/emacs/site-lisp checking what file to use for auctex startup... /usr/share/emacs/site-lisp/auctex.el checking what file to use for preview startup... /usr/share/emacs/site-lisp/preview-latex.el checking where the package lisp files go... /usr/share/emacs/site-lisp/auctex checking where the data files go... /usr/share/emacs/site-lisp/auctex checking where the info files go... ${datarootdir}/info checking where automatically generated global style hooks go... ${localstatedir}/auctex checking for tex... /usr/bin/tex checking for pdftex... /usr/bin/pdftex checking for dvips... /usr/bin/dvips checking for gs... no checking for GSWIN32C.EXE... no checking for latex... /usr/bin/latex checking for pdflatex... /usr/bin/pdflatex checking for tex... (cached) /usr/bin/tex checking for prefix from kpsepath... \"/usr\" checking for TDS-compliant directory... no checking for TeX directory hierarchy... /usr/share/texmf-dist/tex/latex Preview will be placed in /usr/share/texmf-dist/tex/latex/preview Preview docs will be placed in /usr/share/texmf-dist/tex/latex/preview checking for texhash... /usr/bin/texhash checking for initexmf... /usr/bin/texhash checking for glaring installation conflicts... probably none checking for perl... /usr/bin/perl checking for makeinfo... /usr/bin/makeinfo checking for texi2html... : checking for texi2dvi... /usr/bin/texi2dvi checking for texi2pdf... /usr/bin/texi2pdf checking for install-info... /usr/bin/install-info configure: creating ./config.status config.status: creating Makefile config.status: creating tex-site.el.out config.status: creating doc/Makefile config.status: creating auctex.el config.status: creating preview.el config.status: creating latex/Makefile Congratulations! Configuration of AUCTeX is complete. Type \"make\" at the prompt to build. " Packages: "org-elpa" n/a n/a "melpa" n/a master 949eb5d8 2021-08-15 "gnu-elpa-mirror" n/a master 8ce05c5 2021-08-10 "el-get" melpa master ec47ecf2 2021-08-17 "emacsmirror-mirror" n/a master cf43858 2021-08-17 "straight" n/a develop 45eb611 2021-08-13 "auctex" gnu-elpa-mirror master 578bdfdf 2021-08-20 ```
hongyi-zhao commented 3 years ago

But we're still not clear on whether or not the commands are running fine when called from an Emacs process. Is that correct?

Yes.

What did you mean by "cursor/point always stays in busy state"? Is the process blocking Emacs? Is it the subprocess waiting for input?

I don't know how to accurately describe what I see. Basically, I see the following: The mouse will change into a wheel that never stops spinning there.

I'm not sure what you mean by "know how to call the corresponding message".

I mean, I don’t know how to get the output of the evaluation test case I posted here. It seems that I randomly encountered the output.

See what output you get from evaluating the following test case (please ensure that /tmp/auctext.straight/ does not exist before the first time you run this):

In general, I meet the following after an enough long of running:

image

progfolio commented 3 years ago

So it still hangs when we bypass straight's build machinery. My hunch is one of the following is happening:

I would let Emacs run until it hangs and then take a look at your computer's resources via top or htop if you have that installed. See if the CPU is pegged or a large amount of memory is being used.

hongyi-zhao commented 3 years ago

It seems not.

progfolio commented 3 years ago

Maybe let it sit and see if it finishes. You could start one Emacs process specifically for that and use another to do work in. I'm curious if the process is just taking an extremely long time for some reason.

hongyi-zhao commented 3 years ago

Maybe let it sit and see if it finishes. You could start one Emacs process specifically for that and use another to do work in.

This is just the way I test it. I use the ~/.emacs.d/init.straight.el script to do the trick:

#!/usr/bin/env bash
:;#https://www.reddit.com/r/emacs/comments/a7ubx5/an_interactive_executable_combined_bash_and_emacs/
:;#https://github.com/alphapapa/matrix-client.el/blob/d2ac55293c96d4c95971ed8e2a3f6f354565c5ed/matrix-client-standalone.el.sh#L64-L81
:;# emacs -Q --insert <(tail -n +$(grep -n -m 1 -x ";;Bootstrap straight" "$0" | egrep -o '^[[:digit:]]+') "$0"); exit
:;#https://github.com/hlissner/doom-emacs/blob/develop/bin/doom
:;#https://lists.gnu.org/archive/html/help-gnu-emacs/2021-08/msg00101.html
:;#https://groups.google.com/g/comp.unix.shell/c/krxzfCd_8qM/m/W2Lc5W-jCAAJ
:;#https://groups.google.com/g/comp.unix.shell/c/krxzfCd_8qM/m/ryoNs9AGCQAJ
:; emacs -Q --load $(realpath -e $0) -- "$@"; exit
:;# or  
:;# exec emacs -Q --load $(realpath -e $0) -- "$@"

;;Bootstrap straight
(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)

Run the above script with bash ~/.emacs.d/init.straight.el, then C-x C-e the following code in the *scratch* buffer:

(straight-bug-report
  :user-dir "auctext.straight"
  :post-bootstrap 
  (straight-use-package
   '(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git" :build nil))
  (let
      ((default-directory
         (straight--repos-dir "auctex"))
       (buffer
        (get-buffer-create "* straight-bug *")))
    (dolist
        (command
         '("autoconf" "autoupdate" "./autogen.sh" "./configure"))
      (shell-command command buffer buffer))
    (message "%S"
             (with-current-buffer buffer
               (buffer-string)))))

Even time has elapsed more than 10 minutes, it still does the job there.

I'm curious if the process is just taking an extremely long time for some reason.

I have a hunch that this may be triggered by some operating system specific problems.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:    21.04
Codename:   hirsute

What's your OS?

progfolio commented 3 years ago

The machine I was testing from is running Arch. There's a environmental difference, for sure. I'll have to see if I can spin up an Ubuntu VM when I have some free time to test in.

progfolio commented 2 years ago

I've been unable to reproduce this. Closing for now, but if you have any information to reliably reproduce this, feel free to share it and we can investigate.

hongyi-zhao commented 2 years ago

Today, I tried the problem discussed here again and found that it worked well with the following configuration, so I post it here, just FYI:

(use-package auctex
  :straight (:type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
            :pre-build (
                        ("./autogen.sh")
                        ("./configure" "--without-texmf-dir" "--with-lispdir=.")
                        ("make")
                        ;;or
                        ;(shell-command "./autogen.sh && ./configure --without-texmf-dir --with-lispdir=. && make")  
                       )
            )

  :mode
  ; https://www.mail-archive.com/auctex@gnu.org/msg07608.html
  ; https://www.gnu.org/software/emacs/manual/html_node/reftex/Installation.html
  ("\\.tex\\'" . latex-mode) ; Must first activate the inferior Emacs latex mode
  :hook
          (LaTeX-mode . TeX-PDF-mode)
          (LaTeX-mode . company-mode)
          (LaTeX-mode . flyspell-mode)
          (LaTeX-mode . flycheck-mode)
          (LaTeX-mode . LaTeX-math-mode)
          (LaTeX-mode . turn-on-reftex)
          (LaTeX-mode . turn-on-cdlatex)
  :init
  (load "auctex.el" nil t t) 
  (load "preview-latex.el" nil t t)
  (require 'reftex) 

  (setq-default TeX-master 'dwim)

  (setq TeX-data-directory (straight--repos-dir "auctex")
        TeX-lisp-directory TeX-data-directory                   

        ; Or custom-set-variables as follows.
        ; M-x describe-variable RET preview-TeX-style-dir RET
        ;`(preview-TeX-style-dir ,(concat ".:" (straight--repos-dir "auctex") "latex:"))
        preview-TeX-style-dir (concat ".:" (straight--repos-dir "auctex") "latex:")

        TeX-parse-self t ; parse on load
        TeX-auto-save t  ; parse on save
        TeX-auto-untabify t ; Automatically remove all tabs from a file before saving it. 

      ;Type of TeX engine to use.
      ;It should be one of the following symbols:
      ;* ‘default’
      ;* ‘luatex’
      ;* ‘omega’
      ;* ‘xetex’
        TeX-engine 'xetex
        TeX-auto-local ".auctex-auto" ; Directory containing automatically generated TeX information.
        TeX-style-local ".auctex-style" ; Directory containing hand generated TeX information.

      ;; ##### Enable synctex correlation. 
      ;; ##### From Okular just press `Shift + Left click' to go to the good line. 
      ;; ##### From Evince just press `Ctrl + Left click' to go to the good line.      
        TeX-source-correlate-mode t
        TeX-source-correlate-method 'synctex
        TeX-source-correlate-start-server t

      ;; automatically insert braces after sub/superscript in math mode
        TeX-electric-sub-and-superscript t 
      ;; If non-nil, then query the user before saving each file with TeX-save-document.  
        TeX-save-query nil

        TeX-view-program-selection '((output-pdf "PDF Tools"))
        ))

See here for some relevant configuration. What needs to be pointed out is: The auctex relevant configuration must be set in the :init section, just as the configuration posted by @jwiegley, otherwise, it won't be activated. BTW, the possibility of further flexible configuration is always available, as noted here: :pre-build steps can also use elisp, so it's possible to bind default-directory and then call a shell command from that context.