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

Ensure blas produces pkg config files #67629

Merged
merged 3 commits into from Sep 3, 2019

Conversation

@idontgetoutmuch
Copy link
Contributor

idontgetoutmuch commented Aug 28, 2019

Motivation for this change

Some Haskell packages use PkgConfig-Depends: blas and currently the blas package doesn't produce these.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • [ x] 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 nix-review --run "nix-review wip"

I tried to use this but

nix-shell -I nixpkgs=~/nixpkgs -p nix-review --run "nix-review wip"
...
Has to be execute from nixpkgs repository

and

nix-shell -p nix-review --run "nix-review wip"
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13
  • 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 CONTRIBUTING.md.
Notify maintainers

cc @

There doesn't seem to be a maintainer (at least I couldn't find one in the default.nix)

@@ -44,6 +44,19 @@ stdenv.mkDerivation rec {
install ${dashD} -m755 libblas.so.${version} "$out/lib/libblas.so.${version}"
ln -s libblas.so.${version} "$out/lib/libblas.so.3"
ln -s libblas.so.${version} "$out/lib/libblas.so"
# Write pkgconfig aliases. Upstream report:
# https://github.com/xianyi/OpenBLAS/issues/1740

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Aug 28, 2019

Member

Upstream isn't relevant here. There might be a relevant issue tracker for blas though.

This comment has been minimized.

Copy link
@idontgetoutmuch

idontgetoutmuch Aug 28, 2019

Author Contributor

I think the discussion in that ticket is quite useful even though it is talking about openblas. I can remove the comment if that is going to stop this being accepted.

This comment has been minimized.

Copy link
@markuskowa

markuskowa Aug 28, 2019

Member

I actually find the comment misleading since blas and openblas are from very different sources.

@@ -44,6 +44,19 @@ stdenv.mkDerivation rec {
install ${dashD} -m755 libblas.so.${version} "$out/lib/libblas.so.${version}"
ln -s libblas.so.${version} "$out/lib/libblas.so.3"
ln -s libblas.so.${version} "$out/lib/libblas.so"
# Write pkgconfig aliases. Upstream report:
# https://github.com/xianyi/OpenBLAS/issues/1740

This comment has been minimized.

Copy link
@markuskowa

markuskowa Aug 28, 2019

Member

I actually find the comment misleading since blas and openblas are from very different sources.

# https://github.com/xianyi/OpenBLAS/issues/1740
# This is a copy from openblas/default.nix
mkdir $out/lib/pkgconfig
for alias in blas cblas lapack; do

This comment has been minimized.

Copy link
@markuskowa

markuskowa Aug 28, 2019

Member

This package only contains blas. cblas and lapack are not part of this package. However openblas provides those interfaces.

Name: $alias
Version: ${version}
Description: $alias provided by the BLAS package.
Cflags: -I$out/include

This comment has been minimized.

Copy link
@markuskowa

markuskowa Aug 28, 2019

Member

Since blas is a simple Fortran library it does not have includes. This is the complete file listing of nix-build -A blas:

result/
result/lib
result/lib/libblas.so.3
result/lib/libblas.so.3.8.0
result/lib/libblas.so
result/lib/libblas.a
@markuskowa

This comment has been minimized.

Copy link
Member

markuskowa commented Sep 3, 2019

@GrahamcOfBorg build blas
@GrahamcOfBorg build haskellPackages.blas-ffi haskellPackages.blas-hs

@markuskowa markuskowa merged commit 739cdb3 into NixOS:master Sep 3, 2019
19 checks passed
19 checks passed
haskellPackages.blas-ffi, haskellPackages.blas-hs on aarch64-linux No attempt
Details
haskellPackages.blas-ffi, haskellPackages.blas-hs on x86_64-darwin No attempt
Details
haskellPackages.blas-ffi, haskellPackages.blas-hs on x86_64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
blas on aarch64-linux Success
Details
blas on x86_64-darwin Success
Details
blas on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@idontgetoutmuch idontgetoutmuch deleted the idontgetoutmuch:noMergeMaster branch Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.