Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 648438 - media-sound/lilypond with dev-scheme/guile-2.2 - warning: `(gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89 -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite -dAutoRotatePages=/None -sOutputFile=test
Summary: media-sound/lilypond with dev-scheme/guile-2.2 - warning: `(gs -q -dSAFER -dD...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Scheme Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-21 20:33 UTC by edes
Modified: 2020-06-08 08:38 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix font size (lilypond_font_size.patch,505 bytes, patch)
2020-05-02 10:39 UTC, Paul Jewell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description edes 2018-02-21 20:33:07 UTC
Current lilypond versions (2.19.80 and 2.19.80-r1) fail to generate a pdf file when compiled against guile-2.2.

svg output is OK, but even a basic test score fails with an error like this:

GNU LilyPond 2.19.80
Import (ice-9 threads) to have access to `call-with-new-thread'.
Import (ice-9 threads) to have access to `current-thread'.
Processing `test.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `/tmp/lilypond-sgfKlx'...
Converting to `test.pdf'...
warning: `(gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89 -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite -dAutoRotatePages=/None -sOutputFile=test.pdf -c.setpdfwrite -f/tmp/lilypond-sgfKlx)' failed (256)

fatal error: failed files: "test.ly"

Downgrading guile to 2.0.14 resolved the problem.
Comment 1 hangglider 2019-03-29 20:17:26 UTC
Have exact same problem here...
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-04-20 06:45:42 UTC
I have the same problem with PNG output, which in turn apparently causes a lot of errors in asciidoc tests.
Comment 3 Miroslav Šulc gentoo-dev 2019-12-02 11:23:48 UTC
can you please test with 2.19.83?
Comment 4 Jean-Claude Repetto 2019-12-09 13:21:16 UTC
Same problem with version 2.19.83:

$ lilypond -V tiny-example.ly 
Log level set to 287
GNU LilyPond 2.19.83
Relocation: from PATH=/usr/lib/llvm/8/bin:/usr/lib/llvm/7/bin:/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
argv0=lilypond
PATH=/usr/bin (prepend)
Setting PATH to /usr/bin:/usr/lib/llvm/8/bin:/usr/lib/llvm/7/bin:/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
Relocation: compile datadir=, new datadir=/usr/share/lilypond//2.19.83
Relocation: framework_prefix=/usr/bin/..
Setting INSTALLER_PREFIX to /usr/bin/..
PATH=/usr/bin/../bin (prepend)
Setting PATH to /usr/bin/../bin:/usr/bin:/usr/lib/llvm/8/bin:/usr/lib/llvm/7/bin:/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
Setting GUILE_MIN_YIELD_1 to 65
Setting GUILE_MIN_YIELD_2 to 65
Setting GUILE_MIN_YIELD_MALLOC to 65
Setting GUILE_INIT_SEGMENT_SIZE_1 to 10485760
Setting GUILE_MAX_SEGMENT_SIZE to 104857600
Setting GUILE_AUTO_COMPILE to 0
Setting GUILE_WARN_DEPRECATED to detailed
Setting XDG_CACHE_HOME to /usr/share/lilypond/2.19.83

LILYPOND_DATADIR="/usr/share/lilypond/2.19.83"
LOCALEDIR="/usr/share/locale"

Effective prefix: "/usr/share/lilypond/2.19.83"
PATH="/usr/bin/../bin:/usr/bin:/usr/lib/llvm/8/bin:/usr/lib/llvm/7/bin:/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
[/usr/share/lilypond/2.19.83/scm/lily.scm]
Import (ice-9 threads) to have access to `call-with-new-thread'.
Import (ice-9 threads) to have access to `current-thread'.
Using (ice-9 curried-definitions) module
[/usr/share/lilypond/2.19.83/scm/lily-library.scm]
[/usr/share/lilypond/2.19.83/scm/output-lib.scm]
[/usr/share/lilypond/2.19.83/scm/markup-macros.scm]
[/usr/share/lilypond/2.19.83/scm/parser-ly-from-scheme.scm]
[/usr/share/lilypond/2.19.83/scm/file-cache.scm]
[/usr/share/lilypond/2.19.83/scm/define-event-classes.scm]
[/usr/share/lilypond/2.19.83/scm/define-music-callbacks.scm]
[/usr/share/lilypond/2.19.83/scm/define-music-types.scm]
[/usr/share/lilypond/2.19.83/scm/define-note-names.scm]
[/usr/share/lilypond/2.19.83/scm/c++.scm]
[/usr/share/lilypond/2.19.83/scm/chord-entry.scm]
[/usr/share/lilypond/2.19.83/scm/skyline.scm]
[/usr/share/lilypond/2.19.83/scm/markup.scm]
[/usr/share/lilypond/2.19.83/scm/define-markup-commands.scm]
[/usr/share/lilypond/2.19.83/scm/stencil.scm]
[/usr/share/lilypond/2.19.83/scm/modal-transforms.scm]
[/usr/share/lilypond/2.19.83/scm/chord-generic-names.scm]
[/usr/share/lilypond/2.19.83/scm/chord-ignatzek-names.scm]
[/usr/share/lilypond/2.19.83/scm/music-functions.scm
[/usr/share/lilypond/2.19.83/scm/define-music-display-methods.scm]
]
[/usr/share/lilypond/2.19.83/scm/part-combiner.scm]
[/usr/share/lilypond/2.19.83/scm/autochange.scm]
[/usr/share/lilypond/2.19.83/scm/define-music-properties.scm]
[/usr/share/lilypond/2.19.83/scm/time-signature.scm]
[/usr/share/lilypond/2.19.83/scm/time-signature-settings.scm]
[/usr/share/lilypond/2.19.83/scm/auto-beam.scm]
[/usr/share/lilypond/2.19.83/scm/chord-name.scm]
[/usr/share/lilypond/2.19.83/scm/bezier-tools.scm]
[/usr/share/lilypond/2.19.83/scm/define-context-properties.scm]
[/usr/share/lilypond/2.19.83/scm/translation-functions.scm]
[/usr/share/lilypond/2.19.83/scm/script.scm]
[/usr/share/lilypond/2.19.83/scm/midi.scm]
[/usr/share/lilypond/2.19.83/scm/layout-beam.scm]
[/usr/share/lilypond/2.19.83/scm/parser-clef.scm]
[/usr/share/lilypond/2.19.83/scm/layout-slur.scm]
[/usr/share/lilypond/2.19.83/scm/font.scm]
[/usr/share/lilypond/2.19.83/scm/encoding.scm]
[/usr/share/lilypond/2.19.83/scm/bar-line.scm]
[/usr/share/lilypond/2.19.83/scm/flag-styles.scm]
[/usr/share/lilypond/2.19.83/scm/fret-diagrams.scm]
[/usr/share/lilypond/2.19.83/scm/tablature.scm]
[/usr/share/lilypond/2.19.83/scm/harp-pedals.scm]
[/usr/share/lilypond/2.19.83/scm/define-woodwind-diagrams.scm]
[/usr/share/lilypond/2.19.83/scm/display-woodwind-diagrams.scm]
[/usr/share/lilypond/2.19.83/scm/predefined-fretboards.scm]
[/usr/share/lilypond/2.19.83/scm/define-grob-properties.scm]
[/usr/share/lilypond/2.19.83/scm/define-grobs.scm]
[/usr/share/lilypond/2.19.83/scm/define-grob-interfaces.scm]
[/usr/share/lilypond/2.19.83/scm/define-stencil-commands.scm]
[/usr/share/lilypond/2.19.83/scm/scheme-engravers.scm]
[/usr/share/lilypond/2.19.83/scm/titling.scm]
[/usr/share/lilypond/2.19.83/scm/text.scm]
[/usr/share/lilypond/2.19.83/scm/paper.scm]
[/usr/share/lilypond/2.19.83/scm/backend-library.scm]
[/usr/share/lilypond/2.19.83/scm/x11-color.scm]
[/usr/share/lilypond/2.19.83/scm/safe-lily.scm]
Initializing FontConfig...
Adding fontconfig configuration file: /usr/share/lilypond/2.19.83/fonts/00-lilypond-fonts.conf
Adding fontconfig configuration file: /etc/fonts/fonts.conf
Adding fontconfig configuration file: /usr/share/lilypond/2.19.83/fonts/99-lilypond-fonts.conf
Adding font directory: /usr/share/lilypond/2.19.83/fonts/otf
Building font database...

Processing `tiny-example.ly'
Parsing...
[/usr/share/lilypond/2.19.83/ly/init.ly
[<string>
 [/usr/share/lilypond/2.19.83/ly/declarations-init.ly
  [/usr/share/lilypond/2.19.83/ly/music-functions-init.ly]
  [/usr/share/lilypond/2.19.83/ly/toc-init.ly]
Using `nederlands' note names...
  [/usr/share/lilypond/2.19.83/ly/drumpitch-init.ly]
  [/usr/share/lilypond/2.19.83/ly/chord-modifiers-init.ly]
  [/usr/share/lilypond/2.19.83/ly/script-init.ly]
  [/usr/share/lilypond/2.19.83/ly/chord-repetition-init.ly]
  [/usr/share/lilypond/2.19.83/ly/scale-definitions-init.ly]
  [/usr/share/lilypond/2.19.83/ly/dynamic-scripts-init.ly]
  [/usr/share/lilypond/2.19.83/ly/spanners-init.ly]
  [/usr/share/lilypond/2.19.83/ly/predefined-fretboards-init.ly]
  [/usr/share/lilypond/2.19.83/ly/string-tunings-init.ly]
  [/usr/share/lilypond/2.19.83/ly/property-init.ly]
  [/usr/share/lilypond/2.19.83/ly/grace-init.ly]
  [/usr/share/lilypond/2.19.83/ly/midi-init.ly
   [/usr/share/lilypond/2.19.83/ly/performer-init.ly]]
  [/usr/share/lilypond/2.19.83/ly/paper-defaults-init.ly
   [/usr/share/lilypond/2.19.83/ly/titling-init.ly]
   [/usr/share/lilypond/2.19.83/ly/text-replacements.ly]]
  [/usr/share/lilypond/2.19.83/ly/context-mods-init.ly]
  [/usr/share/lilypond/2.19.83/ly/engraver-init.ly]]]
Using `nederlands' note names...
 [tiny-example.ly
  [/usr/share/lilypond/2.19.83/ly/english.ly
Using `english' note names...]]
Interpreting music...
[/usr/share/lilypond/2.19.83/fonts/otf/emmentaler-20.otf
Replace font name from Emmentaler-20 to Emmentaler-20.]
elapsed time: 0.16 seconds
Element count 79 (spanners 12) 
Preprocessing graphical objects...
Grob count 131
[/usr/share/lilypond/2.19.83/fonts/otf/emmentaler-11.otf
Replace font name from Emmentaler-11 to Emmentaler-11.]
[/usr/share/lilypond/2.19.83/fonts/otf/emmentaler-13.otf
Replace font name from Emmentaler-13 to Emmentaler-13.]
[/usr/share/lilypond/2.19.83/fonts/otf/emmentaler-14.otf
Replace font name from Emmentaler-14 to Emmentaler-14.]
[/usr/share/lilypond/2.19.83/fonts/otf/emmentaler-16.otf
Replace font name from Emmentaler-16 to Emmentaler-16.]
[/usr/share/lilypond/2.19.83/fonts/otf/emmentaler-18.otf
Replace font name from Emmentaler-18 to Emmentaler-18.]
[/usr/share/lilypond/2.19.83/fonts/otf/emmentaler-23.otf
Replace font name from Emmentaler-23 to Emmentaler-23.]
[emmentaler-20_7.029296875]
Replace font name from Emmentaler-20 to Emmentaler-20.
Replace font name from Emmentaler-20 to Emmentaler-20.
Replace font name from Emmentaler-20 to Emmentaler-20.
Replace font name from Emmentaler-20 to Emmentaler-20.
Finding the ideal number of pages...
[lilypond_serif_3.8662109375]
Replace font name from TeXGyreSchola-Regular to TeXGyreSchola-Regular.
Fitting music on 1 page...
Drawing systems...
Element count 68
Replace font name from TeXGyreSchola-Regular to TeXGyreSchola-Regular.
Replace font name from TeXGyreSchola-Regular to TeXGyreSchola-Regular.
Layout output to `/tmp/lilypond-VUATFB'...
Initializing embedded CFF font list.
Embedding CFF font `Emmentaler-20'.
[/usr/share/lilypond/2.19.83/fonts/otf/emmentaler-20.otf]
Embedding CFF font `TeXGyreSchola-Regular'.
[/usr/share/fonts/tex-gyre/texgyreschola-regular.otf]
[/usr/share/lilypond/2.19.83/ps/music-drawing-routines.ps]
[/usr/share/lilypond/2.19.83/ps/lilyponddefs.ps]
Converting to `tiny-example.pdf'...
Invoking `gs -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89 -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite -dAutoRotatePages=/None -dPrinted=false -sOutputFile=tiny-example.pdf -c.setpdfwrite -f/tmp/lilypond-VUATFB'...

GPL Ghostscript 9.50 (2019-10-15)
Copyright (C) 2019 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Error: /rangecheck in /--.parsecff--
Operand stack:
   false   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1990   1   3   %oparray_pop   1989   1   3   %oparray_pop   1977   1   3   %oparray_pop   1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:735/1123(ro)(G)--   --dict:0/20(G)--   --dict:76/200(L)--   --dict:14/20(ro)(G)--   --dict:7/30(L)--
Current allocation mode is local
Current file position is 65688
GPL Ghostscript 9.50: Unrecoverable error, exit code 1
warning: `(gs -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89 -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite -dAutoRotatePages=/None -dPrinted=false -sOutputFile=tiny-example.pdf -c.setpdfwrite -f/tmp/lilypond-VUATFB)' failed (256)

fatal error: failed files: "tiny-example.ly"
Comment 5 Jean-Claude Repetto 2019-12-09 13:31:46 UTC
According to this thread in the lilypond ML: https://lists.gnu.org/archive/html/bug-lilypond/2018-06/msg00005.html , there are some patches needed for lilypond to work with guile-2.2 .
Comment 6 Benny P. 2020-01-03 15:24:22 UTC
It looks like lilypond only really officially supports Guile 1.8

There has been some work in the past on migrating to Guile 2, but that seems
to have stalled. The guile-v2-work branch was last updated in 2016 (which
I think is where the patches mentioned in the links in comment 5 come from). The patches/rebase no longer cleanly apply.

Official issue for guile 2 migration:
https://sourceforge.net/p/testlilyissues/issues/1055/

Guile 2.0 branch of lilypond:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=shortlog;h=refs/heads/dev/guile-v2-work
Comment 7 Joshua Clayton 2020-01-27 14:56:24 UTC
I've just built the latest lilypond  outside of portage with our in-tree guile (same configure args as portage).
The good:
  It has integrated all the patches from the guile-2 support branch,
  With a minor gcc fix to one file, it builds.

The bad:
  it exhibits the same problem described in this thread. ghostscript crashes and no pdf is created.

I believe the error happens when generating temporary postscript output.  Not only does gs crash, but I am not able t successfully open the /tmp file in okular
Comment 8 fkater 2020-03-26 09:32:01 UTC
Just confirming this issue.

Upgrading lilypond to 2.20.0 did not help.

However, what worked is: Downgrading guile to 2.0.x.
Comment 9 Paul Jewell 2020-05-02 10:37:26 UTC
I have created a bug (720422) with an updated ebuild for lilypond version 2.21.1. It seems to overcome the problem reported in this bug, and also builds with python 3.7.
Comment 10 Paul Jewell 2020-05-02 10:39:08 UTC
Created attachment 635662 [details, diff]
Patch to fix font size

This patch is still necessary to ensure the correct font sizes on the generated documents. I have it in my /etc/portage/patches/... tree - it maybe better installed in portage directly.
Comment 11 Paul Jewell 2020-05-02 10:39:53 UTC
Sorry - this patch is in the wrong place - please disregard!
Comment 12 Joshua Clayton 2020-05-15 13:28:25 UTC
Confirm that upstream seems to be working again! 
I just emerged lilypond-9999 with guild 2.2.6 (and no patches). 
The output pdf worked and was visually indistinguishable from the old one.

(I don't know if this matters, but I only tried this after my forced downgrade of guile stopped lilypond from a forced rebuild today)
Comment 13 hangglider 2020-05-15 13:46:51 UTC
While lilypond-9999 seems to _compile_ fine, it won't find file names with Non-ASCII chars (german umlauts in my case; guile is 2.2.6 too). Just tried to do that:

$ LANG=C LC_ALL=C lilypond O_du_fröhliche.ly 
GNU LilyPond 2.21.2
warning: cannot find file: `O_du_fr??hliche.ly'
fatal error: failed files: "O_du_fr??hliche.ly"

$ cp O_du_fr{ö,oe}hliche.ly 

$ LANG=C LC_ALL=C lilypond "O_du_froehliche.ly"
GNU LilyPond 2.21.2
Processing `O_du_froehliche.ly'
Parsing...
Interpreting music...[8][16]
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `/tmp/lilypond-3EhoHp'...
Converting to `O_du_froehliche.pdf'...
Deleting `/tmp/lilypond-3EhoHp'...
Success: compilation successfully completed
Comment 14 Miroslav Šulc gentoo-dev 2020-06-08 08:02:43 UTC
(In reply to hangglider from comment #13)
> While lilypond-9999 seems to _compile_ fine, it won't find file names with
> Non-ASCII chars (german umlauts in my case; guile is 2.2.6 too). Just tried
> to do that:
> 
> $ LANG=C LC_ALL=C lilypond O_du_fröhliche.ly 
> GNU LilyPond 2.21.2
> warning: cannot find file: `O_du_fr??hliche.ly'
> fatal error: failed files: "O_du_fr??hliche.ly"
> 
> $ cp O_du_fr{ö,oe}hliche.ly 
> 
> $ LANG=C LC_ALL=C lilypond "O_du_froehliche.ly"
> GNU LilyPond 2.21.2
> Processing `O_du_froehliche.ly'
> Parsing...
> Interpreting music...[8][16]
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...
> Layout output to `/tmp/lilypond-3EhoHp'...
> Converting to `O_du_froehliche.pdf'...
> Deleting `/tmp/lilypond-3EhoHp'...
> Success: compilation successfully completed

is it really supposed to handle umlauts correctly when you are using LANG=C LC_ALL=C instead of something like de_DE.utf8?
Comment 15 hangglider 2020-06-08 08:38:52 UTC
(In reply to Miroslav Šulc from comment #14)
> is it really supposed to handle umlauts correctly when you are using LANG=C
> LC_ALL=C instead of something like de_DE.utf8?

Good question, but it seems to only have an effect with the program's (stdout) output, as intended, even not the files processed. (still having a copy in a file without umlauts in it's name):

$ echo $LANG $LC_ALL
de_DE.utf8 de_DE.utf8

$ lilypond O_du_fröhliche.ly 
GNU LilyPond 2.21.2
Warnung: Datei »O_du_fr??hliche.ly« kann nicht gefunden werden
schwerer Fehler: gescheiterte Dateien: "O_du_fr??hliche.ly"

$ lilypond O_du_froehliche.ly 
GNU LilyPond 2.21.2
»O_du_froehliche.ly« wird verarbeitet
Analysieren...
Interpretation der Musik...[8][16]
Vorverarbeitung der grafischen Elemente...
Ideale Seitenanzahl wird gefunden...
Musik wird auf eine Seite angepasst...
Systeme erstellen...
Layout nach »/tmp/lilypond-YqCU9Q« ausgeben...
Konvertierung nach »O_du_froehliche.pdf«...
Löschen von »/tmp/lilypond-YqCU9Q«...
Kompilation erfolgreich beendet