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

guile-opengl: fix dynamic loading of libraries #87281

wants to merge 1 commit into
base: master


Copy link

KoviRobi commented May 8, 2020

This uses the absolute path for libraries when opening them at runtime

Previously, the libGL, glu and freeglut weren't dependencies, now they are

$ nix-store -q --references guile-opengl-new 
$ nix-store -q --references guile-opengl-old 

I do wonder if there is a better way we could do this (i.e. doesn't Mac OSX have different file extensions for the libraries)? Perhaps somehow we could make autoconf find the libraries, and use the path it found? (I don't know much about autoconf). But this doesn't actually matter here, as the build platforms are linux only.

Guile-opengl doesn't seem to have any referrers, so I don't think this changes anything. I'm trying to package inspekt3d (, and spotted this problem.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits
Copy link
Contributor Author

KoviRobi commented May 8, 2020

This package (or perhaps the guile package setup hooks, as the libraries are in lib/guile/2.2/ccache/*) has a bug where the compiled objects aren't loaded by guile, so I'll investigate that further.

In the meanwhile, you can test it with, e.g.

$ wget
$ nix-shell -p guile guile-opengl -I nixpkgs=`pwd` # wherever the checkout is
$ export GUILE_LOAD_COMPILED_PATH=${GUILE_LOAD_COMPILED_PATH/share\/guile\/site\/2.2/lib\/guile\/2.2\/ccache}
$ guile vbo.scm

(I have tested it, it now works, it didn't work previously.)

Copy link
Contributor Author

KoviRobi commented May 23, 2020

#88720 fixes the problem with the GUILE_LOAD_COMPILED_PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.