Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure: error: Missing/unusable kernel header file <linux/ethtool.h> #2186

Closed
liuyanzhen34 opened this issue Aug 19, 2022 · 3 comments
Closed

Comments

@liuyanzhen34
Copy link

hello ,

keepalived version:
2.0.19

compile environment:
[root@sd-zzpod2-core-66-98 ~]# uname -r
4.19.25-204.el7.bclinux.x86_64
[root@sd-zzpod2-core-66-98 ~]# hostnamectl
Static hostname: sd-zzpod2-core-66-98
Icon name: computer-server
Chassis: server
Machine ID: 7abf4fcbf74f46efa1a960bd60b3b021
Boot ID: a6ab6c5520d44c4e8a4035cf4e7f9fe3
Operating System: BigCloud Enterprise Linux 7.8 (Core)
CPE OS Name: cpe:/o:bclinux:bclinux:7
Kernel: Linux 4.19.25-204.el7.bclinux.x86_64
Architecture: x86-64

output when configure:
[root@66-98 /apps/mysql8/svr/package/keepalived-2.0.19]# ./configure --prefix=/apps/keepalived/mysql8/tools
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe 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 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 we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /usr/bin/grep
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for strip... strip
checking for ldd... ldd
checking for ar... ar
checking the archiver (ar) interface... ar
checking diagnostic pragmas in functions... yes
checking diagnostic push/pop pragmas... yes
checking for -Wall... yes
checking for -Wextra... yes
checking for -Wunused... yes
checking for -Wstrict-prototypes... yes
checking for -Wabsolute-value... no
checking for -Waddress-of-packed-member... no
checking for -Walloca... no
checking for -Walloc-zero... no
checking for -Warray-bounds=2... no
checking for -Wattribute-alias... no
checking for -Wbad-function-cast... yes
checking for -Wcast-align... yes
checking for -Wcast-qual... yes
checking for -Wchkp... no
checking for -Wdate-time... no
checking for -Wdisabled-optimization... yes
checking for -Wdouble-promotion... yes
checking for -Wduplicated-branches... no
checking for -Wduplicated-cond... no
checking for -Wfloat-conversion... no
checking for -Wfloat-equal... yes
checking for -Wformat-overflow... no
checking for -Wformat-security... yes
checking for -Wformat-signedness... no
checking for -Wformat-truncation... no
checking for -Wframe-larger-than=5120... yes
checking for -Wimplicit-fallthrough=3... no
checking for -Winit-self... yes
checking for -Winline... yes
checking for -Wjump-misses-init... yes
checking for -Wlogical-op... yes
checking for -Wmissing-declarations... yes
checking for -Wmissing-field-initializers... yes
checking for -Wmissing-prototypes... yes
checking for -Wnested-externs... yes
checking for -Wnormalized... no
checking for -Wnull-dereference... no
checking for -Wold-style-definition... yes
checking for -Woverlength-strings... yes
checking for -Wpointer-arith... yes
checking for -Wredundant-decls... yes
checking for -Wshadow... yes
checking for -Wshift-overflow=2... no
checking for -Wstack-protector... yes
checking for -Wstrict-overflow=4... yes
checking for -Wstrict-prototypes... yes
checking for -Wstringop-overflow=2... no
checking for -Wsuggest-attribute=cold... no
checking for -Wsuggest-attribute=const... yes
checking for -Wsuggest-attribute=format... yes
checking for -Wsuggest-attribute=malloc... no
checking for -Wsuggest-attribute=noreturn... yes
checking for -Wsuggest-attribute=pure... yes
checking for -Wsync-nand... yes
checking for -Wtrampolines... yes
checking for -Wundef... yes
checking for -Wuninitialized... yes
checking for -Wunknown-pragmas... yes
checking for -Wunsuffixed-float-constants... yes
checking for -Wunused-const-variable=2... no
checking for -Wunused-macros... yes
checking for -Wvariadic-macros... yes
checking for -Wwrite-strings... yes
checking for PIE support... yes
checking for -Wformat -Werror=format-security support... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 support... yes
checking for -fexceptions support... yes
checking for -fstack-protector-strong support... yes
checking for --param=ssp-buffer-size=4 support... yes
checking for -grecord-gcc-switches support... yes
checking for -Wl,-z,relro support... yes
checking for -Wl,-z,now support... yes
checking for -O2 support... yes
checking for unaligned memory access... yes
checking for clock_gettime() requires -lrt... no
checking how to run the C preprocessor... gcc -E
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/prctl.h usability... yes
checking sys/prctl.h presence... yes
checking for sys/prctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking linux/ethtool.h usability... no
checking linux/ethtool.h presence... yes
configure: WARNING: linux/ethtool.h: present but cannot be compiled
configure: WARNING: linux/ethtool.h: check for missing prerequisite headers?
configure: WARNING: linux/ethtool.h: see the Autoconf documentation
configure: WARNING: linux/ethtool.h: section "Present But Cannot Be Compiled"
configure: WARNING: linux/ethtool.h: proceeding with the compiler's result
configure: WARNING: ## ----------------------------------------- ##
configure: WARNING: ## Report this to keepalived-users@groups.io ##
configure: WARNING: ## ----------------------------------------- ##
checking for linux/ethtool.h... no
configure: error: Missing/unusable kernel header file <linux/ethtool.h>

the output of command : ls -l /usr/src/kernels

drwxr-xr-x 22 root root 4096 Aug 19 11:02 3.10.0-1127.19.1.el7.x86_64

Thank you

@pqarmitage
Copy link
Collaborator

Can you please post a copy of the config.log file and also /usr/include/linux/ethtool.h.

Can you also try compiling the following:

#include <linux/ethtool.h>

and post what errors you get.

@liuyanzhen34
Copy link
Author

@pqarmitage Thand you very much, I have resloved this problem .but I have another probles,I have a node which runs 2 kind type of keepalived, one type running in docker ,one type is souce compied ,install. when I run the last type in service ,the output is :
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived[40873]: Starting Keepalived v2.0.19 (10/19,2019)
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived[40873]: Running on Linux 4.19.25-204.el7.bclinux.x86_64 #1 SMP Wed Dec 23 15:41:17 CST 2020 (built for Linux 3.10.0)
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived[40873]: Command line: 'keepalived-mysql' '-D' '-f' '/apps/keepalived/mysql8/conf/keepalived.conf'
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived[40873]: '--vrrp_pid=/var/run/keepalived-mysql'
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived[40873]: Opening file '/apps/keepalived/mysql8/conf/keepalived.conf'.
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived[40873]: Remove a zombie pid file /run/keepalived/keepalived.pid
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived[40874]: Starting VRRP child process, pid=40875
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Registering Kernel netlink reflector
Aug 20 20:43:52 sd-zzpod2-core-66-98 keepalived-mysql[40867]: Starting keepalived-mysql: [ OK ]
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Registering Kernel netlink command channel
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Opening file '/apps/keepalived/mysql8/conf/keepalived.conf'.
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: WARNING - default user 'keepalived_script' for script execution does not exist - please create.
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: (Line 16) Truncating auth_pass to 8 characters
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Script /apps/keepalived/mysql8/shell/check_mysql.sh cannot be accessed - No such file or directory
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Disabling track script check_mysql since not found/accessible
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Script /apps/keepalived/mysql8/shell/switch_backup.sh cannot be accessed - No such file or directory
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Script /apps/keepalived/mysql8/shell/switch_master.sh cannot be accessed - No such file or directory
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Script /apps/keepalived/mysql8/shell/switch_fault.sh cannot be accessed - No such file or directory
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Script /apps/keepalived/mysql8/shell/switch_status.sh cannot be accessed - No such file or directory
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Assigned address 10.230.66.98 for interface bond1
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Assigned address fe80::4667:47ff:fed7:79c2 for interface bond1
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: Registering gratuitous ARP shared channel
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: (VI_1) removing VIPs.
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: (VI_1) Entering BACKUP STATE (init)
Aug 20 20:43:52 sd-zzpod2-core-66-98 Keepalived_vrrp[40875]: VRRP sockpool: [ifindex(9), family(IPv4), proto(112), unicast(1), fd(11,12)]
Aug 20 20:43:53 sd-zzpod2-core-66-98 systemd[1]: Can't open PID file /var/run/keepalived-mysql.pid (yet?) after start: No such file or directory
Aug 20 20:48:53 sd-zzpod2-core-66-98 systemd[1]: keepalived-mysql.service start operation timed out. Terminating.
Aug 20 20:48:53 sd-zzpod2-core-66-98 systemd[1]: Failed to start SYSV: Start and stop Keepalived.
-- Subject: Unit keepalived-mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit keepalived-mysql.service has failed.

-- The result is failed.
Aug 20 20:48:53 sd-zzpod2-core-66-98 systemd[1]: Unit keepalived-mysql.service entered failed state.
Aug 20 20:48:53 sd-zzpod2-core-66-98 systemd[1]: keepalived-mysql.service failed.

@pqarmitage
Copy link
Collaborator

I don't know what the keepalived-mysql service is; it is not part of the keepalived project. You will need to log this issue with whoever maintains keepalived-mysql.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants