FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.34k stars 1.25k forks source link

FRR installation issue. Not able to detect Libyang #16366

Open sachinshet1994 opened 3 months ago

sachinshet1994 commented 3 months ago

I am trying to install FRRouting in Ubuntu 22.04 OS. I tried 2 options of installing Libyang

  1. Debian packages
  2. Source Code packages

Both ways lead me to error after running below configure script:

sachin: ./configure \ --prefix=/usr \ --includedir=\${prefix}/include \ --bindir=\${prefix}/bin \ --sbindir=\${prefix}/lib/frr \ --libdir=\${prefix}/lib/frr \ --libexecdir=\${prefix}/lib/frr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-moduledir=\${prefix}/lib/frr/modules \ --enable-configfile-mask=0640 \ --enable-logfile-mask=0640 \ --enable-snmp=agentx \ --enable-multipath=64 \ --enable-user=frr \ --enable-group=frr \ --enable-vty-group=frrvty \ --with-pkg-git-version \ --with-pkg-extra-version=-MyOwnFRRVersion checking whether --sysconfdir option is FRR-specific... no, as expected checking whether --localstatedir option is FRR-specific... no, as expected checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for perl... /usr/bin/perl checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for g++... g++ checking whether the compiler supports GNU C++... yes checking whether g++ accepts -g... yes checking for g++ option to enable C++11 features... none needed checking dependency style of g++... gcc3 checking for pkg-config... (cached) /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for wchar.h... yes checking for minix/config.h... no checking whether it is safe to define EXTENSIONS... yes checking whether _XOPEN_SOURCE should be defined... no checking whether gcc supports -g... yes checking whether gcc supports -O2... yes checking whether gcc supports -fms-extensions... yes checking whether gcc supports -fno-omit-frame-pointer... yes checking whether gcc supports -funwind-tables... yes checking whether gcc supports -Wall... yes checking whether gcc supports -Wextra... yes checking whether gcc supports -Wformat-nonliteral... yes checking whether gcc supports -Wformat-security... yes checking whether gcc supports -Wswitch-enum... yes checking whether gcc supports -Wstrict-prototypes... yes checking whether gcc supports -Wmissing-prototypes... yes checking whether gcc supports -Wmissing-declarations... yes checking whether gcc supports -Wpointer-arith... yes checking whether gcc supports -Wbad-function-cast... yes checking whether gcc supports -Wwrite-strings... yes checking whether gcc supports -Wundef... yes checking whether gcc supports -Wimplicit-fallthrough... yes checking whether gcc supports -Wno-unused-result... yes checking whether gcc supports -Wno-unused-parameter... yes checking whether gcc supports -Wno-missing-field-initializers... yes checking whether gcc supports -Wno-microsoft-anon-tag... no checking whether gcc supports -Wno-error=deprecated-declarations... yes checking whether gcc supports -Wc++-compat... yes checking whether gcc supports -fplugin=tools/gcc-plugins/frr-format.so... no checking whether gcc supports -fplugin=frr-format... no checking whether linker supports __start/stop_section symbols... yes checking if compiler needs -Werror to reject unknown flags... no checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for PTHREAD_PRIO_INHERIT... yes checking for library containing pthread_condattr_setclock... none required checking for pthread_np.h... no checking for pthread_setname_np... yes checking for pthread_set_name_np... no checking for pthread_getthreadid_np... no checking whether ln -s works... yes checking for ar... ar checking how to print strings... printf checking for a sed that does not truncate output... sed checking for egrep... /usr/bin/egrep checking for fgrep... /usr/bin/fgrep checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /usr/bin/dd checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether ar supports D option... yes checking whether ranlib supports D option... yes checking for json-c/json.h... yes checking for json_object_get in -ljson-c... yes checking for a Python interpreter with version >= 3... python3 checking for python3... /usr/bin/python3 checking for python3 version... 3.10 checking for python3 platform... linux checking for GNU default python3 prefix... ${prefix} checking for GNU default python3 exec_prefix... ${exec_prefix} checking for python3 script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.10/site-packages checking for python3 extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.10/site-packages checking for gelf.h... yes checking for elf_memory in -lelf... yes checking for elf_getdata_rawchunk in -lelf... yes checking for gelf_getnote in -lelf... yes checking python interpreter /usr/bin/python3... /usr/bin/python3 (python3) checking whether /usr/bin/python3.10-config is available... yes checking whether /usr/bin/python3.10-config provides a working build environment... yes checking whether /usr/bin/python3 module pytest is available... no checking whether /usr/bin/python3 module sphinx is available... yes checking whether /usr/bin/python3 module sphinx is executable... yes checking if zebra should be configurable to send Route Advertisements... yes checking for objcopy... objcopy checking for .interp value to use... /lib64/ld-linux-x86-64.so.2 checking for stropts.h... no checking for sys/ksym.h... no checking for linux/version.h... yes checking for asm/types.h... yes checking for endian.h... yes checking for sys/endian.h... no checking for main in -latomic... yes checking for stdatomic.h... yes checking whether _Atomic qualifier works... yes checking for Linux futex() support... yes checking for net/if_var.h... no checking for netinet/in_var.h... no checking for net/if_dl.h... no checking for net/netopt.h... no checking for inet/nd.h... no checking for netinet/ip_icmp.h... yes checking for sys/sysctl.h... no checking for sys/sockio.h... no checking for sys/conf.h... no checking for ucontext.h... yes checking for ucontext_t.uc_mcontext.uc_regs... no checking for ucontext_t.uc_mcontext.regs... no checking for ucontext_t.uc_mcontext.gregs... yes checking which operating system interface to use... Linux checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for strlcat... no checking for strlcpy... no checking for getgrouplist... yes checking for openat... yes checking for unlinkat... yes checking for posix_fallocate... yes checking for sendmmsg... yes checking for explicit_bzero... yes checking for struct mmsghdr.msg_hdr... yes checking for protoc... protoc checking for protoc-c... protoc-c checking for PROTOBUF_C (libprotobuf-c >= 1.1.0)... yes checking for readline in -lreadline... yes checking for rl_clear_visible_line... yes checking for readline/history.h... yes checking for rl_completion_matches in -lreadline... yes checking for append_history in -lreadline... yes checking for library containing pow... -lm checking for ppoll... yes checking for pollts... no checking for asm-generic/unistd.h... yes checking whether __NR_setns is declared... yes checking for setns... yes checking for net/bpf.h... no checking for sys/dlpi.h... no checking zebra IS-IS I/O method... pfpacket checking for struct ip_mreqn.imr_ifindex... yes checking for linux/mroute.h... yes checking for linux/mroute6.h... yes checking for netinet/ip_mroute.h... no checking for netinet6/ip6_mroute.h... no checking for RFC3678 protocol-independed API... yes checking for net/if_media.h... no checking for struct if_data.ifi_link_state... no checking for netinet/tcp.h... yes checking whether TCP_MD5SIG is declared... yes checking for crypt in -lcrypt... yes checking for res_init in -lresolv... no checking for CARES (libcares)... yes checking for struct utsname.domainname... yes checking for netinet6/in6.h... no checking for netinet/in6_var.h... no checking for netinet6/in6_var.h... no checking for netinet6/nd6.h... no checking for net-snmp-config... /usr/bin/net-snmp-config checking whether we can link to Net-SNMP... yes checking for LIBYANG (libyang >= 2.1.128)... no configure: error: libyang >= 2.1.128 is required, and was not found on your system. Please consult doc/developer/building-libyang.rst for instructions on installing or building libyang. sachin:

I even changed PKG_CHECK_MODULES to AC_CHECK_LIB in configure.ac script. Still getting this issue.

Please help how I can fix this issue?

riw777 commented 3 months ago

you need to either build libyang from sources or pull a binary ... check the developer docs on how to do this

rzalamena commented 3 months ago

Post generated config.log. If you have libyang 2.x installed you could be missing the -dev package (for headers and library files) or pkg-config (for finding libyang files).