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

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

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

@markuskowa markuskowa merged commit 739cdb3 into NixOS:master Sep 3, 2019
@idontgetoutmuch idontgetoutmuch deleted the noMergeMaster branch September 3, 2019 15:35
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

3 participants