Repository navigation
openblas: add pkg-config aliases - #45257
Conversation
|
Would it be possible to just install these 3 files in the openblas derivation? IIUC its harmless to have multiple of them, so might as well aim for maximum compatiblity. |
|
I think that is what I meant by option 2. That would really be the easiest and nicest option. I just wasn't sure if it could be harmful. What would pkgconfig do if it finds multiple options? |
|
If it isn't harmful we may even suggest the inclusion upstream. |
|
Apparently upstream actually used to have this: OpenMathLib/OpenBLAS#1096 |
|
Upstream report: OpenMathLib/OpenBLAS#1740 |
|
I don't see a problem with including these in our OpenBLAS build. |
|
Upstream seems to more or less agree:
So I'll amend the PR to add the pkg-config files unconditionally and be based on stable. |
|
Done, but still testing. |
|
Okay, tests (built sage and tested it and its openblas-using dependencies) succeed. Upstream doesn't include it since it would conflict with other blas implementations providing the same pkgconfig files. Since nix's pkgconfig files are not system-wide, I think there is no issue here. A problem would only occur if a package depends on two blas implementations and depends on the So in summary I think this can't hurt. I'll merge this tomorrow if nobody complains. |
Motivation for this change
Openblas provides implementations for various standards. To be able to assume the place of
cblasfor example in the eyes of a program using pkg-config, it needs to provide a.pcfile telling pkg-config that it iscblas. Concretely, sage needs these pc files. I included this in sage but now I think this is not really sage specific.The current implementation adds those pc-files as independent packages that always assume openblasCompat. That is not ideal. Other implementations I could think of:
openblasCompat-cblas-pcandopenblas-cblas-pcspeperately (ugly)openblas. This would always include them and be the easiest option. Not sure if that could break something.What do you think @ttuegel?
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)