Re: [Keepalived-devel] keepalived-2.0.7 --with-kernel-dir
Status: Beta
Brought to you by:
acassen
|
From: Quentin A. <qu...@ar...> - 2018-10-15 16:41:43
|
Please see answers inline below: On Mon, 2018-10-15 at 14:54 +0200, Rafał Sanocki wrote: > Hey , > > I have two problems. > after running ./configure --with-kernel-dir = /usr/src/ linux-4.14.76 > I get > configure: error: Missing / unusable kernel header file <linux/netlink.h> I think this option is intended for when kernel headers are being used from within a kernel source tree. The headers used to be in directory include/linux/ under the root of the kernel source tree, and so --with- kernel-dir=ROOT_OF_SOURCE_TREE, and configure adding include/ <linux/netlink.h> would exist. However, starting with Linux 3.7 the user space and kernel space of the Linux header files were separated, and the user headers are now in include/uapi/linux, and so --with- kernel-dir=ROOT_OF_SOURCE_TREE will now not work. configure.ac should probably check for the include/uapi directory now as well. It appears that what you have is the kernel headers in a different directory, rather than the kernel source tree. The kernel headers need to be under a directory linux/ since that is how they should be included (as far as I know). You should probably be using 'CPPFLAGS=... make', but the kernel header files will need to be in a directory named linux/ > Workaround > ln -s /usr/src/linux-4.14.76 /usr/src/linux > > Second one. > when i try to compile with --enable-snmp > i get > > Keepalived configuration > ------------------------ > Keepalived version : 2.0.7 > Compiler : gcc > Preprocessor flags : -I/usr/src/include -I/usr/include/libnl3 > Compiler flags : -Wall -Wunused -Wstrict-prototypes -Wextra > -Winit-self -g -D_GNU_SOURCE -Wimplicit-fallthrough=3 -fPIE -Wformat > -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches > -O2 -g -O2 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing > -DNETSNMP_REMOVE_U64 -g -O2 -Ulinux -Dlinux=linux -fwrapv > -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -I/usr/lib64/perl5/5.24.3/x86_64-linux/CORE -I/usr/include/libnl3 > -I/usr/local/ssl/include -I/usr/local/include -DNETSNMP_NO_INLINE > Linker flags : -pie > Extra Lib : -lcrypto -lssl -lnl-genl-3 -lnl-3 > -lnl-route-3 -lmagic -lip4tc -lip6tc -lxtables -lpcre2-8 > -L/usr/local/lib -lnetsnmpmibs -lnetsnmpagent -lnetsnmp > -L/usr/local/ssl/lib -lnl-3 -lm -Wl,-E > Use IPVS Framework : Yes > IPVS use libnl : Yes > IPVS syncd attributes : Yes > IPVS 64 bit stats : Yes > HTTP_GET regex support : Yes > fwmark socket support : Yes > Use VRRP Framework : Yes > Use VRRP VMAC : Yes > Use VRRP authentication : Yes > With ip rules/routes : Yes > Use BFD Framework : No > SNMP vrrp support : Yes > SNMP checker support : Yes > SNMP RFCv2 support : No > SNMP RFCv3 support : No > DBUS support : No > SHA1 support : Yes > Use Json output : No > libnl version : 3 > Use IPv4 devconf : Yes > Use libiptc : Yes > Use libipset : No > init type : openrc > Strict config checks : No > Build genhash : Yes > Build documentation : No > > make[2]: Entering directory '/usr/src/keepalived-2.0.7/keepalived' > gcc -Wall -Wunused -Wstrict-prototypes -Wextra -Winit-self -g > -D_GNU_SOURCE -Wimplicit-fallthrough=3 -fPIE -Wformat > -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches > -O2 -g -O2 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing > -DNETSNMP_REMOVE_U64 -g -O2 -Ulinux -Dlinux=linux -fwrapv > -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -I/usr/lib64/perl5/5.24.3/x86_64-linux/CORE -I/usr/include/libnl3 > -I/usr/local/ssl/include -I/usr/local/include -DNETSNMP_NO_INLINE -g > -O2 -D_GNU_SOURCE -pie -Wl,-z,relro -Wl,-z,now -o keepalived main.o > core/libcore.a check/libcheck.a vrrp/libvrrp.a core/libcore.a > ../lib/liblib.a -lcrypto -lssl -lnl-genl-3 -lnl-3 -lnl-route-3 -lmagic > -lip4tc -lip6tc -lxtables -lpcre2-8 -L/usr/local/lib -lnetsnmpmibs > -lnetsnmpagent -lnetsnmp -L/usr/local/ssl/lib -lnl-3 -lm -Wl,-E -lcrypto > check/libcheck.a(libipvs.o): In function `ipvs_dests_parse_cb': > /usr/src/keepalived-2.0.7/keepalived/check/libipvs.c:938: undefined > reference to `nla_get_s32' > collect2: error: ld returned 1 exit status > > > i found that nla_get_s32 is defind in 1 files as a function: > include/net/netlink.h at kernel > what i'm missing ? Withouth enable-snmp keepalived can compile. > include/net/netlink.h is a private kernel header file, not one of the header files intended for included in compilation of processes outside the kernel. It looks as though your problems are caused by making all the kernel header files in the kernel source tree available when building keepalived. > Best regards, > Rafał Sanocki > |