Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
11.4.7
-
None
-
Not for Release Notes
Description
Problem
When installing the Mroonga plugin into a MariaDB 11.4.7 build on Windows without vcpkg, the CMake install step raises the following error.
-- Installing: …\install\lib\plugin\ha_mroonga.dll
|
-- Installing: …\install\symbols\ha_mroonga.pdb
|
CMake Error at storage/mroonga/cmake_install.cmake:58 (file):
|
file Could not resolve runtime dependencies:
|
|
groonga-llama.dll
|
libmecab.dll
|
Cause
This happens because in `CMakeLists.txt` the default for `INSTALL_RUNTIME_DEPENDENCIES` is inverted. Because vcpkg is not detected, `INSTALL_RUNTIME_DEPENDENCIES` is turned on, and the dependency scan only searches the (non-existent) vcpkg bin/ paths for runtime dependencies, so the bundled-built Groonga DLLs are never found.
IF(NOT DEFINED INSTALL_RUNTIME_DEPENDENCIES_DEFAULT)
|
- IF("${VCPKG_INSTALLED_DIR}")
|
- SET(INSTALL_RUNTIME_DEPENDENCIES_DEFAULT OFF)
|
- ELSE()
|
- SET(INSTALL_RUNTIME_DEPENDENCIES_DEFAULT ON)
|
+ IF("${VCPKG_INSTALLED_DIR}")
|
+ SET(INSTALL_RUNTIME_DEPENDENCIES_DEFAULT ON)
|
+ ELSE()
|
+ SET(INSTALL_RUNTIME_DEPENDENCIES_DEFAULT OFF)
|
ENDIF()
|
ENDIF()
|
OPTION(INSTALL_RUNTIME_DEPENDENCIES "Install runtime dependencies" "${INSTALL_RUNTIME_DEPENDENCIES_DEFAULT}") |
How to reproduce
On Windows without setting VCPKG_INSTALLED_DIR, configure MariaDB 11.4.7 with the Mroonga plugin.
Could you see it in detail.
https://github.com/mroonga/mroonga/blob/main/.github/workflows/windows.yml#L87-L234
Expected behavior
- With vcpkg: enable runtime-dependency scanning (ON) and point at the vcpkg bin/ directories.
- Without vcpkg: disable runtime-dependency scanning (OFF) so local Groonga DLLs install correctly without requiring vcpkg paths.
Thank you for all your hard work on MariaDB. If this understanding is correct, I’ll be happy to submit a pull request with the proposed fix.