[openblas] Fix generating pkg-config file#12956
Conversation
wondering if a one line patch changing the if in openblas to
see #12626 |
|
Maybe just passing |
|
why keep PERL separate, it's built on MSYS2, not MSVC |
ef1f014 to
00add34
Compare
00add34 to
a3be38d
Compare
|
I've changed the PR to just apply a patch to generate the *.pc file unconditionally. Just setting A PR to upstream the changes to OpenBLAS can be found here: OpenMathLib/OpenBLAS#2785 |
|
@Neumann-A wrote in a different PR:
Do you mean the changes you apply here: https://github.com/microsoft/vcpkg/blob/master/ports/openblas/portfile.cmake#L91-L103 ? If yes, I will add them to the PR or open a new one, depending on what the OpenBLAS people prefer. And yes I am back due to lapack-reference being added. Thanks for the great work! I decided that this is a good reason to update all my third-party libraries. |
Yeah that are the changes i mean. A valid pc file always requires a valid prefix variable. You can make it relocatable with using pcfiledir. (Currently on mobile so correctly formatting or code references are a bit difficult.) |
I am not sure what the best way to write the pkg-config file for OpenBLAS would be then. I think using would not help much. And using would not necessarily be correct under all circumstances, as far as I understand (see https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html#special-cases). Making it based on (sorry, I do not have a lot of experience with generating pkg-config files in combination with |
same here ;) I think the problem with the gtest change is that the relative path to the prefix was hardcoded and not calculated. |
|
Thanks for your contribution! |
[openblas] Fix generating pkg-config file (microsoft#12956)
This PR makes sure that the pkg-config files are created correctly by the OpenBLAS configure/build steps.
OpenBLAS only creates the pkg-config files when pkg-config can be found during the CMake configure step (see https://github.com/xianyi/OpenBLAS/blob/efdd237a91646f0ce58815ef6507c04e393813a6/CMakeLists.txt#L392-L396).
To make sure the files are always created we find pkg-config beforehand and pass it to OpenBLAS CMake call via
-DPKG_CONFIG_EXECUTABLE.Some notes on the current implementation:
vcpkg_fixup_pkgconfigscript. I would prefer to add pkg-config tovcpkg_find_acquire_programbut I was not sure whether this is desired for a tool that will be installed throughmsyson windows.<vcpkg_root>\downloads\tools\perl\perl\binwas found, that is actually wrapped in a batch file and thus lead to errors afterwards. This might be important to take into account whenever vcpkg tries to find pkg-config.edit: an alternative way to fix this would be to patch the OpenBLAS CMake files to always generate the pkg-config, since to my best knowledge pkg-config is actually not required to generate the files. But I kind of preferred to not introduce another patch that would have to be maintained for the next OpenBLAS version.