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

LilyPond #10290

Closed
thomas-morgan opened this issue Oct 8, 2015 · 3 comments
Closed

LilyPond #10290

thomas-morgan opened this issue Oct 8, 2015 · 3 comments
Labels
0.kind: bug Something is broken
Milestone

Comments

@thomas-morgan
Copy link

With NixOS 15.09 I get this error running LilyPond:

$ /run/current-system/sw/bin/lilypond
GNU LilyPond 2.18.2
warning: not relocating, no 2.18.2/ or current/ found under /run/current-system/sw/share/lilypond/
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file "lily.scm" in load path

I can work around this (clumsily) by using an old version of wrapProgram in LilyPond's postInstall. This wrapProgram differs by not including -a "$0".

postInstall = ''
  wrapProgram() {
    local prog="$1"
    local hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
    mv $prog $hidden
    makeWrapper $hidden $prog "$@"
  }

  for f in "$out/bin/"*; do
      wrapProgram "$f" --set GUILE_AUTO_COMPILE 0 \
                       --set PATH "${ghostscript}/bin"
  done
'';

This seems to be related to #9562. Changing argv[0] apparently can break some users of wrapProgram as well as those of makeWrapper.

@domenkozar
Copy link
Member

cc @ttuegel

@vcunat
Copy link
Member

vcunat commented Oct 9, 2015

Hmm, perhaps we should add --no-argv0 or some similar option to handle these cases easily?

@vcunat vcunat added the 0.kind: bug Something is broken label Oct 9, 2015
@vcunat vcunat added this to the 15.09 milestone Oct 9, 2015
@ttuegel ttuegel closed this as completed in 2de259f Oct 9, 2015
ttuegel added a commit that referenced this issue Oct 9, 2015
Fixes #10290. Lilypond finds its Guile libraries by looking at the path
in argv[0], so it should be hardcoded to the real absolute path to the
executable.

(cherry picked from commit 2de259f)
@ttuegel
Copy link
Member

ttuegel commented Oct 9, 2015

It's better to set --argv0 "$f" in most cases, which I just did in master and release-15.09.

adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
Fixes NixOS#10290. Lilypond finds its Guile libraries by looking at the path
in argv[0], so it should be hardcoded to the real absolute path to the
executable.

(cherry picked from commit 2de259f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

4 participants