CESNET / libyang

YANG data modeling language library
BSD 3-Clause "New" or "Revised" License
355 stars 284 forks source link

Issue in libyang cross compilation #2247

Open ChinmayaAgarwal opened 1 month ago

ChinmayaAgarwal commented 1 month ago

Hi,

We are trying to cross-compile libyang 2.1.128 using custom toolchain and sysroot where we are facing issue with build not able to find PCRE2_LIBRARY

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find PCRE2 (missing: PCRE2_LIBRARY) (Required is at least version "10.21") Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE) CMakeModules/FindPCRE2.cmake:63 (find_package_handle_standard_args) CMakeLists.txt:405 (find_package)

What are the ways include PCRE2_LIBRARY ?

Thanks and Regards, Chinmaya Agarwal

jktjkt commented 1 month ago

I strongly suggest to use some existing, well-working tool for cross compilation such as Buildroot. Simply add a package/library there. You suggest that you're using some pre-existing sysroot; just make sure that CMake is aware of that sysroot and that the sysroot has pcre2 available.