简体   繁体   English

介子找不到 package,但 pc 文件是在哪里找到的?

[英]Meson cannot find package, but pc file is where all others are found?

Currently I am getting this error trying to compile with meson:目前我在尝试用介子编译时遇到这个错误:

../meson.build:96:0: ERROR: Dependency "cereal" not found, tried pkgconfig and cmake

However, the cereal.pc file is located on the build directory where about a 12 more pc files are found (dependencies are downloaded through conan).但是, cereal.pc文件位于 build 目录中,其中还有大约 12 个pc文件(依赖项通过 conan 下载)。 Every other pc file in the directory is found:找到目录中的每个其他 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

As mentioned, the file is in the same place as all others and at the same directory level.如前所述,该文件与所有其他文件位于同一位置并且处于同一目录级别。 The name of the pc file is indeed cereal.pc and this is what the file looks like: 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}"

The path specified in there does exist and the files found inside the repo seem to be correct.那里指定的路径确实存在,并且在 repo 中找到的文件似乎是正确的。

Removing all meson files through rm -rf meson* inside the build directory and recompiling seems to have fixed the problem.通过rm -rf meson*在构建目录中删除所有介子文件并重新编译似乎已经解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM