简体   繁体   中英

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). Every other pc file in the directory is found:

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:

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.

Removing all meson files through rm -rf meson* inside the build directory and recompiling seems to have fixed the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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