bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

relocating/symlinks (was: Lilypond taking forever to typeset)


From: David Kastrup
Subject: relocating/symlinks (was: Lilypond taking forever to typeset)
Date: Mon, 11 Jul 2016 13:48:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Mojca Miklavec <address@hidden> writes:

> PS/unrelated: Talking about macs, I don't like the fact that I have to
> create a script doing
>     #!/bin/bash
>     exec /Applications/LilyPond.app/Contents/Resources/bin/lilypond "$@"
> Why doesn't simple symlinking work? If I try symlinking
>     /Applications/LilyPond.app/Contents/Resources/bin/lilypond
> here's what I get:
>
> GNU LilyPond 2.19.45
> warning: not relocating, no 2.19.45/ or current/ found under
> /Users/me/share/lilypond/
> ERROR: In procedure primitive-load-path:
> ERROR: Unable to find file "ice-9/boot-9.scm" in load path
>
> There is an easy workaround of course and it's not a problem for
> anyone reading the docs, but it's not intuitive and it would be better
> to fix it at some point.

The difference will be the argv[0] that the executable is called with.
LilyPond apparently does not follow symlinks here since it has its own
symlink from out/bin/lilypond to lily/out/lilypond and calling the
symlink works while calling linked target does not:

address@hidden:/usr/local/tmp/lilypond$ ls -l out/bin/lilypond
lrwxrwxrwx 1 dak dak 23 Jul 11 13:20 out/bin/lilypond -> ../../lily/out/lilypond
address@hidden:/usr/local/tmp/lilypond$ out/bin/lilypond scheme-sandbox
GNU LilyPond 2.19.46
Processing 
`/usr/local/tmp/lilypond/out/share/lilypond/current/ly/scheme-sandbox.ly'
Parsing...
guile> (exit 0)

Success: compilation successfully completed

address@hidden:/usr/local/tmp/lilypond$ out/bin/../../lily/out/lilypond 
scheme-sandbox
GNU LilyPond 2.19.46
warning: not relocating, no 2.19.46/ or current/ found under 
/usr/local/tmp/lilypond/out/bin/../../lily/share/lilypond/
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file "lily.scm" in load path

address@hidden:/usr/local/tmp/lilypond$ lily/out/lilypond scheme-sandbox
GNU LilyPond 2.19.46
warning: not relocating, no 2.19.46/ or current/ found under 
/usr/local/tmp/lilypond/lily/share/lilypond/
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file "lily.scm" in load path

Arguably, following the symlink tentatively with readlink rather than
giving up altogether would make sense.  readlink is very tiresome to
interpret, however, when it delivers a relative file name rather than an
absolute one, and using realpath will follow _all_ symlinks, and that
does not work in the out/bin/lilypond situation at least.

And of course one needs the respective autoconf tests because clearly we
don't even have symlinks on all supported platforms (I'm fuzzy about
current Windows systems/filesystems).

Basically: you have a point.  It's just sort of an expensive point.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]