Meson 找不到包,但 pc 文件是所有其他包所在的位置?
Meson cannot find package, but pc file is where all others are found?
目前我在尝试用介子编译时遇到这个错误:
../meson.build:96:0: ERROR: Dependency "cereal" not found, tried pkgconfig and cmake
但是,cereal.pc
文件位于构建目录中,其中还有大约 12 个 pc
文件(依赖项通过 conan 下载)。找到目录中的所有其他 pc 文件:
Dependency vulkan found: YES 1.2.162 (cached)
Dependency vulkan-memory-allocator found: YES 2.3.0 (cached)
Dependency glfw3 found: YES 3.3.4 (cached)
Dependency threads found: YES unknown (cached)
Dependency zlib found: YES 1.2.11 (cached)
Dependency shaderc found: YES 2019.0 (cached)
Dependency freetype2 found: YES 2.10.4 (cached)
Dependency stb found: YES 20200203 (cached)
Dependency tinygltf found: YES 2.5.0 (cached)
Dependency eigen3 found: YES 3.3.9 (cached)
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Found CMake: /usr/bin/cmake (3.18.4)
Run-time dependency cereal found: NO (tried pkgconfig and cmake)
../meson.build:106:0: ERROR: Dependency "cereal" not found, tried pkgconfig and cmake
如前所述,该文件与所有其他文件位于同一位置,并且处于同一目录级别。
pc 文件的名称确实是 cereal.pc
,这是文件的样子:
prefix=/home/makogan/.conan/data/cereal/1.3.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
libdir=${prefix}/lib
includedir=${prefix}/include
Name: cereal
Description: Serialization header-only library for C++11.
Version: 1.3.0
Libs: -L"${libdir}" -Wl,-rpath,"${libdir}"
Cflags: -I"${includedir}"
那里指定的路径确实存在,在 repo 中找到的文件似乎是正确的。
通过 rm -rf meson*
删除构建目录中的所有介子文件并重新编译似乎已解决问题。
目前我在尝试用介子编译时遇到这个错误:
../meson.build:96:0: ERROR: Dependency "cereal" not found, tried pkgconfig and cmake
但是,cereal.pc
文件位于构建目录中,其中还有大约 12 个 pc
文件(依赖项通过 conan 下载)。找到目录中的所有其他 pc 文件:
Dependency vulkan found: YES 1.2.162 (cached)
Dependency vulkan-memory-allocator found: YES 2.3.0 (cached)
Dependency glfw3 found: YES 3.3.4 (cached)
Dependency threads found: YES unknown (cached)
Dependency zlib found: YES 1.2.11 (cached)
Dependency shaderc found: YES 2019.0 (cached)
Dependency freetype2 found: YES 2.10.4 (cached)
Dependency stb found: YES 20200203 (cached)
Dependency tinygltf found: YES 2.5.0 (cached)
Dependency eigen3 found: YES 3.3.9 (cached)
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Found CMake: /usr/bin/cmake (3.18.4)
Run-time dependency cereal found: NO (tried pkgconfig and cmake)
../meson.build:106:0: ERROR: Dependency "cereal" not found, tried pkgconfig and cmake
如前所述,该文件与所有其他文件位于同一位置,并且处于同一目录级别。
pc 文件的名称确实是 cereal.pc
,这是文件的样子:
prefix=/home/makogan/.conan/data/cereal/1.3.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
libdir=${prefix}/lib
includedir=${prefix}/include
Name: cereal
Description: Serialization header-only library for C++11.
Version: 1.3.0
Libs: -L"${libdir}" -Wl,-rpath,"${libdir}"
Cflags: -I"${includedir}"
那里指定的路径确实存在,在 repo 中找到的文件似乎是正确的。
通过 rm -rf meson*
删除构建目录中的所有介子文件并重新编译似乎已解决问题。