[Click] On the patch for linux 2.6.24

Giovanni Di Stasi gdstasi at yahoo.it
Thu Apr 3 12:02:28 EDT 2008


I tried to compile a kernel module for the kernel 2.6.24.2 (on openwrt, for a board based on ixp425 network processor), and I wasn't able to configure click. 

The configure command was:
./configure  CXXFLAGS="-O2 -MD" --disable-userlevel --host=arm-linux--build=i686-pc-linux-gnu --target=arm-linux --disable-tcpudp--disable-icmp --disable-app  --disable-aqm --enable-wifi--disable-roofnet  --enable-tools=mixed  --enable-local--enable-linuxmodule --with-linux=$KERNEL_DIR

This is the part of config.log that causes the failure... any suggestions? 
Thanks.

configure:15892: checking whether netif_tx_lock is declared
configure:15939: armeb-linux-uclibc-gcc -c -g -O2  -D__KERNEL__ -I/home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include -I/home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/asm/mach-generic -I/home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/asm/mach-default -funit-at-a-time conftest.c >&5
In file included from /home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/linux/jiffies.h:4,
                 from /home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/linux/sched.h:54,
                 from /home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/asm/uaccess.h:14,
                 from /home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/net/checksum.h:25,
                 from /home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/linux/skbuff.h:27,
                 from conftest.c:95:
/home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/linux/calc64.h: In function 'do_div_llr':
/home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/linux/calc64.h:25: error: '__LINUX_ARM_ARCH__' undeclared (first use in this function)
/home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/linux/calc64.h:25: error: (Each undeclared identifier is reported only once
/home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2/include/linux/calc64.h:25: error: for each function it appears in.)
configure:15945: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "click"
| #define PACKAGE_TARNAME "click"
| #define PACKAGE_VERSION "1.6.0"
| #define PACKAGE_STRING "click 1.6.0"
| #define PACKAGE_BUGREPORT ""
| #define CLICK_VERSION "1.6.0"
| #define HAVE_NEW_HDR 1
| #define NUM_CLICK_CPUS 1
| #define HAVE_CLICKFS 1
| #define LINUX_SRCDIR "/home/gdistasi/mesh/fcranet/netgear/openwrt-last/build_dir/linux-ixp4xx_generic/linux-2.6.24.2"
| #define FREEBSD_INCLUDEDIR "/usr/include"
| #define HAVE_STRERROR 1
| #define HAVE_SNPRINTF 1
| #define HAVE_STRTOUL 1
| #define HAVE_TCGETPGRP 1
| #define HAVE_VSNPRINTF 1
| #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 SIZEOF_INT 4
| #define SIZEOF_LONG 4
| #define SIZEOF_SIZE_T 4
| #define HAVE_INTTYPES_H 1
| #define SIZEOF_LONG_LONG 8
| #define HAVE_LONG_LONG 1
| #define HAVE_INT64_TYPES 1
| #define HAVE_INT64_IS_LONG_LONG_USERLEVEL 1
| #define SIZEOF_STRUCT_TIMEVAL 8
| #define HAVE_STRUCT_TIMESPEC 1
| #define SIZEOF_STRUCT_TIMESPEC 8
| #define HAVE_ENDIAN_H 1
| #define CLICK_BYTE_ORDER 4321
| #define HAVE_BYTESWAP_H 1
| #define HAVE_ARITHMETIC_RIGHT_SHIFT 1
| #define HAVE_ADDRESSABLE_VA_LIST 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_STRINGS_H 1
| #define HAVE_FFS 1
| #define HAVE_UNISTD_H 1
| #define HAVE_TERMIO_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GRP_H 1
| #define HAVE_POLL_H 1
| #define HAVE_SIGACTION 1
| #define HAVE_DLFCN_H 1
| #define HAVE_DYNAMIC_LINKING 1
| #define HAVE_DLFCN_H 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_GETPAGESIZE 1
| #define HAVE_MADVISE 1
| #define HAVE_DECL_MADVISE 1
| #define HAVE_LINUXMODULE_2_6 1
| #define HAVE_CLICK_KERNEL 1
| #define HAVE_LINUX_STRLEN_EXPOSED 1
| #define HAVE_LINUX_POLLING 1
| #define HAVE_STRIDE_SCHED 1
| #define HAVE_LINUX_IF_TUN_H 1
| #define HAVE_INT64_IS_LONG_LONG_LINUXMODULE 1
| #define HAVE_UINTPTR_T_LINUXMODULE 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 xxx_new
| #define this xxx_this
| #define delete xxx_delete
| #define class xxx_class
| #define virtual xxx_virtual
| #define typename xxx_typename
| #define private xxx_private
| #define protected xxx_protected
| #define public xxx_public
| #define namespace xxx_namespace
| #include <linux/autoconf.h>
| #include <linux/skbuff.h>
| #include <linux/netdevice.h>
| 
| int
| main ()
| {
| #ifndef netif_tx_lock
|   (void) netif_tx_lock;
| #endif
| 
|   ;
|   return 0;
| }
configure:15960: result: no
configure:16036: error:




The output of configure was:
gdistasi at Montecalvario:~/mesh/fcranet/netgear$ ./configure-kernel.sh
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking target system type... arm-unknown-linux-gnu
checking for arm-linux-gcc... armeb-linux-uclibc-gcc
checking for arm-linux-g++... armeb-linux-uclibc-g++
checking for arm-linux-gcc... (cached) armeb-linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether armeb-linux-uclibc-gcc accepts -g... yes
checking for armeb-linux-uclibc-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... armeb-linux-uclibc-cpp
checking for inline... inline
checking whether we are using the GNU C++ compiler... yes
checking whether armeb-linux-uclibc-g++ accepts -g... yes
checking whether <new> works... yes
checking how to run the C++ preprocessor... armeb-linux-uclibc-g++ -E
checking for arm-linux-ar... /home/gdistasi/mesh/fcranet/netgear/openwrt-last/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc-ar
checking for arm-linux-ld... /home/gdistasi/mesh/fcranet/netgear/openwrt-last/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc-ld
checking for arm-linux-ranlib... armeb-linux-uclibc-ranlib
checking for arm-linux-strip... /home/gdistasi/mesh/fcranet/netgear/openwrt-last/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-strip
checking whether we are compiling for Linux... yes
checking for strerror... yes
checking for snprintf... yes
checking for strtoul... yes
checking for tcgetpgrp... yes
checking for vsnprintf... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /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 for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for size_t... yes
checking size of size_t... 4
checking for inttypes.h... (cached) yes
checking whether machine is indifferent to alignment... no
checking for long long... yes
checking size of long long... 8
checking for long long... (cached) yes
checking for int64_t typedef... yes
checking for uint64_t typedef... yes
checking whether long and int64_t are the same type... no
checking whether long long and int64_t are the same type... yes
checking for struct timeval... yes
checking size of struct timeval... 8
checking for struct timespec... yes
checking for struct timespec... (cached) yes
checking size of struct timespec... 8
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking endianness... 4321
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking whether signed right shift is arithmetic... yes
checking for addressable va_list type... yes
checking for __builtin_clz... yes
checking for __builtin_clzl... yes
checking for __builtin_clzll... yes
checking for __builtin_ffs... yes
checking for __builtin_ffsl... yes
checking for __builtin_ffsll... yes
checking for strings.h... (cached) yes
checking for ffs... yes
checking for ffsl... no
checking for ffsll... no
checking for gcc... gcc
checking for g++... g++
checking for ar... ar
checking for ranlib... ranlib
checking for unistd.h... (cached) yes
checking termio.h usability... yes
checking termio.h presence... yes
checking for termio.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking whether <poll.h> is emulated... no
checking for sigaction... yes
checking for kqueue... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlopen... no
checking for dlopen in -ldl... yes
checking compiler flags for building loadable modules... -shared
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlopen... no
checking for dlopen in -ldl... yes
checking for large file support in C library... yes
checking for off_t... yes
checking size of off_t... 8
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... no
checking for madvise... yes
checking whether madvise is declared... yes
checking for Linux 2.6... 1
checking for Click Linux kernel extensions... yes
checking for Click Linux kernel extensions for transmit notification... no
checking for read_net_skbcount kernel extension... no
checking for strlen kernel symbol... yes
checking for tulip_interrupt_hook kernel symbol... no
checking for device polling kernel extension... yes
checking for atomic_set_mask... no
checking for SMP... no
checking for <asm/alternative.h>... no
checking linux/if_tun.h usability... yes
checking linux/if_tun.h presence... yes
checking for linux/if_tun.h... yes
checking net/if_tun.h usability... no
checking net/if_tun.h presence... no
checking for net/if_tun.h... no
checking net/if_tap.h usability... no
checking net/if_tap.h presence... no
checking for net/if_tap.h... no
checking net/bpf.h usability... no
checking net/bpf.h presence... no
checking for net/bpf.h... no
checking whether struct if_data has ifi_datalen... no
checking whether struct sockaddr_in has sin_len... no
checking expat.h usability... no
checking expat.h presence... no
checking for expat.h... no
checking for XML_ParserCreateNS in -lexpat... no
checking for Linux 2.6 compilation flags... -funit-at-a-time
checking for C++-includable kernel header files... yes
checking whether -fpermissive is required... yes
checking whether -fpermissive is allowed... no
checking whether long and int64_t are the same type in the Linux kernel... no
checking whether long long and int64_t are the same type in the Linux kernel... yes
checking whether typename uintptr_t is defined in the Linux kernel... yes
checking whether struct sk_buff has a security member... no
checking whether struct sk_buff has an fclone member... no
checking whether skb_shinfo has a tso_size member... no
checking whether skb_shinfo has a gso_size member... no
checking whether skb_shinfo has a ufo_size member... no
checking whether skb_shinfo has an ip6_frag_id member... no
checking whether net_enable_timestamp is declared... no
checking whether netif_tx_lock is declared... no
configure: error:
=========================================

Your Linux kernel header files cause errors when included by a C++ program.

There are two common reasons for this error:
1. You have not applied the Linux kernel patch that comes with this
   distribution.  Apply the right patch and try again.  See the INSTALL
   file for more information.
2. Your Linux configuration enables some functionality that is not yet
   covered by our patches.  Turn off this functionality and try again,
   or fix the error and tell us how you did it.  See the config.log file
   for more detailed information on the error.

=========================================





      Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html



More information about the click mailing list