pgroonga / docker

Dockerfile for PGroonga
https://hub.docker.com/r/groonga/pgroonga
MIT License
35 stars 9 forks source link

Use CMake to build Groonga in Alpine Linux images #40

Closed kou closed 4 months ago

kou commented 4 months ago

https://github.com/pgroonga/docker/blob/main/alpine/build.sh

Note: We don't need to build MeCab separately with CMake based build system.

otegami commented 4 months ago

I will take it from now on.

otegami commented 4 months ago

I will try to resolve this issue at the following steps.

otegami commented 4 months ago

Build alpine-12-slim's docker image at the local using CMake

otegami commented 4 months ago

I will check which current options should be migrated to CMake options.

./configure \
  --prefix=/usr/local \
  --disable-groonga-httpd \
  --disable-document \
  --disable-glibtest \
  --disable-benchmark \
  --enable-mruby
otegami commented 4 months ago

I think we had better use release-maximum presets.

otegami commented 4 months ago

I will add libraries by APT to pass the following commands on my local docker environment.

cmake \
  -S . \
  -B ../groonga.build \
  --preset=release-maximum \
  -DCMAKE_INSTALL_PREFIX="/usr/local"
cmake --build ../groonga.build
cmake --install ../groonga.build
otegami commented 4 months ago

/host/alpine/build/groonga-14.0.2# cmake -S . -B ../groonga.build --preset=release-maximum -DCMAKE_INSTALL_PREFIX=/usr/local bash: cmake: command not found

$ apk add cmake
otegami commented 4 months ago

614ec8b37355:/host/alpine/build/groonga-14.0.2# cmake -S . -B ../groonga.build --preset=release-maximum -DCMAKE_INSTALL_PREFIX=/usr/local Preset CMake variables:

CMAKE_BUILD_TYPE="Release" CMAKE_EXPORT_COMPILE_COMMANDS="ON" GRN_WITH_APACHE_ARROW="ON" GRN_WITH_BLOSC="auto" GRN_WITH_MRUBY="ON"

-- CMake: 3.29.3 CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred!

$ apk add ninja-build
otegami commented 4 months ago

614ec8b37355:/host/alpine/build/groonga-14.0.2# rm -rf ../groonga.build && cmake -S . -B ../groonga.build --preset=release-maximum -GNinja -DCMAKE_INSTALL_PREFIX=/usr/local Preset CMake variables:

CMAKE_BUILD_TYPE="Release" CMAKE_EXPORT_COMPILE_COMMANDS="ON" GRN_WITH_APACHE_ARROW="ON" GRN_WITH_BLOSC="auto" GRN_WITH_MRUBY="ON"

-- CMake: 3.29.3 CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! 614ec8b37355:/host/alpine/build/groonga-14.0.2# apk search ninja ninja-build-1.12.1-r0 ninja-is-really-ninja-1.12.1-r0 samurai-1.2-r5

otegami commented 4 months ago
614ec8b37355:/host/alpine/build/groonga-14.0.2# ls -la /usr/bin | grep ninja
614ec8b37355:/host/alpine/build/groonga-14.0.2# ls -la /usr/local/bin | grep ninja
614ec8b37355:/host/alpine/build/groonga-14.0.2# apk info -L ninja-build
ninja-build-1.12.1-r0 contains:
usr/lib/ninja-build/bin/ninja
614ec8b37355:/host/alpine/build/groonga-14.0.2# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
614ec8b37355:/host/alpine/build/groonga-14.0.2# export PATH=$PATH:/usr/lib/ninja-build/bin
614ec8b37355:/host/alpine/build/groonga-14.0.2# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/ninja-build/bin
614ec8b37355:/host/alpine/build/groonga-14.0.2# ninja --version
1.12.1
$ apk add ninja-build
$ export PATH=$PATH:/usr/lib/ninja-build/bin
otegami commented 4 months ago
614ec8b37355:/host/alpine/build/groonga-14.0.2# rm -rf ../groonga.build && cmake -S . -B ../groonga.build --preset=release-maximum -GNinja -DCMAKE_INSTALL_PREFIX=/usr/local
CMake Error at CMakeLists.txt:531 (find_package):
  By not providing "FindArrow.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Arrow", but
  CMake did not find one.

  Could not find a package configuration file provided by "Arrow" with any of
  the following names:

    ArrowConfig.cmake
    arrow-config.cmake

  Add the installation prefix of "Arrow" to CMAKE_PREFIX_PATH or set
  "Arrow_DIR" to a directory containing one of the above files.  If "Arrow"
  provides a separate development package or SDK, be sure it has been
  installed.
otegami commented 4 months ago
# apk add libarrow
otegami commented 4 months ago
614ec8b37355:/host/alpine/build/groonga-14.0.2# rm -rf ../groonga.build && cmake -S . -B ../groonga.build --preset=release-maximum -GNinja -DCMAKE_INSTALL_PREFIX=/usr/local
CMake Error at CMakeLists.txt:531 (find_package):
  By not providing "FindArrow.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Arrow", but
  CMake did not find one.

  Could not find a package configuration file provided by "Arrow" with any of
  the following names:

    ArrowConfig.cmake
    arrow-config.cmake

  Add the installation prefix of "Arrow" to CMAKE_PREFIX_PATH or set
  "Arrow_DIR" to a directory containing one of the above files.  If "Arrow"
  provides a separate development package or SDK, be sure it has been
  installed.
otegami commented 4 months ago

We should install libarrow in another way because this package doesn't include dev infos.

614ec8b37355:/host/alpine/build/groonga-14.0.2# apk info -L libarrow
libarrow-16.1.0-r0 contains:
usr/lib/libarrow.so.1601
usr/lib/libarrow.so.1601.0.0
otegami commented 4 months ago
614ec8b37355:/host/alpine/build/groonga-14.0.2# apk del libarrow
614ec8b37355:/host/alpine/build/groonga-14.0.2# apk add apache-arrow-dev
614ec8b37355:/host/alpine/build/groonga-14.0.2# apk info -L apache-arrow-dev | grep arrow-config.cmake
usr/lib/cmake/Arrow/arrow-config.cmake
otegami commented 4 months ago
614ec8b37355:/host/alpine/build/groonga-14.0.2# rm -rf ../groonga.build && cmake -S . -B ../groonga.build --preset=release-maximum -DCMAKE_INSTALL_PREFIX=/usr/local
...
CMake Error in lib/CMakeLists.txt:
  Target "grn_dependencies" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in lib/CMakeLists.txt:
  Target "grn_dependencies" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in src/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in src/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in src/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in src/suggest/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/suggest/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/tokenizers/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/tokenizers/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/query_expanders/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/token_filters/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/functions/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/functions/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/functions/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/functions/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/functions/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/functions/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

CMake Error in plugins/functions/CMakeLists.txt:
  Target "libgroonga" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "include"

-- Generating done (0.2s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
otegami commented 4 months ago

I will try to do it in my local environment.

otegami commented 4 months ago

It's fine at the following environment.

$ cmake --version
cmake version 3.22.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
$ rm -rf ../groonga.build && cmake -S . -B ../groonga.build --preset=release-maximum -DCMAKE_INSTALL_PREFIX=/tmp/local/
otegami commented 4 months ago
614ec8b37355:/host/alpine/build/groonga-14.0.2# cmake --version
cmake version 3.29.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
614ec8b37355:/host/alpine/build/groonga-14.0.2# cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.20.1
PRETTY_NAME="Alpine Linux v3.20"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
otegami commented 4 months ago

I will read this one later. ref: https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_INCLUDE_DIRECTORIES.html

kou commented 4 months ago

We should use samurai not Ninja on Alpine Linux.

kou commented 4 months ago

まず、/CMakeLists.txttarget_link_libraries(grn_dependencies ...)しているCMakeターゲットのうち、どのターゲットのINTERFACE_INCLUDE_DIRECTORIESターゲットプロパティにincludeが含まれているのかを特定します。 ターゲットプロパティは https://cmake.org/cmake/help/latest/command/get_target_property.html で取得できます。 https://cmake.org/cmake/help/latest/command/get_target_property.html でデバッグプリントできます。

kou commented 4 months ago

--preset=release-minimumでも発生するんですか?

otegami commented 4 months ago

relase-default でどうなるか確認してみます。

# cmake --list-presets | grep release
  "release-default"                 - Optional features may not be enabled (release build)
  "release-with-debug-info-default" - Optional features may not be enabled (release build with debug info)
  "release-maximum"                 - Enable all features (release build)
  "release-with-debug-info-maximum" - Enable all features (release build with debug info)
otegami commented 4 months ago

We should use samurai not Ninja on Alpine Linux.

ありがとうございます。samurai でpathを通さなくてもうまく入りました。

$ apk add samurai
$ apk info -L samurai
samurai-1.2-r5 contains:
usr/bin/ninja
usr/bin/samu
otegami commented 4 months ago

relase-default でも変わらずだったので、下記のコメントを参考に見ていきます!

$ rm -rf ../groonga.build && cmake -S . -B ../groonga.build --preset=release-default -DCMAKE_INSTALL_PREFIX=/usr/local/
otegami commented 4 months ago

とりあえず、デバック結果を出してみた。

# ./CMakeLists.txt
get_target_property(linked_targets grn_dependencies INTERFACE_LINK_LIBRARIES)
foreach(target ${linked_targets})
  message(STATUS "INTERFACE_LINK_LIBRARIES: ${target}")
endforeach()

get_target_property(linked_targets grn_dependencies INTERFACE_LINK_LIBRARIES)
foreach(target ${linked_targets})
  if(TARGET ${target})
    get_target_property(include_dirs ${target} INTERFACE_INCLUDE_DIRECTORIES)
    message(STATUS "Target: ${target}, include_dir: ${include_dirs}")
  else()
    message(STATUS "Target: ${target} doesn't exist")
  endif()
endforeach()
$ rm -rf ../groonga.build && cmake -S . -B ../groonga.build --preset=release-default -DCMAKE_INSTALL_PREFIX=/usr/local
...
-- INTERFACE_LINK_LIBRARIES: rt
-- INTERFACE_LINK_LIBRARIES: PkgConfig::Groongazstd_pkg_libzstd
-- INTERFACE_LINK_LIBRARIES: Groonga::RapidJSON
-- INTERFACE_LINK_LIBRARIES: Groonga::msgpackc
-- INTERFACE_LINK_LIBRARIES: PkgConfig::Groongalz4_pkg_liblz4
-- INTERFACE_LINK_LIBRARIES: xsimd
-- INTERFACE_LINK_LIBRARIES: h3
-- INTERFACE_LINK_LIBRARIES: onigmo
-- Target: rt doesn't exist
-- Target: PkgConfig::Groongazstd_pkg_libzstd, include_dir: /usr/include
-- Target: Groonga::RapidJSON, include_dir: $<BUILD_INTERFACE:/host/alpine/build/groonga.build/rapidjson-ep-install/include>
-- Target: Groonga::msgpackc, include_dir: include
-- Target: PkgConfig::Groongalz4_pkg_liblz4, include_dir: /usr/include
-- Target: xsimd, include_dir: $<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/xsimd-src/include>;$<INSTALL_INTERFACE:include>;$<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/xsimd-src/include>
-- Target: h3, include_dir: $<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/h3-src/src/h3lib/include>;$<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/h3-build/src/h3lib/include>
-- Target: onigmo, include_dir: /host/alpine/build/groonga-14.0.2/vendor/onigmo/../onigmo-source
-- Configuring done (7.7s)
...
otegami commented 4 months ago

下記が相対pathになっているのが問題かな?

-- Target: Groonga::msgpackc, include_dir: include
otegami commented 4 months ago

INTERFACE_INCLUDE_DIRECTORIESが、なぜ相対パスになっているのかを調べていく。

otegami commented 4 months ago

target_include_directoriesINSTALL_INTERFACEinclude を指定しているのが問題ではないのかなぁと考えている。 なぜなら、ここで指定した値が INTERFACE_INCLUDE_DIRECTORIES に反映されると理解しているため

otegami commented 4 months ago

CMaketarget_include_directoriesの説明を読むと、相対パスを指定しても良い感じに Prefix を設定して絶対パスにしてくれそうなのが気になっている。 実際に debug してみると、相対パスのままなので、ここの矛盾で困っている。

Include directories usage requirements commonly differ between the build-tree and the install-tree. The BUILD_INTERFACE and INSTALL_INTERFACE generator expressions can be used to describe separate usage requirements based on the usage location. Relative paths are allowed within the INSTALL_INTERFACE expression and are interpreted as relative to the installation prefix. Relative paths should not be used in BUILD_INTERFACE expressions because they will not be converted to absolute. For example:
otegami commented 4 months ago

その前にどの手段で msgpack-c を参照ているのかを確認する。

https://github.com/groonga/groonga/blob/3bd8ae763b6070cd3d0f8f0025616fd705a639a4/cmake/FindGroongamsgpackc.cmake#L30-L96

komainu8 commented 4 months ago

message()を使ってデバッグ用のメッセージを出して、どのルートを通っているか確認する。 デバッグ用のメッセージを実装中。

komainu8 commented 4 months ago

https://github.com/groonga/groonga/blob/3bd8ae763b6070cd3d0f8f0025616fd705a639a4/cmake/FindGroongamsgpackc.cmake#L67-L95 を通るならmsgpack-c.pcを使った検出。

https://github.com/groonga/groonga/blob/3bd8ae763b6070cd3d0f8f0025616fd705a639a4/cmake/FindGroongamsgpackc.cmake#L30C1-L65 のどこかを通るならmsgpack-c-config.cmakemsgpackc-config.cmakemsgpack-config.cmakeを使った検出。ということになる。

komainu8 commented 4 months ago

https://github.com/groonga/groonga/blob/main/cmake/FindGroongamsgpackc.cmake#L34 で検出していることがわかった。

otegami commented 4 months ago
$ rm -rf ../groonga.build && cmake -S . -B ../groonga.build --preset=release-maximum -DCMAKE_INSTALL_PREFIX=/usr/local > configuration.log
$ cat configuration.log | grep msgpack
-- find_package(msgpack-c find_package_args): 1
-- Groongamsgpackc_FOUND: 1: msgpack-c
-- Found Groongamsgpackc: TRUE
 * msgpack-c
 * Groongamsgpackc
otegami commented 4 months ago
diff --git a/cmake/FindGroongamsgpackc.cmake b/cmake/FindGroongamsgpackc.cmake
index ce151016f..5e3fc7ffb 100644
--- a/cmake/FindGroongamsgpackc.cmake
+++ b/cmake/FindGroongamsgpackc.cmake
@@ -14,6 +14,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

 if(Groongamsgpackc_FOUND)
+  message(STATUS "Groongamsgpackc is found")
   return()
 endif()

@@ -30,9 +31,12 @@ endif()
 find_package(msgpack-c ${find_package_args})
 set(Groongamsgpackc_FOUND ${msgpack-c_FOUND})
 if(Groongamsgpackc_FOUND)
+  message(STATUS "find_package(msgpack-c find_package_args): ${Groongamsgpackc_FOUND}")
   if(TARGET msgpack-c)
+    message(STATUS "Groongamsgpackc_FOUND: ${Groongamsgpackc_FOUND}: msgpack-c")
     add_library(Groonga::msgpackc ALIAS msgpack-c)
   else()
+    message(STATUS "Groongamsgpackc_FOUND: ${Groongamsgpackc_FOUND}: msgpack-c-static")
     add_library(Groonga::msgpackc ALIAS msgpack-c-static)
   endif()
 endif()
@@ -41,9 +45,12 @@ if(NOT Groongamsgpackc_FOUND)
   find_package(msgpackc ${find_package_args})
   set(Groongamsgpackc_FOUND ${msgpackc_FOUND})
   if(Groongamsgpackc_FOUND)
+  message(STATUS "find_package(msgpackc find_package_args): ${Groongamsgpackc_FOUND}")
     if(TARGET msgpackc)
+      message(STATUS "msgpackc")
       add_library(Groonga::msgpackc ALIAS msgpackc)
     else()
     endif()
     set(Groongamsgpackc_FOUND ${Groongamsgpack_pkg_msgpack-c_FOUND})
     if(Groongamsgpackc_FOUND)
+      message(STATUS "find_package(PkgConfig) msgpack-c: ${Groongamsgpack_pkg_msgpack-c_FOUND}")
       add_library(Groonga::msgpackc ALIAS
                   PkgConfig::Groongamsgpack_pkg_msgpack-c)
     else()
@@ -88,6 +99,7 @@ if(NOT Groongamsgpackc_FOUND)
       endif()
       set(Groongamsgpackc_FOUND ${Groongamsgpack_pkg_msgpack_FOUND})
       if(Groongamsgpackc_FOUND)
+        message(STATUS "find_package(PkgConfig): msgpackc: ${Groongamsgpack_pkg_msgpack-c_FOUND}")
         add_library(Groonga::msgpackc ALIAS
                     PkgConfig::Groongamsgpack_pkg_msgpack)
       endif()
otegami commented 4 months ago

マシンの再起動が入り Docker 環境がリセットされてしまったので再度環境を構築すると、なぜか error 無しで通るようになった。 INTERFACE_INCLUDE_DIRECTORIES を同様に確認してみる。

otegami commented 4 months ago
$ rm -rf ../groonga.build && cmake -S . -B ../groonga.build --preset=release-maximum -DCMAKE_INSTALL_PREFIX=/usr/local
...
-- Target: rt doesn't exist
-- Target: Arrow::arrow_shared, include_dir: /usr/include
-- Target: PkgConfig::Groongazstd_pkg_libzstd, include_dir: /usr/include
-- Target: Groonga::RapidJSON, include_dir: $<BUILD_INTERFACE:/host/alpine/build/groonga.build/rapidjson-ep-install/include>
-- Target: Groonga::msgpackc, include_dir: /usr/include
-- Target: PkgConfig::Groongalz4_pkg_liblz4, include_dir: /usr/include
-- Target: blosc2_static, include_dir: $<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/blosc-src/blosc>;$<INSTALL_INTERFACE:include>;$<TARGET_PROPERTY:PkgConfig::Groongalz4_pkg_liblz4,INTERFACE_INCLUDE_DIRECTORIES>;$<TARGET_PROPERTY:PkgConfig::Groongazstd_pkg_libzstd,INTERFACE_INCLUDE_DIRECTORIES>;$<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/blosc-src/include>
-- Target: xsimd, include_dir: $<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/xsimd-src/include>;$<INSTALL_INTERFACE:include>;$<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/xsimd-src/include>
-- Target: h3, include_dir: $<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/h3-src/src/h3lib/include>;$<BUILD_INTERFACE:/host/alpine/build/groonga.build/_deps/h3-build/src/h3lib/include>
-- Target: mruby, include_dir: /host/alpine/build/groonga-14.0.2/vendor/mruby/../mruby-source/include
-- Target: onigmo, include_dir: /host/alpine/build/groonga-14.0.2/vendor/onigmo/../onigmo-source
-- Configuring done (15.2s)
-- Generating done (0.3s)
-- Build files have been written to: /host/alpine/build/groonga.build

相対パスではなく絶対パスで参照しに行っていることがわかる。

-- Target: Groonga::msgpackc, include_dir: /usr/include
otegami commented 4 months ago

find_package(msgpack-c ${find_package_args}) で見つからないようにした場合、 pkg-configで見つけに行く、その場合は相対パスになり同様のエラーになる。

--- a/cmake/FindGroongamsgpackc.cmake
+++ b/cmake/FindGroongamsgpackc.cmake
@@ -28,11 +29,14 @@ if(Groongamsgpackc_FIND_QUIETLY)
 endif()

 find_package(msgpack-c ${find_package_args})
-set(Groongamsgpackc_FOUND ${msgpack-c_FOUND})
+set(Groongamsgpackc_FOUND 0)
komainu8 commented 4 months ago

つまり、 https://github.com/groonga/groonga/blob/3bd8ae763b6070cd3d0f8f0025616fd705a639a4/cmake/FindGroongamsgpackc.cmake#L67-L95 で検出されると再現する。(エラーになる。)

https://github.com/groonga/groonga/blob/main/cmake/FindGroongamsgpackc.cmake#L34 で検出されれば正しく動く。

otegami commented 4 months ago

現時点で必要だった package 一覧

$ apk add cmake
$ apk add samurai
$ apk add apache-arrow-dev
otegami commented 4 months ago

fork 元 or 手元でビルドできるか確認中 でき次第他にも反映をして PR にしていく。

otegami commented 4 months ago

CI で確認してみたが 相対パスになっている。 まっさらな環境で手元で再確認して、どの分岐に入るかを再確認する。

https://github.com/otegami/pgroonga-docker/actions/runs/9643415321/job/26593367985

kou commented 4 months ago

https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_DEBUG_MODE.html を使うとどのパスを検索してどんな結果になったかがわかるよ。

otegami commented 4 months ago
diff --git a/alpine/build.sh b/alpine/build.sh
index 38381ef..da8f593 100755
--- a/alpine/build.sh
+++ b/alpine/build.sh
@@ -44,7 +44,8 @@ cmake \
   -S . \
   -B ../groonga.build \
   --preset=release-maximum \
-  -DCMAKE_INSTALL_PREFIX=/usr/local
+  --debug-find \
  -DCMAKE_INSTALL_PREFIX=/usr/local
 cmake --build ../groonga.build
 cmake --install ../groonga.build
 cd -
$ cmake \
  -S . \
  -B ../groonga.build \
  --preset=release-maximum \
  --debug-find \
  -DCMAKE_INSTALL_PREFIX=/usr/local
log ``` 103.6 CMake Warning at cmake/FindGroongamsgpackc.cmake:29 (find_package): 103.6 By not providing "Findmsgpackc.cmake" in CMAKE_MODULE_PATH this project has 103.6 asked CMake to find a package configuration file provided by "msgpackc", 103.6 but CMake did not find one. 103.6 103.6 Could not find a package configuration file provided by "msgpackc" with any 103.6 of the following names: 103.6 103.6 msgpackcConfig.cmake 103.6 msgpackc-config.cmake 103.6 103.6 Add the installation prefix of "msgpackc" to CMAKE_PREFIX_PATH or set 103.6 "msgpackc_DIR" to a directory containing one of the above files. If 103.6 "msgpackc" provides a separate development package or SDK, be sure it has 103.6 been installed. 103.6 Call Stack (most recent call first): 103.6 CMakeLists.txt:895 (find_package) 103.6 103.6 103.6 CMake Debug Log at cmake/FindGroongamsgpackc.cmake:29 (find_package): 103.6 find_package considered the following paths for Findmsgpackc.cmake: 103.6 103.6 /build/groonga-14.0.2/cmake/Findmsgpackc.cmake 103.6 /usr/share/cmake/Modules/Findmsgpackc.cmake 103.6 103.6 The file was not found. 103.6 103.6 The internally managed CMAKE_FIND_PACKAGE_REDIRECTS_DIR. 103.6 103.6 /build/groonga.build/CMakeFiles/pkgRedirects 103.6 103.6 _ROOT CMake variable [CMAKE_FIND_USE_PACKAGE_ROOT_PATH]. 103.6 103.6 none 103.6 103.6 CMAKE_PREFIX_PATH variable [CMAKE_FIND_USE_CMAKE_PATH]. 103.6 103.6 none 103.6 103.6 CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH variables 103.6 [CMAKE_FIND_USE_CMAKE_PATH]. 103.6 103.6 none 103.6 103.6 Env variable msgpackc_DIR [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH]. 103.6 103.6 none 103.6 103.6 CMAKE_PREFIX_PATH env variable [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH]. 103.6 103.6 none 103.6 103.6 CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH env variables 103.6 [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH]. 103.6 103.6 none 103.6 103.6 Paths specified by the find_package HINTS option. 103.6 103.6 none 103.6 103.6 Standard system environment variables 103.6 [CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH]. 103.6 103.6 /usr/local 103.6 /usr 103.6 / 103.6 103.6 CMake User Package Registry [CMAKE_FIND_USE_PACKAGE_REGISTRY]. 103.6 103.6 none 103.6 103.6 CMake variables defined in the Platform file 103.6 [CMAKE_FIND_USE_CMAKE_SYSTEM_PATH]. 103.6 103.6 /usr/X11R6 103.6 /usr/pkg 103.6 /opt 103.6 103.6 CMake System Package Registry 103.6 [CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY]. 103.6 103.6 none 103.6 103.6 Paths specified by the find_package PATHS option. 103.6 103.6 none 103.6 103.6 find_package considered the following locations for msgpackc's Config 103.6 module: 103.6 103.6 /build/groonga.build/CMakeFiles/pkgRedirects/msgpackcConfig.cmake 103.6 /build/groonga.build/CMakeFiles/pkgRedirects/msgpackc-config.cmake 103.6 /usr/local/msgpackcConfig.cmake 103.6 /usr/local/msgpackc-config.cmake 103.6 /usr/msgpackcConfig.cmake 103.6 /usr/msgpackc-config.cmake 103.6 /msgpackcConfig.cmake 103.6 /msgpackc-config.cmake 103.6 /opt/msgpackcConfig.cmake 103.6 /opt/msgpackc-config.cmake 103.6 103.6 The file was not found. 103.6 103.6 Call Stack (most recent call first): 103.6 CMakeLists.txt:895 (find_package) 103.6 103.6 103.6 CMake Warning at cmake/FindGroongamsgpackc.cmake:40 (find_package): 103.6 By not providing "Findmsgpack.cmake" in CMAKE_MODULE_PATH this project has 103.6 asked CMake to find a package configuration file provided by "msgpack", but 103.6 CMake did not find one. 103.6 103.6 Could not find a package configuration file provided by "msgpack" with any 103.6 of the following names: 103.6 103.6 msgpackConfig.cmake 103.6 msgpack-config.cmake 103.6 103.6 Add the installation prefix of "msgpack" to CMAKE_PREFIX_PATH or set 103.6 "msgpack_DIR" to a directory containing one of the above files. If 103.6 "msgpack" provides a separate development package or SDK, be sure it has 103.6 been installed. 103.6 Call Stack (most recent call first): 103.6 CMakeLists.txt:895 (find_package) 103.6 103.6 103.6 CMake Debug Log at cmake/FindGroongamsgpackc.cmake:40 (find_package): 103.6 find_package considered the following paths for Findmsgpack.cmake: 103.6 103.6 /build/groonga-14.0.2/cmake/Findmsgpack.cmake 103.6 /usr/share/cmake/Modules/Findmsgpack.cmake 103.6 103.6 The file was not found. 103.6 103.6 The internally managed CMAKE_FIND_PACKAGE_REDIRECTS_DIR. 103.6 103.6 /build/groonga.build/CMakeFiles/pkgRedirects 103.6 103.6 _ROOT CMake variable [CMAKE_FIND_USE_PACKAGE_ROOT_PATH]. 103.6 103.6 none 103.6 103.6 CMAKE_PREFIX_PATH variable [CMAKE_FIND_USE_CMAKE_PATH]. 103.6 103.6 none 103.6 103.6 CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH variables 103.6 [CMAKE_FIND_USE_CMAKE_PATH]. 103.6 103.6 none 103.6 103.6 Env variable msgpack_DIR [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH]. 103.6 103.6 none 103.6 103.6 CMAKE_PREFIX_PATH env variable [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH]. 103.6 103.6 none 103.6 103.6 CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH env variables 103.6 [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH]. 103.6 103.6 none 103.6 103.6 Paths specified by the find_package HINTS option. 103.6 103.6 none 103.6 103.6 Standard system environment variables 103.6 [CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH]. 103.6 103.6 /usr/local 103.6 /usr 103.6 / 103.6 103.6 CMake User Package Registry [CMAKE_FIND_USE_PACKAGE_REGISTRY]. 103.6 103.6 none 103.6 103.6 CMake variables defined in the Platform file 103.6 [CMAKE_FIND_USE_CMAKE_SYSTEM_PATH]. 103.6 103.6 /usr/X11R6 103.6 /usr/pkg 103.6 /opt 103.6 103.6 CMake System Package Registry 103.6 [CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY]. 103.6 103.6 none 103.6 103.6 Paths specified by the find_package PATHS option. 103.6 103.6 none 103.6 103.6 find_package considered the following locations for msgpack's Config 103.6 module: 103.6 103.6 /build/groonga.build/CMakeFiles/pkgRedirects/msgpackConfig.cmake 103.6 /build/groonga.build/CMakeFiles/pkgRedirects/msgpack-config.cmake 103.6 /usr/local/msgpackConfig.cmake 103.6 /usr/local/msgpack-config.cmake 103.6 /usr/msgpackConfig.cmake 103.6 /usr/msgpack-config.cmake 103.6 /usr/lib/cmake/msgpack-c/msgpackConfig.cmake 103.6 /usr/lib/cmake/msgpack-c/msgpack-config.cmake 103.6 /msgpackConfig.cmake 103.6 /msgpack-config.cmake 103.6 /opt/msgpackConfig.cmake 103.6 /opt/msgpack-config.cmake 103.6 103.6 The file was not found. 103.6 103.6 Call Stack (most recent call first): 103.6 CMakeLists.txt:895 (find_package) 103.6 103.6 103.6 CMake Debug Log at cmake/FindGroongamsgpackc.cmake:55 (find_package): 103.6 find_package considered the following paths for FindPkgConfig.cmake: 103.6 103.6 /build/groonga-14.0.2/cmake/FindPkgConfig.cmake 103.6 103.6 The file was found at 103.6 103.6 /usr/share/cmake/Modules/FindPkgConfig.cmake 103.6 103.6 Call Stack (most recent call first): 103.6 CMakeLists.txt:895 (find_package) 103.6 103.6 103.6 -- Checking for module 'msgpack-c' 103.7 -- Found msgpack-c, version 6.0.1 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:302 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /build/groonga-14.0.2/lib/ to PATH_SUFFIXES for 103.7 architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:302 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /build/groonga-14.0.2/lib/ from PATH_SUFFIXES while adding 103.7 architecture paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:302 (find_library): 103.7 find_library called with the following settings: 103.7 103.7 VAR: pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c 103.7 NAMES: "msgpack-c" 103.7 Documentation: Path to a library. 103.7 Framework 103.7 Only Search Frameworks: 0 103.7 Search Frameworks Last: 0 103.7 Search Frameworks First: 0 103.7 AppBundle 103.7 Only Search AppBundle: 0 103.7 Search AppBundle Last: 0 103.7 Search AppBundle First: 0 103.7 NO_DEFAULT_PATH Enabled 103.7 103.7 find_library considered the following locations: 103.7 103.7 /build/groonga-14.0.2/lib/libmsgpack-c(\.so|\.a) 103.7 103.7 The item was not found. 103.7 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/local/sbin/ from PATH_SUFFIXES while adding 103.7 architecture paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /usr/local/bin/ to PATH_SUFFIXES for architecture suffix 103.7 '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/local/bin/ from PATH_SUFFIXES while adding 103.7 architecture paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /usr/sbin/ to PATH_SUFFIXES for architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/sbin/ from PATH_SUFFIXES while adding architecture 103.7 paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /usr/bin/ to PATH_SUFFIXES for architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/bin/ from PATH_SUFFIXES while adding architecture 103.7 paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /sbin/ to PATH_SUFFIXES for architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /sbin/ from PATH_SUFFIXES while adding architecture paths 103.7 for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /bin/ to PATH_SUFFIXES for architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /bin/ from PATH_SUFFIXES while adding architecture paths 103.7 for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /usr/local/lib/ to PATH_SUFFIXES for architecture suffix 103.7 '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/local/lib/ from PATH_SUFFIXES while adding 103.7 architecture paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /usr/local/ to PATH_SUFFIXES for architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/local/ from PATH_SUFFIXES while adding architecture 103.7 paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /usr/lib/ to PATH_SUFFIXES for architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/lib/ from PATH_SUFFIXES while adding architecture 103.7 paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /usr/ to PATH_SUFFIXES for architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/ from PATH_SUFFIXES while adding architecture paths 103.7 for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /lib/ to PATH_SUFFIXES for architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /lib/ from PATH_SUFFIXES while adding architecture paths 103.7 for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/X11R6/lib/ from PATH_SUFFIXES while adding 103.7 architecture paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/X11R6/ from PATH_SUFFIXES while adding architecture 103.7 paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/pkg/lib/ from PATH_SUFFIXES while adding architecture 103.7 paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/pkg/ from PATH_SUFFIXES while adding architecture 103.7 paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /opt/lib/ from PATH_SUFFIXES while adding architecture 103.7 paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) added 103.7 replacement path /opt/ to PATH_SUFFIXES for architecture suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /opt/ from PATH_SUFFIXES while adding architecture paths 103.7 for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library(pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c) removed 103.7 original suffix /usr/lib/X11/ from PATH_SUFFIXES while adding architecture 103.7 paths for suffix '64' 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 CMake Debug Log at /usr/share/cmake/Modules/FindPkgConfig.cmake:306 (find_library): 103.7 find_library called with the following settings: 103.7 103.7 VAR: pkgcfg_lib_Groongamsgpack_pkg_msgpack-c_msgpack-c 103.7 NAMES: "msgpack-c" 103.7 Documentation: Path to a library. 103.7 Framework 103.7 Only Search Frameworks: 0 103.7 Search Frameworks Last: 0 103.7 Search Frameworks First: 0 103.7 AppBundle 103.7 Only Search AppBundle: 0 103.7 Search AppBundle Last: 0 103.7 Search AppBundle First: 0 103.7 CMAKE_FIND_USE_CMAKE_PATH: 1 103.7 CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1 103.7 CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1 103.7 CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1 103.7 CMAKE_FIND_USE_INSTALL_PREFIX: 1 103.7 103.7 find_library considered the following locations: 103.7 103.7 /usr/local/bin/libmsgpack-c(\.so|\.a) 103.7 /usr/sbin/libmsgpack-c(\.so|\.a) 103.7 /usr/bin/libmsgpack-c(\.so|\.a) 103.7 /sbin/libmsgpack-c(\.so|\.a) 103.7 /bin/libmsgpack-c(\.so|\.a) 103.7 /usr/local/lib/libmsgpack-c(\.so|\.a) 103.7 /usr/local/libmsgpack-c(\.so|\.a) 103.7 103.7 The item was found at 103.7 103.7 /usr/lib/libmsgpack-c.so 103.7 103.7 Call Stack (most recent call first): 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:352 (_pkg_find_libs) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:690 (_pkg_recalculate) 103.7 /usr/share/cmake/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal) 103.7 cmake/FindGroongamsgpackc.cmake:58 (pkg_check_modules) 103.7 CMakeLists.txt:895 (find_package) 103.7 103.7 103.7 -- Found Groongamsgpackc: TRUE 103.7 CMake Debug Log at CMakeLists.txt:895 (find_package): 103.7 find_package considered the following paths for FindGroongamsgpackc.cmake: 103.7 103.7 /usr/share/cmake/Modules/FindGroongamsgpackc.cmake 103.7 103.7 The file was found at 103.7 103.7 /build/groonga-14.0.2/cmake/FindGroongamsgpackc.cmake ```
otegami commented 4 months ago

ありがとうございます! 早速 debug-find をつけて実行してみた。 探索している Path に usr/lib/cmake/msgpack-c/msgpack-c-config.cmakeは入っていなさそう。 msgpack-configを探しに行っちゃってもいそう。合わせて後ほどゆっくり見る。

kou commented 4 months ago

使っているGroongaが古そう。

kou commented 4 months ago

https://github.com/pgroonga/docker/issues/40#issuecomment-2186011665git diffの出力っぽいので、このときはGroongaのmainを使っていそう。

otegami commented 4 months ago

ありがとうございます! Groonga のバージョンを勘違いして進めていましたmm 下記の変更で検索する Path が期待通りになるので行けそうです。 ちょっとバージョン変更して試してみます。