jperon / lyluatex

Alternative à lilypond-book pour lualatex
MIT License
58 stars 12 forks source link

cannot compile any simple example in Debian #181

Closed fedelibre closed 6 years ago

fedelibre commented 6 years ago

As I cannot make it work on my regular distro (Fedora) - issue #180 - I'm now trying a Debian Stretch container. I've installed lyluatex using tlmgr as regular user.

Here's the simple file I'm trying to compile:

$ cat simple.tex 
\documentclass{article}
\usepackage{lyluatex}
\begin{document}

Some text.

\lilypond{ c d e d }

Other text.

\begin{lilypond}
  \score {
  \new Staff { c' }
  }
\end{lilypond}

\end{document}

And here's the output.

$ lualatex --shell-escape simple.tex 
This is LuaTeX, Version 0.95.0 (TeX Live 2016/Debian) 
 system commands enabled.
(./simple.tex
LaTeX2e <2017/01/01> patch level 3
(using write cache: /home/dev/.texlive2016/texmf-var/luatex-cache/generic)(usin
g read cache: /var/lib/texmf/luatex-cache/generic /home/dev/.texlive2016/texmf-
var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.121 seconds
Babel <3.9r> and hyphenation patterns for 1 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo(compiling luc: /var/li
b/texmf/luatex-cache/generic/fonts/otl/lmroman10-regular.luc)(load luc: /home/d
ev/.texlive2016/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.luc)
)) (/home/dev/texmf/tex/latex/lyluatex/lyluatex.sty
(/usr/share/texlive/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
(/usr/share/texlive/texmf-dist/tex/luatex/ctablestack/ctablestack.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/luatex.def)))
(/usr/share/texlive/texmf-dist/tex/latex/keycommand/keycommand.sty
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/share/texlive/texmf-dist/tex/latex/environ/environ.sty
(/usr/share/texlive/texmf-dist/tex/latex/trimspaces/trimspaces.sty))
(/usr/share/texlive/texmf-dist/tex/latex/currfile/currfile.sty
(/usr/share/texlive/texmf-dist/tex/latex/filehook/filehook.sty))
(/usr/share/texlive/texmf-dist/tex/latex/pdfpages/pdfpages.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/eso-pic/eso-pic.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/atbegshi.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg)))
(/usr/share/texlive/texmf-dist/tex/latex/pdfpages/ppluatex.def))
lua> 

If I type Ctrl-D I get this:

No file simple.aux.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/luatex-loader.sty
(/usr/share/texlive/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua)))
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/pdflscape.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/lscape.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))[\directlua]:1:
 attempt to call global 'direct_ly' (a nil value)
stack traceback:
    [\directlua]:1: in main chunk.
\env@compilerly@process ...g {\localstaffsize } )}
                                                  \env@ignore 
l.7 \lilypond{ c d e d}

? X
 461 words of node memory still in use:
   3 hlist, 1 rule, 1 local_par, 1 dir, 9 glue, 1 penalty, 9 glyph, 6 attribute
, 40 glue_spec, 6 attribute_list, 1 write, 1 pdf_colorstack nodes
   avail lists: 2:10,3:2,4:1,5:2,7:2,8:1,9:1

warning  (pdf backend): no pages of output.
Transcript written on simple.log.

A PDF file is created, but it contains only text and no music.

jperon commented 6 years ago

Could you please give the result of following commands:

kpsewhich lyluatex.sty
kpsewhich lyluatex.lua
head $(kpsewhich lyluatex.sty)
head $(kpsewhich lyluatex.lua)

As a temporary workaround, I think copying (or linking) lyluatex.lua into the same folder as lyluatex.sty should solve the issue.

fedelibre commented 6 years ago

Here's the output:

[dev@lilydev:~]$ kpsewhich lyluatex.sty
/home/dev/texmf/tex/latex/lyluatex/lyluatex.sty
[dev@lilydev:~]$ 
[dev@lilydev:~]$ kpsewhich lyluatex.lua
/home/dev/texmf/scripts/lyluatex/lyluatex.lua
[dev@lilydev:~]$ 
[dev@lilydev:~]$ head $(kpsewhich lyluatex.sty)
\ProvidesPackage{lyluatex}

% Dépendances
\RequirePackage{luatexbase}
\RequirePackage{luaotfload}
\RequirePackage{kvoptions}
\RequirePackage{graphicx}
\RequirePackage{keycommand}
\RequirePackage{environ}
\RequirePackage{currfile}
[dev@lilydev:~]$ 
[dev@lilydev:~]$ head $(kpsewhich lyluatex.lua)
local err, warn, info, log = luatexbase.provides_module({
    name               = "lyluatex",
    version            = '0',
    greinternalversion = internalversion,
    date               = "2017/12/05",
    description        = "Module lyluatex.",
    author             = "The Gregorio Project  − Jacques Peron <cataclop@hotmail.com>",
    copyright          = "2008-2017 - The Gregorio Project",
    license            = "MIT",
})

If I copy the lyluatex.lua file in the current directory, I do not get the lua> propmpt and the PDF file contains the music, but I still need to hit Enter to complete the LilyPond compilation. This is a "showstopper" unfortunately. Here's the relevant part of the output:

(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))Changing working directory to: `tmp_ly'
Processing `-'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Calculating line breaks... 
Drawing systems... 
Layout output to `3955217100208524907bb323728c5290-16-666666666667-335pt.eps'...
Converting to `3955217100208524907bb323728c5290-16-666666666667-335pt.pdf'...
Deleting `3955217100208524907bb323728c5290-16-666666666667-335pt.eps'...
Layout output to `3955217100208524907bb323728c5290-16-666666666667-335pt-1.eps'...
Converting to `./3955217100208524907bb323728c5290-16-666666666667-335pt-1.pdf'...
Writing 3955217100208524907bb323728c5290-16-666666666667-335pt-systems.texi...
Writing 3955217100208524907bb323728c5290-16-666666666667-335pt-systems.tex...
Writing 3955217100208524907bb323728c5290-16-666666666667-335pt-systems.count...
Success: compilation successfully completed

<tmp_ly/3955217100208524907bb323728c5290-16-666666666667-335pt-1.pdf, id=1, 88.
33pt x 46.1725pt>
<use tmp_ly/3955217100208524907bb323728c5290-16-666666666667-335pt-1.pdf>[\dire
ctlua]:1: invalid escape sequence near '\k'.
\env@compilerly@process ...g {\localstaffsize } )}
                                                  \env@ignore 
l.15 \end{lilypond}

? 
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}<./tmp_ly/3955217100208524
907bb323728c5290-16-666666666667-335pt-1.pdf>] (./simple.aux))
 371 words of node memory still in use:
   2 hlist, 1 vlist, 1 rule, 7 glue, 5 attribute, 40 glue_spec, 5 attribute_lis
t, 1 write nodes
   avail lists: 1:1,2:60,3:7,4:6,5:16,6:26,7:50,8:4,9:39
</usr/share/texmf/fonts/opentype/public/lm/lmroman10-regular.otf>
Output written on simple.pdf (1 page, 10908 bytes).
Transcript written on simple.log.
jperon commented 6 years ago

OK. That's because TeXLive 2017 is frozen, so your version of lyluatex is outdated, with the bug mentionned #80. You should overwrite /home/dev/texmf/tex/latex/lyluatex/lyluatex.sty and /home/dev/texmf/scripts/lyluatex/lyluatex.lua with lyluatex.sty and lyluatex.lua from this repository (or CTAN).

fedelibre commented 6 years ago

I thought it was installed from CTAN and up-to-date.. but you are right of course, it's from 5th of December. BTW, on Debian I'm using TeX Live 2016...

It works now (it compiles without any prompt), but I had to copy simple.tex to a new directory, otherwise I got errors. I guess it's a cache problem:

$ lualatex --shell-escape simple.tex 
This is LuaTeX, Version 0.95.0 (TeX Live 2016/Debian) 
 system commands enabled.
(./simple.tex
LaTeX2e <2017/01/01> patch level 3
(using write cache: /home/dev/.texlive2016/texmf-var/luatex-cache/generic)(usin
g read cache: /var/lib/texmf/luatex-cache/generic /home/dev/.texlive2016/texmf-
var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.120 seconds
Babel <3.9r> and hyphenation patterns for 1 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo(compiling luc: /var/li
b/texmf/luatex-cache/generic/fonts/otl/lmroman10-regular.luc)(load luc: /home/d
ev/.texlive2016/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.luc)
)) (/home/dev/texmf/tex/latex/lyluatex/lyluatex.sty
(/usr/share/texlive/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
(/usr/share/texlive/texmf-dist/tex/luatex/ctablestack/ctablestack.sty))
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/luatex.def
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))))
(/usr/share/texlive/texmf-dist/tex/latex/minibox/minibox.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3pdfmode.def)))
(/usr/share/texlive/texmf-dist/tex/latex/environ/environ.sty
(/usr/share/texlive/texmf-dist/tex/latex/trimspaces/trimspaces.sty))
(/usr/share/texlive/texmf-dist/tex/latex/currfile/currfile.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))
(/usr/share/texlive/texmf-dist/tex/latex/filehook/filehook.sty))
(/usr/share/texlive/texmf-dist/tex/latex/pdfpages/pdfpages.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/eso-pic/eso-pic.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/atbegshi.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg)))
(/usr/share/texlive/texmf-dist/tex/latex/pdfpages/ppluatex.def))
(/usr/share/texlive/texmf-dist/tex/latex/metalogo/metalogo.sty
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))[\directlua]:1:
 attempt to index global 'ly' (a boolean value)
stack traceback:
    [\directlua]:1: in main chunk.
l.101 }

? 
[\directlua]:1: attempt to index global 'ly' (a boolean value)
stack traceback:
    [\directlua]:1: in main chunk.
l.107 }

? 
) (./simple.aux)
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/luatex-loader.sty
(/usr/share/texlive/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua)))
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/pdflscape.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/lscape.sty))[\directlua]:1: a
ttempt to index global 'ly' (a boolean value)
stack traceback:
    [\directlua]:1: in main chunk.
\\lily ... \repeat {}\directlua {ly.state = 'cmd'}
                                                  \begin {ly@compilely}#2 \e...

l.7 \lilypond{ c d e d }

? 
[\directlua]:1: attempt to index global 'ly' (a boolean value)
stack traceback:
    [\directlua]:1: in main chunk.
\ly@compilescore ... #1 ly.newpage_if_fullpage() }
                                                  \ly@resetunits \ly@current...

l.7 \lilypond{ c d e d }

? 
[\directlua]:1: attempt to index global 'ly' (a boolean value)
stack traceback:
    [\directlua]:1: in main chunk.
\ly@currentfonts ..._font_family(font.current()))}
                                                  \rmfamily \edef \rmfamilyi...

l.7 \lilypond{ c d e d }

? 
(compiling luc: /var/lib/texmf/luatex-cache/generic/fonts/otl/lmsans10-regular.
luc)(compiling luc: /home/dev/.texlive2016/texmf-var/luatex-cache/generic/fonts
/otl/lmsans10-regular.luc)(save: /home/dev/.texlive2016/texmf-var/luatex-cache/
generic/fonts/otl/lmsans10-regular.lua)(save: /home/dev/.texlive2016/texmf-var/
luatex-cache/generic/fonts/otl/lmsans10-regular.luc)(compiling luc: /var/lib/te
xmf/luatex-cache/generic/fonts/otl/lmmono10-regular.luc)(compiling luc: /home/d
ev/.texlive2016/texmf-var/luatex-cache/generic/fonts/otl/lmmono10-regular.luc)(
save: /home/dev/.texlive2016/texmf-var/luatex-cache/generic/fonts/otl/lmmono10-
regular.lua)(save: /home/dev/.texlive2016/texmf-var/luatex-cache/generic/fonts/
otl/lmmono10-regular.luc)[\directlua]:1: attempt to index global 'ly' (a boolea
n value)
stack traceback:
    [\directlua]:1: in main chunk.
\ly@currentfonts ..., \sffamilyid , \ttfamilyid )}
                                                  \endgroup 
l.7 \lilypond{ c d e d }

? 
[\directlua]:1: attempt to index global 'ly' (a boolean value)
stack traceback:
    [\directlua]:1: in main chunk.
\ly@compilescore ...directlua {ly.score:process()}

l.7 \lilypond{ c d e d }

? 
[\directlua]:1: attempt to index global 'ly' (a boolean value)
stack traceback:
    [\directlua]:1: in main chunk.
\\ly ...ions {#1}\directlua {ly.env_begin([[#1]])}

l.12   \score
            {
? 
! Undefined control sequence.
<recently read> \score 

l.12   \score
            {
? 
! Undefined control sequence.
l.13   \new
          Staff { c' }
? 
[\directlua]:1: attempt to index global 'ly' (a boolean value)
stack traceback:
    [\directlua]:1: in main chunk.
\endlilypond ->\directlua {ly.env_end()}

l.15 \end{lilypond}

? 
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./simple.aux))
 415 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 8 glue, 7 attribute, 44 glue_spec, 7 attribute_lis
t, 1 write nodes
   avail lists: 2:56,3:7,4:6,5:16,6:34,7:54,8:1,9:35
</usr/share/texmf/fonts/opentype/public/lm/lmroman10-regular.otf>
Output written on simple.pdf (1 page, 4043 bytes).
Transcript written on simple.log.
fedelibre commented 6 years ago

I take back my comment about the cache. I had a wrong symlink (pointing to itself?!?) in my home directory:

$ ls -l lyluatex.lua
-rwxr-xr-x 1 dev dev 5084 Mar 22 07:57 lyluatex.lua

Sorry for the noise. I'll close it.

jperon commented 6 years ago

Thank you for your report and the time you took to try it !