Issue in libyang compilation for FRR
ChinmayaAgarwal opened this issue · comments
Description
We are trying to cross-compile libyang 2.1.128 for FRR 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 ?
Version
Frr 10.0
How to reproduce
Cross compile frr on power pc architecture
Expected behavior
Libyang should have built successfully
Actual behavior
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)
Additional context
No response
Checklist
- I have searched the open issues for this bug.
- I have not included sensitive information in this report.
How do you build? You should include --enable-pcre2posix
.
Please open an issue with the libyang people. This is not the appropriate place to get help for libyang2 issues.
We have been able to compile libyang successfully. We are following FRR's link for cross compilation (https://docs.frrouting.org/projects/dev-guide/en/latest/cross-compiling.html). We have been able to configure (../configure --enable-clippy-only) clippy but facing below issue in "make clippy-only": -
Must remake target 'lib/clippy'.
CCLD lib/clippy
lib/lib_clippy-defun_lex.o: In function `clippy_parse':
/root/frr/build-clippy/../lib/defun_lex.l:239: undefined reference to `PyArg_ParseTuple'
/root/frr/build-clippy/../lib/defun_lex.l:252: undefined reference to `PyDict_New'
/root/frr/build-clippy/../lib/defun_lex.l:253: undefined reference to `PyList_New'
/root/frr/build-clippy/../lib/defun_lex.l:254: undefined reference to `PyUnicodeUCS2_FromString'
/root/frr/build-clippy/../lib/defun_lex.l:254: undefined reference to `PyDict_SetItemString'
/root/frr/build-clippy/../lib/defun_lex.l:255: undefined reference to `PyDict_SetItemString'
/root/frr/build-clippy/../lib/defun_lex.l:283: undefined reference to `PyDict_New'
/root/frr/build-clippy/../lib/defun_lex.l:284: undefined reference to `PyUnicodeUCS2_FromString'
/root/frr/build-clippy/../lib/defun_lex.l:284: undefined reference to `PyDict_SetItemString'
/root/frr/build-clippy/../lib/defun_lex.l:285: undefined reference to `PyUnicodeUCS2_FromString'
/root/frr/build-clippy/../lib/defun_lex.l:285: undefined reference to `PyDict_SetItemString'
/root/frr/build-clippy/../lib/defun_lex.l:290: undefined reference to `PyLong_FromLong'
/root/frr/build-clippy/../lib/defun_lex.l:290: undefined reference to `PyDict_SetItemString'
/root/frr/build-clippy/../lib/defun_lex.l:291: undefined reference to `PyList_Append'
lcollect2: error: ld returned 1 exit status
Makefile:7576: recipe for target 'lib/clippy' failed
make: *** [lib/clippy] Error 1
root@mclican-fsl-toolchain:~/frr/build-clippy#
However, we have resolved the python dependencies while configuring clippy but facing python related issue again during make.
Any pointers here to resolve this issue?