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
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
cblas
for example in the eyes of a program using pkg-config, it needs to provide a.pc
file 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-pc
andopenblas-cblas-pc
speperately (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
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)