Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lyp fails on ghostscript command ~> 2.19.18 #57

Closed
andrewcsmith opened this issue Jan 22, 2018 · 4 comments
Closed

lyp fails on ghostscript command ~> 2.19.18 #57

andrewcsmith opened this issue Jan 22, 2018 · 4 comments

Comments

@andrewcsmith
Copy link

I'm getting a failure in running the final ghostscript pdf-creation command in versions 2.19.18 and above. The usual gs command works if I run the exact same thing in the terminal, but it seems to be failing with lyp. I originally thought lilypond in general was also failing, but I successfully installed and compiled this test on 2.19.80 with no problems.

Running Arch Linux, ghostscript 9.22, lyp 1.3.5.

shell output

[vagrant@bazinga ly_test]$ lyp use 2.19.18
Using Lilypond version 2.19.18
[vagrant@bazinga ly_test]$ lyp compile test.ly
Lyp 1.3.5
GNU LilyPond 2.19.18
Processing `/tmp/lyp/wrappers/test.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `test.ps'...
Converting to `./test.pdf'...
warning: `(gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89
-dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite
-sOutputFile=./test.pdf -c.setpdfwrite -ftest.ps)' failed (256)

fatal error: failed files: "/tmp/lyp/wrappers/test.ly"

[vagrant@bazinga ly_test]$ lyp use 2.19.17
Using Lilypond version 2.19.17
[vagrant@bazinga ly_test]$ lyp compile test.ly
Lyp 1.3.5
GNU LilyPond 2.19.17
Processing `/tmp/lyp/wrappers/test.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `test.ps'...
Converting to `./test.pdf'...
Success: compilation successfully completed

test.ly

\score {
    \new Voice {
        c'4 d' e' f'
    }

    \layout { }
}
@noteflakes
Copy link
Collaborator

Lyp installs the bundled versions of lilypond, which include among other things a copy of GhostScript. I have little understanding of how lilypond invokes it (I'll try to look it up). Anyway, try to compile the test file with debug level logging:

bin/lyp compile -lDEBUG test.ly

@andrewcsmith
Copy link
Author

Great, thanks. So something happened in there where 2.19.17 and all versions of the "official" lilypond release uses the bundled gs but lyp uses my system ghostscript instead. The updated grammar is totally fine, but gs throws an error when the versions don't match.

gs: Interpreter revision (922) does not match gs_init.ps revision (921).    

Since I'm on Arch it's a gigantic headache to pin an out-of-date package version so I can't (easily) downgrade ghostscript. My guess is that lyp is failing to set some environment variable that is invoking the final gs command, so it's just defaulting to the system one. (I actually first installed the ghostscript package because lyp wasn't finding the packaged one.)

@andrewcsmith
Copy link
Author

The plot thickens -- the exec at lilypond/bin/gs is version 9.22 for all versions larger than 2.19.18! 2.19.17 is still 8.70. lyp seems to be properly setting all the environment variables pointing the libs at the included 9.21 installation.

@andrewcsmith
Copy link
Author

Update: I copied all the 9.22 ghostscript files from an updated installation into the relevant folders, and everything works! Theoretically this should be just fine. The issue is less urgent because this part is fixed (for me anyway), but I still wonder why the ghostscript version problem breaks lyp.

noteflakes added a commit that referenced this issue Feb 17, 2018
Pass verbose flag to lilypond when compiling (see #57, #58)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants