Modify

Opened 5 years ago

Closed 4 years ago

#12875 closed defect (fixed)

keepalived compile error

Reported by: jeroen.louwes@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: keepalived vrrp linkage.h Cc:

Description

Hi guys,

I have some trouble building the keepalived package. If i build it with kernel 3.6.x it compiles without errors, but with kernel 3.7.x it fails.

What do i do wrong? Thank you.

Extra info: compile for WNDR3700v2 with defaults and only keepalived package selected.

make[3]: Entering directory `/home/jeroen/OpenWRT/trunk/feeds/packages/net/keepalived'
make -C /home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7 DESTDIR="/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7/ipkg-install" STRIP="/bin/true" all install
make[4]: Entering directory `/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7'
make -C lib || exit 1;
make[5]: Entering directory `/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7/lib'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7/lib'
make -C keepalived
make[5]: Entering directory `/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7/keepalived'
make[6]: Entering directory `/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7/keepalived/core'
mips-openwrt-linux-uclibc-gcc -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/home/jeroen/OpenWRT/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include -I/home/jeroen/OpenWRT/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/include -I/home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/usr/include -I/home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/include  -I/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include -I/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include -I../include -I../../lib -Wall -Wunused -Wstrict-prototypes -D_KRNL_2_6_ -D_WITHOUT_LVS_ -D_WITH_VRRP_ -D_WITHOUT_SNMP_  -c smtp.c
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/linux/if_addr.h:4:0,
                 from ../include/vrrp_ipaddress.h:32,
                 from ../include/vrrp.h:31,
                 from ../include/smtp.h:34,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/types.h:14:26: error: conflicting types for 'fd_set'
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/types.h:220:0,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/uio.h:24,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/socket.h:28,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netinet/in.h:25,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netdb.h:28,
                 from ../include/smtp.h:27,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/select.h:78:5: note: previous declaration of 'fd_set' was here
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/linux/if_addr.h:4:0,
                 from ../include/vrrp_ipaddress.h:32,
                 from ../include/vrrp.h:31,
                 from ../include/smtp.h:34,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/types.h:15:25: error: conflicting types for 'dev_t'
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/uio.h:24:0,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/socket.h:28,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netinet/in.h:25,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netdb.h:28,
                 from ../include/smtp.h:27,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/types.h:62:17: note: previous declaration of 'dev_t' was here
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/linux/if_addr.h:4:0,
                 from ../include/vrrp_ipaddress.h:32,
                 from ../include/vrrp.h:31,
                 from ../include/smtp.h:34,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/types.h:22:26: error: conflicting types for 'daddr_t'
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/uio.h:24:0,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/socket.h:28,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netinet/in.h:25,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netdb.h:28,
                 from ../include/smtp.h:27,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/types.h:116:19: note: previous declaration of 'daddr_t' was here
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/linux/if_addr.h:4:0,
                 from ../include/vrrp_ipaddress.h:32,
                 from ../include/vrrp.h:31,
                 from ../include/smtp.h:34,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/types.h:25:26: error: conflicting types for 'timer_t'
In file included from smtp.c:25:0:
/home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/time.h:105:19: note: previous declaration of 'timer_t' was here
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/linux/if_addr.h:4:0,
                 from ../include/vrrp_ipaddress.h:32,
                 from ../include/vrrp.h:31,
                 from ../include/smtp.h:34,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/types.h:36:24: error: conflicting types for 'uintptr_t'
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/include/stdint.h:3:0,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netinet/in.h:24,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netdb.h:28,
                 from ../include/smtp.h:27,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/stdint.h:131:23: note: previous declaration of 'uintptr_t' was here
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/linux/if_addr.h:4:0,
                 from ../include/vrrp_ipaddress.h:32,
                 from ../include/vrrp.h:31,
                 from ../include/smtp.h:34,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/types.h:134:23: error: conflicting types for 'blkcnt_t'
In file included from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/uio.h:24:0,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/socket.h:28,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netinet/in.h:25,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/netdb.h:28,
                 from ../include/smtp.h:27,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/sys/types.h:235:20: note: previous declaration of 'blkcnt_t' was here
In file included from /home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/kernel.h:6:0,
                 from /home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/skbuff.h:17,
                 from /home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/netlink.h:6,
                 from /home/jeroen/OpenWRT/trunk/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.3/../../../../mips-openwrt-linux-uclibc/sys-include/linux/if_addr.h:5,
                 from ../include/vrrp_ipaddress.h:32,
                 from ../include/vrrp.h:31,
                 from ../include/smtp.h:34,
                 from smtp.c:27:
/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.3/include/linux/linkage.h:5:25: fatal error: asm/linkage.h: No such file or directory
compilation terminated.
make[6]: *** [smtp.o] Error 1
make[6]: Leaving directory `/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7/keepalived/core'
make[5]: *** [all] Error 1
make[5]: Leaving directory `/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7/keepalived'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7'
make[3]: *** [/home/jeroen/OpenWRT/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/keepalived-1.2.7/.built] Error 2
make[3]: Leaving directory `/home/jeroen/OpenWRT/trunk/feeds/packages/net/keepalived'
make[2]: *** [package/feeds/packages/keepalived/compile] Error 2
make[2]: Leaving directory `/home/jeroen/OpenWRT/trunk'
make[1]: *** [/home/jeroen/OpenWRT/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/jeroen/OpenWRT/trunk'
make: *** [world] Error 2

Attachments (1)

Makefile.patch (907 bytes) - added by jeroen.louwes@… 5 years ago.
Upgrade keepalived to version 1.2.7 and fix Makefile for kernel 3.7

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by heil

would you please send your patch that upgrades version 1.19 to 1.2.7 which maybe causes the problem?

comment:2 Changed 5 years ago by jeroen.louwes@…

Sorry for the late reply... Here is the diff:

--- Makefile	(revision 35482)
+++ Makefile	(working copy)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keepalived
-PKG_VERSION:=1.1.19
-PKG_RELEASE:=2
+PKG_VERSION:=1.2.7
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= http://www.keepalived.org/software
-PKG_MD5SUM:=a35b8d9d462810f7650d292bd7457523
+PKG_MD5SUM:=8551a34ee048895dbe5350a031ff29c1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/kernel.mk

comment:3 Changed 5 years ago by jeroen.louwes@…

Problem also exists with "standard" (1.1.19) Makefile.

comment:4 Changed 5 years ago by heil

please try with this mods:

Index: feeds/packages/net/keepalived/Makefile
===================================================================
--- feeds/packages/net/keepalived/Makefile (Revision 35433)
+++ feeds/packages/net/keepalived/Makefile (Arbeitskopie)
@@ -42,8 +42,12 @@

--disable-debug \
--disable-strip \
--disable-lvs \

  • --disable-lvs-syncd \

+ --disable-lvs-syncd
+
+ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.7.0)),1)
+CONFIGURE_ARGS+= \

--with-kernel-dir="$(LINUX_DIR)"

+endif

CONFIGURE_VARS+= \

ac_cv_file_$(call acvar,$(LINUX_DIR)/net/core/link_watch.c)=yes

Changed 5 years ago by jeroen.louwes@…

Upgrade keepalived to version 1.2.7 and fix Makefile for kernel 3.7

comment:5 Changed 5 years ago by jeroen.louwes@…

Hi heil,

This fixed my problem! Thank you!

I attached my diff as a patch for current trunk. It updates keepalived to version 1.2.7 together with your mod.

Thnks again. Ticket closed.

comment:6 Changed 4 years ago by zloop

i think the patch is wrong - its related to uapi - user space kernel api / header file split - from 3.7 onwards:

the above patch includes the wrong files - see compile.txt:

-I/usr/src/linux/include -I/usr/src/linux/include

it should be something like this:

+       ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.7.0)),1)
+               CONFIGURE_ARGS+= --with-kernel-dir="$(LINUX_DIR)"
+       else
+               CONFIGURE_ARGS+= --with-kernel-dir="$(LINUX_DIR)/$(LINUX_UAPI_DIR)"
+       endif

but in trunk old kernels are faded out anyways

comment:7 Changed 4 years ago by hauke

  • Resolution set to fixed
  • Status changed from new to closed

Thank you for reporting, this was fixed in 38841.

Now it does not work on 3.3 and 3.6, but I do not care.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.