Navigation Menu

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

mkl: fix .pc file, add test #103005

Merged
merged 2 commits into from Nov 8, 2020
Merged

mkl: fix .pc file, add test #103005

merged 2 commits into from Nov 8, 2020

Conversation

danieldk
Copy link
Contributor

@danieldk danieldk commented Nov 6, 2020

Motivation for this change

There was a spurious intel64 in some library paths, which is fixed
in the first commit.

The MKL pkg-config files often change and are then incorrect for our
paths. pkg-config validation finds some issues, but not incorrect
paths. The second commit adds a small test program to test whether the
generated pkg-config files can actually be used to build a functioning
binary. Hopefully this catches future regressions.

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 CONTRIBUTING.md.

There was a spurious `intel64` in some library paths.
The MKL pkg-config files often change and are then incorrect for our
paths. pkg-config validation finds some issues, but not incorrect
paths. So, add a small test program to test whether the generated
pkg-config files can actually be used to build a functioning
binary. Hopefully this catches future regressions.
@danieldk
Copy link
Contributor Author

danieldk commented Nov 8, 2020

@bhipple does this look ok to you?

@bhipple
Copy link
Contributor

bhipple commented Nov 8, 2020

Looks nice, ty as always for increasing the amount of automation we have here.

I wonder if the generic pkg-config checker could be enhances to run something like pkg-config --cflags --libs *.pc and verify all the paths on -L/foo -I/bar actually exist ...

@danieldk
Copy link
Contributor Author

danieldk commented Nov 8, 2020

I wonder if the generic pkg-config checker could be enhances to run something like pkg-config --cflags --libs *.pc and verify all the paths on -L/foo -I/bar actually exist ...

That would be a really nice feature to have. pkg-config validation is really limited. I recently looked a bit at parsing pc files directly, but I didn't have much time to investigate how tricky variable substitution would be. But just calling pkg-config and parsing the library paths might be a good alternative.

@danieldk danieldk merged commit 83401d1 into NixOS:master Nov 8, 2020
@danieldk danieldk deleted the fix-mkl-pkgconfig branch November 8, 2020 19:17
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