jperon / lyluatex

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

Compilation fails with "Attempt to call global 'direct_ly' (a nil value)" #80

Closed alex-ball closed 6 years ago

alex-ball commented 6 years ago

I cannot get the package to work at all on my system.

MWE:

\documentclass{article}
\usepackage{lyluatex}
\begin{document}
\begin{ly}
\relative c { a b c d }
\end{ly}
\end{document}

In interactive mode, compilation drops out to a lua prompt after the following line:

(/path/to/texmf-dist/tex/latex/pdfpages/ppluatex.def)

Error message in batch mode:

[\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.6 \end{ly}

The lua interpreter ran into a problem, so the
remainder of this lua chunk will be ignored.
uliska commented 6 years ago

Please

jperon commented 6 years ago

I think it's a weird bug I've already observed. Could you please try following commands:

sudo ln -s /usr/share/texlive/texmf-dist/scripts/lyluatex/lyluatex.lua /usr/share/texmf/tex/latex/lyluatex/lyluatex.lua
sudo mktexlsr

then try again ?

alex-ball commented 6 years ago

@jperon: Yes, that worked. Thanks for that.

@uliska: For completeness, I'm using the TeXLive version (up to date with tlmgr), and invoke compilation as per the documentation:

lualatex -shell-escape test.tex
jperon commented 6 years ago

I leave this open, as I'll have to report it to TeXLive.

jperon commented 6 years ago

After testing more on my machine, it seems this bug has disappeared with last changes; I guess this could be related to namespace-issues. So I close it now; it will be solved upstream when we've sent the new version to CTAN.

jperon commented 6 years ago

@alex-ball When it's been updated on TeXLive and you update your own distribution, you shouldn't forget to revert previous commands (just to keep your installation clean):

sudo rm /usr/share/texmf/tex/latex/lyluatex/lyluatex.lua
sudo mktexlsr