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

haskellPackages.cuda: Fixed broken dependency #36615

Merged
merged 1 commit into from Mar 9, 2018
Merged

Conversation

rdnetto
Copy link
Contributor

@rdnetto rdnetto commented Mar 9, 2018

Motivation for this change

haskellPackages.cuda currently fails to build with the following error:

Found CUDA toolkit at:
/nix/store/yqrc7zq74rpa26155vdfr4j503sn9n3q-cudatoolkit-9.1.85.1
Storing parameters to cuda.buildinfo.generated
Using build information from 'cuda.buildinfo.generated'.
Provide a 'cuda.buildinfo' file to override this behaviour.
Setup: Missing dependency on a foreign library:
* Missing C library: cudart
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
builder for ‘/nix/store/inin9v72pjmiy05r2z6yd4bwdql5ki68-cuda-0.9.0.1.drv’ failed with exit code 1

Inspecting the generated file and Nix store indicated that it was looking in the wrong directory for libcudart.so

Things done
  • bumped it 0.9.0.1 -> 0.9.0.2, to take advantage of this fix
  • changed lib dependency from cudatoolkit to cudatoolkit.lib (this fixes the error)
  • cleaned up redundant specification of lib64, which is just a symlink to lib
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@peti
Copy link
Member

peti commented Mar 9, 2018

@GrahamcOfBorg build haskellPackages.cuda

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

Package ‘cudatoolkit-9.1.85.1’ in /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-1-gustav.ewr1.nix.ci/pkgs/development/compilers/cudatoolkit/default.nix:145 has an unfree license (‘unfree’), refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Package ‘cudatoolkit-9.1.85.1’ in /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/pkgs/development/compilers/cudatoolkit/default.nix:145 has an unfree license (‘unfree’), refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘cudatoolkit-9.1.85.1’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/compilers/cudatoolkit/default.nix:145 has an unfree license (‘unfree’), refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

@peti
Copy link
Member

peti commented Mar 9, 2018

sigh

@peti peti merged commit 9132156 into NixOS:master Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants