libyang icon indicating copy to clipboard operation
libyang copied to clipboard

Issue in libyang cross compilation

Open ChinmayaAgarwal opened this issue 1 year ago • 1 comments

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

ChinmayaAgarwal avatar May 30 '24 14:05 ChinmayaAgarwal

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.

jktjkt avatar May 30 '24 14:05 jktjkt