[Click] patchless is enabled by default

Sami Ruponen sami.ruponen at gmail.com
Wed Feb 9 07:12:42 EST 2011


Hi,

I have compiled a custom kernel from Ubuntu kernel 2.6.32 sources for
PC Engines Alix boards (uses AMD Geode processor). Using the latest
Click version from git the configure fails. I'm trying to use the
patchless mode (now enabled by default). I'm using command

./configure --enable-etherswitch
--with-linux=/work/kernel/linux-source-2.6.32 --build=i386

and the response I get is

c++ includable kernel header files -> no

and the warning about Linux kernel headers causing errors.

But if I compile the same kernel with SMP enabled the configure goes
through without errors saying "c++ includable kernel header files ->
yes". Also "make" succeeds without errors. The only difference with
working and non-working configure phase in error.log file is this one

+configure:10047: g++ -w -W -Wall -fno-exceptions -fno-rtti
-fpermissive -c -g -O2
-I/work/git/click/include/click-linuxmodule/include0
-I/work/git/click/include/click-linuxmodule/include1 -include
/work/alix/linux-source-2.6.32/include/linux/autoconf.h
-Iubuntu/include -D__KERNEL__ -Wall -Wundef -Wno-trigraphs
-fno-strict-aliasing -Wno-format-security
-fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3
-freg-struct-return -mpreferred-stack-boundary=2 -march=c3
-falign-functions=0 -falign-jumps=0 -falign-loops=0
-maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe
-Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-stack-protector
-fno-omit-frame-pointer -fno-optimize-sibling-calls -pg
-fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack conftest.cpp
>&5
+In file included from
/work/git/click/include/click-linuxmodule/include1/asm/local.h:9,
+                 from
/work/git/click/include/click-linuxmodule/include0/linux/module.h:25,
+                 from
/work/git/click/include/click-linuxmodule/include0/linux/textsearch.h:12,
+                 from
/work/git/click/include/click-linuxmodule/include0/linux/skbuff.h:32,
+                 from conftest.cpp:123:
+/work/git/click/include/click-linuxmodule/include0/linux/percpu.h:187:
error: can't set 'no_instrument_function' attribute after definition
+configure:10047: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "click"
+| #define PACKAGE_TARNAME "click"
+| #define PACKAGE_VERSION "1.8.0"
+| #define PACKAGE_STRING "click 1.8.0"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define CLICK_VERSION "1.8.0"
+| #define CLICK_VERSION_CODE CLICK_MAKE_VERSION_CODE(1,8,0)
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_NEW_HDR 1
+| #define NUM_CLICK_CPUS 1
+| #define HAVE_CLICKFS 1
+| #define LINUX_SRCDIR "/work/alix/linux-source-2.6.32/"
+| #define FREEBSD_INCLUDEDIR "/usr/include"
+| #define HAVE_STRERROR 1
+| #define HAVE_RANDOM 1
+| #define HAVE_SNPRINTF 1
+| #define HAVE_STRNLEN 1
+| #define HAVE_STRTOUL 1
+| #define HAVE_TCGETPGRP 1
+| #define HAVE_VSNPRINTF 1
+| #define SIZEOF_INT 4
+| #define SIZEOF_LONG 8
+| #define SIZEOF_SIZE_T 8
+| #define SIZEOF_VOID_P 8
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_INDIFFERENT_ALIGNMENT 1
+| #define SIZEOF_LONG_LONG 8
+| #define HAVE_LONG_LONG 1
+| #define HAVE_INT64_T 1
+| #define HAVE_UINT64_T 1
+| #define HAVE_INT64_TYPES 1
+| #define HAVE_INT64_IS_LONG_USERLEVEL 1
+| #define HAVE_ENDIAN_H 1
+| #define CLICK_BYTE_ORDER 1234
+| #define HAVE_BYTESWAP_H 1
+| #define HAVE_ARITHMETIC_RIGHT_SHIFT 1
+| #define HAVE___BUILTIN_CLZ 1
+| #define HAVE___BUILTIN_CLZL 1
+| #define HAVE___BUILTIN_CLZLL 1
+| #define HAVE___BUILTIN_FFS 1
+| #define HAVE___BUILTIN_FFSL 1
+| #define HAVE___BUILTIN_FFSLL 1
+| #define HAVE___SYNC_SYNCHRONIZE 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_FFS 1
+| #define HAVE_FFSL 1
+| #define HAVE_FFSLL 1
+| #define HAVE_TIME_H 1
+| #define SIZEOF_STRUCT_TIMEVAL 16
+| #define HAVE_STRUCT_TIMESPEC 1
+| #define SIZEOF_STRUCT_TIMESPEC 16
+| #define HAVE_DECL_CLOCK_GETTIME 1
+| #define HAVE_CLOCK_GETTIME 1
+| #define HAVE_NANOTIMESTAMP_ENABLED 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_PWD_H 1
+| #define HAVE_GRP_H 1
+| #define HAVE_EXECINFO_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_PSELECT 1
+| #define HAVE_SIGACTION 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_DYNAMIC_LINKING 1
+| #define HAVE_ACCEPT_SOCKLEN_T 1
+| #define HAVE_LARGE_FILE_SUPPORT 1
+| #define SIZEOF_OFF_T 8
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_GETPAGESIZE 1
+| #define HAVE_MMAP 1
+| #define HAVE_MADVISE 1
+| #define HAVE_DECL_MADVISE 1
+| #define HAVE_LINUXMODULE_2_6 1
+| #define HAVE_LINUX_STRLEN_EXPOSED 1
+| #define HAVE_LINUX_INET_IOCTL 1
+| #define HAVE_LINUX_KTIME_H 1
+| #define CLICK_STATS 0
+| #define HAVE_STRIDE_SCHED 1
+| #define HAVE_LINUX_IF_TUN_H 1
+| #define HAVE_USERLEVEL_DRIVER 1
+| #define OFFSETOF_IFR_ADDR_IFREQ 16
+| #define HAVE_EXPAT 1
+| /* end confdefs.h.  */
+| #if HAVE_LINUXMODULE_2_6
+| # define KBUILD_STR(s)		#s
+| # define KBUILD_BASENAME	KBUILD_STR(click)
+| # define KBUILD_MODNAME		KBUILD_STR(click)
+| #endif
+| #define new linux_new
+| #define this linux_this
+| #define delete linux_delete
+| #define class linux_class
+| #define virtual linux_virtual
+| #define typename linux_typename
+| #define private linux_private
+| #define protected linux_protected
+| #define public linux_public
+| #define namespace linux_namespace
+| #define false linux_false
+| #define true linux_true
+| #define CLICK_CXX_PROTECTED 1
+| #ifndef AUTOCONF_INCLUDED
+| # include <linux/autoconf.h>
+| #endif
+| #include <asm/types.h>
+| #include <linux/signal.h>
+| #include <linux/skbuff.h>
+| int
+| main ()
+| {
+| return 0
+|   ;
+|   return 0;
+| }
+configure:10055: result: no

I'm no expert in Click or Linux kernel but for me it seems like
patchless Click now requires SMP enabled kernel to configure without
errors. Can someone verify this.

BTW configure also succeeds against the Ubuntu 2.6.32-27-386 kernel headers.

-- 
Sami Ruponen
sami.ruponen at gmail.com


More information about the click mailing list