[Click] errors compiling click simplepackage from cvs

Guido Alejandro Gavilanes Castillo ggavilanes at gmail.com
Tue May 8 09:05:59 EDT 2007


another to add to the same problem...
compiles with a lot of warninngs which are like those on these previous topic...
http://osdir.com/ml/network.routing.click/2007-02/msg00022.html
BUT I already tried with cvs version.
 I would appreciate some help.
Thank you,
Guido

On 5/7/07, Guido Alejandro Gavilanes Castillo <ggavilanes at gmail.com> wrote:
> Hello all,
> Just if anyone has read my previous e-mail, it seems to be compiling
> the sample module BUT I have to copy the entire
> linux-2.4.20-click/include directory from sources to replace files in
> /usr/include. Is there any path which is not being passed from click
> installation to sample package installation, given that click
> configure line has --with-linux option?
> Thank you!
> Guido
>
> On 5/4/07, Guido Alejandro Gavilanes Castillo <ggavilanes at gmail.com> wrote:
> > Hello Click masters!
> > I am working with click since some months ago, and have been using
> > version 1.4.3 with some specific purpose elements i coded inside a
> > package. I used the sample package as suggested in the FAQ.
> > in order to overcome some scheduling problems mentioned on a previous
> > post, I started to use version click-1.5.0 (CVS) in order to migrate
> > my code, it installed ok, and then I started by compiling the
> > simplepackage present on etc directory just as it is (copied in
> > another directory) and surprisingly I found the following bunch of
> > errors (I attach a complete make install log below). Summarizing it
> > warns about including kernel headers directly (But I guess I have not
> > direct control of these paths).
> >
> > I checked Autoconf version, 2.61,  this same errors appear in an
> > installation using kernel 2.4.20 and 2.6.16.13. click works just as
> > well but without I am stuck without being able to use my elements,
> > which must be compiled on a package. I also tested
> > --disable-linuxmodule  and --disable-userlevel
> >
> > My click configure was:
> > ./configure --with-linux=/root/kernel/linux-2.4.20-click
> > --enable-etherswitch --prefix=/usr/local/click
> >
> > I thank you all in advance and would appreciate very much any ideas of
> > what would be happening! I keep on tuned on your comments!
> > Regards
> >
> > Guido
> > --- LOG BEGIN ---
> > make CLICK_PACKAGE_MAKING=userlevel sample.uo
> > make[1]: Entering directory `/root/kernel/samplepackage'
> > echo . | /usr/local/bin/click-buildtool findelem -r userlevel -r
> > sample -P  > uelements.conf
> > /usr/local/bin/click-buildtool elem2make -t userlevel < uelements.conf
> > > uelements.mk
> > make[1]: Leaving directory `/root/kernel/samplepackage'
> > make[1]: Entering directory `/root/kernel/samplepackage'
> >   CXX sampleelt.cc
> > /usr/local/bin/click-buildtool elem2package  sample < uelements.conf >
> > upackage.cc
> >   CXX upackage.cc
> > g++ -fPIC -g -O2 -shared -o sample.uo -o sample.uo sampleelt.uo   upackage.uo
> > true sample.uo
> > make[1]: Leaving directory `/root/kernel/samplepackage'
> > make CLICK_PACKAGE_MAKING=linuxmodule sample.ko
> > make[1]: Entering directory `/root/kernel/samplepackage'
> > echo . | /usr/local/bin/click-buildtool findelem -r linuxmodule -r
> > sample -P  > kelements.conf
> > /usr/local/bin/click-buildtool elem2make -t linuxmodule <
> > kelements.conf > kelements.mk
> > make[1]: Leaving directory `/root/kernel/samplepackage'
> > make[1]: Entering directory `/root/kernel/samplepackage'
> >   CXX sampleelt.cc
> > In file included from /usr/local/include/click/config-linuxmodule.h:81,
> >                  from /usr/local/include/click/config.h:147,
> >                  from sampleelt.cc:20:
> > /usr/include/linux/autoconf.h:1:2: #error Invalid kernel header
> > included in userspace
> > In file included from /usr/local/include/click/glue.hh:25,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/linux/string.h:8:2: warning: #warning Using kernel header
> > in userland!
> > In file included from /usr/include/linux/sched.h:14,
> >                  from /usr/include/linux/skbuff.h:19,
> >                  from /usr/local/include/click/glue.hh:26,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/linux/timex.h:173: field `time' has incomplete type
> > In file included from /usr/include/linux/bitops.h:69,
> >                  from /usr/include/asm/system.h:7,
> >                  from /usr/include/linux/sched.h:16,
> >                  from /usr/include/linux/skbuff.h:19,
> >                  from /usr/local/include/click/glue.hh:26,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/asm/bitops.h:327:2: warning: #warning This includefile is
> > not available on all architectures.
> > /usr/include/asm/bitops.h:328:2: warning: #warning Using kernel
> > headers in userspace: atomicity not guaranteed
> > In file included from /usr/include/linux/signal.h:4,
> >                  from /usr/include/linux/sched.h:25,
> >                  from /usr/include/linux/skbuff.h:19,
> >                  from /usr/local/include/click/glue.hh:26,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/asm/signal.h:107: 'sigset_t' is used as a type, but is not defined
> >    as a type.
> > In file included from /usr/include/linux/sched.h:81,
> >                  from /usr/include/linux/skbuff.h:19,
> >                  from /usr/local/include/click/glue.hh:26,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/linux/timer.h:45: 'spinlock_t' is used as a type, but is not
> >    defined as a type.
> > In file included from /usr/include/linux/highmem.h:5,
> >                  from /usr/include/linux/skbuff.h:26,
> >                  from /usr/local/include/click/glue.hh:26,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/asm/pgalloc.h:6:24: asm/fixmap.h: No such file or directory
> > In file included from /usr/include/linux/highmem.h:5,
> >                  from /usr/include/linux/skbuff.h:26,
> >                  from /usr/local/include/click/glue.hh:26,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/asm/pgalloc.h:57: syntax error before `*' token
> > /usr/include/asm/pgalloc.h:63: `pgd' was not declared in this scope
> > /usr/include/asm/pgalloc.h:63: `USER_PTRS_PER_PGD' was not declared in this
> >    scope
> > /usr/include/asm/pgalloc.h:63: `swapper_pg_dir' was not declared in this scope
> > /usr/include/asm/pgalloc.h:63: `USER_PTRS_PER_PGD' was not declared in this
> >    scope
> > /usr/include/asm/pgalloc.h:63: `PTRS_PER_PGD' was not declared in this scope
> > /usr/include/asm/pgalloc.h:63: `USER_PTRS_PER_PGD' was not declared in this
> >    scope
> > /usr/include/asm/pgalloc.h:63: `pgd_t' was not declared in this scope
> > /usr/include/asm/pgalloc.h:63: `int memcpy' redeclared as different kind of
> >    symbol
> > /usr/include/linux/string.h:72: previous declaration of `void* memcpy(void*,
> >    const void*, unsigned int)'
> > /usr/include/asm/pgalloc.h:63: initializer list being treated as compound
> >    expression
> > /usr/include/asm/pgalloc.h:65: parse error before `return'
> > /usr/include/asm/pgalloc.h:70: syntax error before `*' token
> > /usr/include/asm/pgalloc.h:76: invalid initializer
> > /usr/include/asm/pgalloc.h:77: parse error before `.' token
> > /usr/include/asm/pgalloc.h:83: `pgd_t' was not declared in this scope
> > /usr/include/asm/pgalloc.h:83: `pgd' was not declared in this scope
> > /usr/include/asm/pgalloc.h:84: variable or field `free_pgd_fast' declared void
> > /usr/include/asm/pgalloc.h:84: `free_pgd_fast' declared as an `inline' variable
> > /usr/include/asm/pgalloc.h:84: syntax error before `{' token
> > /usr/include/asm/pgalloc.h:86: parse error before `.' token
> > /usr/include/asm/pgalloc.h:87: parse error before `.' token
> > /usr/include/asm/pgalloc.h:90: `pgd_t' was not declared in this scope
> > /usr/include/asm/pgalloc.h:90: `pgd' was not declared in this scope
> > /usr/include/asm/pgalloc.h:91: variable or field `free_pgd_slow' declared void
> > /usr/include/asm/pgalloc.h:91: `free_pgd_slow' declared as an `inline' variable
> > /usr/include/asm/pgalloc.h:91: syntax error before `{' token
> > /usr/include/asm/pgalloc.h:103: syntax error before `*' token
> > /usr/include/asm/pgalloc.h:108: parse error before `do'
> > /usr/include/asm/pgalloc.h:118: syntax error before `*' token
> > /usr/include/asm/pgalloc.h:124: redefinition of `int ret[0]'
> > /usr/include/asm/pgalloc.h:76: `int ret[0]' previously defined here
> > /usr/include/asm/pgalloc.h:124: invalid initializer
> > /usr/include/asm/pgalloc.h:125: parse error before `.' token
> > /usr/include/asm/pgalloc.h:130: `pte_t' was not declared in this scope
> > /usr/include/asm/pgalloc.h:130: `pte' was not declared in this scope
> > /usr/include/asm/pgalloc.h:131: variable or field `pte_free_fast' declared void
> > /usr/include/asm/pgalloc.h:131: `pte_free_fast' declared as an `inline'
> >    variable
> > /usr/include/asm/pgalloc.h:131: syntax error before `{' token
> > /usr/include/asm/pgalloc.h:133: parse error before `.' token
> > /usr/include/asm/pgalloc.h:134: parse error before `.' token
> > /usr/include/asm/pgalloc.h:137: `pte_t' was not declared in this scope
> > /usr/include/asm/pgalloc.h:137: `pte' was not declared in this scope
> > /usr/include/asm/pgalloc.h:138: variable or field `pte_free_slow' declared void
> > /usr/include/asm/pgalloc.h:138: `pte_free_slow' declared as an `inline'
> >    variable
> > /usr/include/asm/pgalloc.h:138: syntax error before `{' token
> > /usr/include/asm/pgalloc.h: In function `void flush_tlb_mm(mm_struct*)':
> > /usr/include/asm/pgalloc.h:183: `current' undeclared (first use this function)
> > /usr/include/asm/pgalloc.h:183: (Each undeclared identifier is reported only
> >    once for each function it appears in.)
> > /usr/include/asm/pgalloc.h:184: `__flush_tlb' undeclared (first use this
> >    function)
> > /usr/include/asm/pgalloc.h: In function `void flush_tlb_page(vm_area_struct*,
> >    long unsigned int)':
> > /usr/include/asm/pgalloc.h:190: invalid use of undefined type `struct
> >    vm_area_struct'
> > /usr/include/asm/pgalloc.h:187: forward declaration of `struct vm_area_struct'
> > /usr/include/asm/pgalloc.h:191: `__flush_tlb_one' undeclared (first use this
> >    function)
> > In file included from /usr/include/linux/skbuff.h:26,
> >                  from /usr/local/include/click/glue.hh:26,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/linux/highmem.h: In function `void* kmap(page*)':
> > /usr/include/linux/highmem.h:68: `page_address' undeclared (first use this
> >    function)
> > /usr/include/linux/highmem.h: In function `void clear_user_highpage(page*, long
> >    unsigned int)':
> > /usr/include/linux/highmem.h:86: `clear_user_page' undeclared (first use this
> >    function)
> > /usr/include/linux/highmem.h: In function `void clear_highpage(page*)':
> > /usr/include/linux/highmem.h:92: `clear_page' undeclared (first use this
> >    function)
> > /usr/include/linux/highmem.h: In function `void memclear_highpage(page*,
> >    unsigned int, unsigned int)':
> > /usr/include/linux/highmem.h:101: `BUG' undeclared (first use this function)
> > /usr/include/linux/highmem.h:102: invalid conversion from `void*' to `char*'
> > /usr/include/linux/highmem.h: In function `void memclear_highpage_flush(page*,
> >    unsigned int, unsigned int)':
> > /usr/include/linux/highmem.h:116: invalid conversion from `void*' to `char*'
> > /usr/include/linux/highmem.h:118: `flush_page_to_ram' undeclared (first use
> >    this function)
> > /usr/include/linux/highmem.h: In function `void copy_user_highpage(page*,
> >    page*, long unsigned int)':
> > /usr/include/linux/highmem.h:126: invalid conversion from `void*' to `char*'
> > /usr/include/linux/highmem.h:127: invalid conversion from `void*' to `char*'
> > /usr/include/linux/highmem.h:128: `copy_user_page' undeclared (first use this
> >    function)
> > /usr/include/linux/highmem.h: In function `void copy_highpage(page*, page*)':
> > /usr/include/linux/highmem.h:137: invalid conversion from `void*' to `char*'
> > /usr/include/linux/highmem.h:138: invalid conversion from `void*' to `char*'
> > /usr/include/linux/highmem.h:139: `copy_page' undeclared (first use this
> >    function)
> > In file included from /usr/local/include/click/glue.hh:26,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/linux/skbuff.h: At global scope:
> > /usr/include/linux/skbuff.h:100: 'spinlock_t' is used as a type, but is not
> >    defined as a type.
> > /usr/include/linux/skbuff.h:120: 'atomic_t' is used as a type, but is not
> >    defined as a type.
> > /usr/include/linux/skbuff.h:183: 'atomic_t' is used as a type, but is not
> >    defined as a type.
> > In file included from /usr/local/include/click/glue.hh:28,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/linux/malloc.h:3:2: warning: #warning The Use of
> > linux/malloc.h is deprecated, use linux/slab.h
> > In file included from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/local/include/click/glue.hh:29:29: linux/vmalloc.h: No such file
> > or directory
> > In file included from /usr/local/include/click/glue.hh:30,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/linux/interrupt.h:44:25: asm/hardirq.h: No such file or directory
> > /usr/include/linux/interrupt.h:45:25: asm/softirq.h: No such file or directory
> > In file included from /usr/local/include/click/glue.hh:30,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/linux/interrupt.h:77: parse error before `int'
> > /usr/include/linux/interrupt.h: In function `void FASTCALL(...)':
> > /usr/include/linux/interrupt.h:78: parse error before `int'
> > /usr/include/linux/interrupt.h: In function `void FASTCALL(...)':
> > /usr/include/linux/interrupt.h:78: redefinition of `void FASTCALL(...)'
> > /usr/include/linux/interrupt.h:77: `void FASTCALL(...)' previously defined here
> > /usr/include/linux/interrupt.h:78: redefinition of `void FASTCALL(...)'
> > /usr/include/linux/interrupt.h:77: `void FASTCALL(...)' previously defined here
> > /usr/include/linux/interrupt.h:106: 'atomic_t' is used as a type, but is not
> >    defined as a type.
> > /usr/include/linux/interrupt.h:127: `CONFIG_X86_L1_CACHE_SHIFT' undeclared
> >    (first use this function)
> > /usr/include/linux/interrupt.h:127: requested alignment is not a constant
> > /usr/include/linux/interrupt.h:129: non-local variable `
> >    FASTCALL(...)::tasklet_head tasklet_vec[1]' uses local type `
> >    FASTCALL(...)::tasklet_head'
> > /usr/include/linux/interrupt.h:130: non-local variable `
> >    FASTCALL(...)::tasklet_head tasklet_hi_vec[1]' uses local type `
> >    FASTCALL(...)::tasklet_head'
> > /usr/include/linux/interrupt.h:154: parse error before `*' token
> > /usr/include/linux/interrupt.h: In function `void FASTCALL(...)':
> > /usr/include/linux/interrupt.h:154: redefinition of `void FASTCALL(...)'
> > /usr/include/linux/interrupt.h:78: `void FASTCALL(...)' previously defined here
> > /usr/include/linux/interrupt.h:154: redefinition of `void FASTCALL(...)'
> > /usr/include/linux/interrupt.h:78: `void FASTCALL(...)' previously defined here
> > /usr/include/linux/interrupt.h:154: redefinition of `void FASTCALL(...)'
> > /usr/include/linux/interrupt.h:77: `void FASTCALL(...)' previously defined here
> > /usr/include/linux/interrupt.h:157: cannot declare static function inside
> >    another function
> > /usr/include/linux/interrupt.h: In function `void
> >    tasklet_schedule(FASTCALL(...)::tasklet_struct*)':
> > /usr/include/linux/interrupt.h:159: `__tasklet_schedule' undeclared (first use
> >    this function)
> > /usr/include/linux/interrupt.h:162: parse error before `*' token
> > /usr/include/linux/interrupt.h: In function `void FASTCALL(...)':
> > /usr/include/linux/interrupt.h:162: redefinition of `void FASTCALL(...)'
> > /usr/include/linux/interrupt.h:154: `void FASTCALL(...)' previously defined
> >    here
> > /usr/include/linux/interrupt.h:162: redefinition of `void FASTCALL(...)'
> > /usr/include/linux/interrupt.h:154: `void FASTCALL(...)' previously defined
> >    here
> > /usr/include/linux/interrupt.h:162: redefinition of `void FASTCALL(...)'
> > /usr/include/linux/interrupt.h:78: `void FASTCALL(...)' previously defined here
> > /usr/include/linux/interrupt.h:162: redefinition of `void FASTCALL(...)'
> > /usr/include/linux/interrupt.h:77: `void FASTCALL(...)' previously defined here
> > /usr/include/linux/interrupt.h:165: cannot declare static function inside
> >    another function
> > /usr/include/linux/interrupt.h: In function `void
> >    tasklet_hi_schedule(FASTCALL(...)::tasklet_struct*)':
> > /usr/include/linux/interrupt.h:167: `__tasklet_hi_schedule' undeclared (first
> >    use this function)
> > /usr/include/linux/interrupt.h:172: cannot declare static function inside
> >    another function
> > /usr/include/linux/interrupt.h: In function `void
> >    tasklet_disable_nosync(FASTCALL(...)::tasklet_struct*)':
> > /usr/include/linux/interrupt.h:173: `struct FASTCALL(...)::tasklet_struct' has
> >    no member named `count'
> > /usr/include/linux/interrupt.h:173: `atomic_inc' undeclared (first use this
> >    function)
> > /usr/include/linux/interrupt.h:174: `smp_mb__after_atomic_inc' undeclared
> >    (first use this function)
> > /usr/include/linux/interrupt.h:178: cannot declare static function inside
> >    another function
> > /usr/include/linux/interrupt.h: In function `void
> >    tasklet_disable(FASTCALL(...)::tasklet_struct*)':
> > /usr/include/linux/interrupt.h:181: `barrier' undeclared (first use this
> >    function)
> > /usr/include/linux/interrupt.h:185: cannot declare static function inside
> >    another function
> > /usr/include/linux/interrupt.h: In function `void
> >    tasklet_enable(FASTCALL(...)::tasklet_struct*)':
> > /usr/include/linux/interrupt.h:186: `smp_mb__before_atomic_dec' undeclared
> >    (first use this function)
> > /usr/include/linux/interrupt.h:187: `struct FASTCALL(...)::tasklet_struct' has
> >    no member named `count'
> > /usr/include/linux/interrupt.h:187: `atomic_dec' undeclared (first use this
> >    function)
> > /usr/include/linux/interrupt.h:191: cannot declare static function inside
> >    another function
> > /usr/include/linux/interrupt.h: In function `void
> >    tasklet_hi_enable(FASTCALL(...)::tasklet_struct*)':
> > /usr/include/linux/interrupt.h:193: `struct FASTCALL(...)::tasklet_struct' has
> >    no member named `count'
> > /usr/include/linux/interrupt.h:196: non-local function `void
> >    tasklet_kill(FASTCALL(...)::tasklet_struct*)' uses local type `
> >    FASTCALL(...)::tasklet_struct'
> > /usr/include/linux/interrupt.h:198: non-local function `void
> >    tasklet_init(FASTCALL(...)::tasklet_struct*, void (*)(long unsigned int),
> >    long unsigned int)' uses local type `FASTCALL(...)::tasklet_struct'
> > /usr/include/linux/interrupt.h:221: non-local variable `
> >    FASTCALL(...)::tasklet_struct bh_task_vec[]' uses local type `
> >    FASTCALL(...)::tasklet_struct'
> > /usr/include/linux/interrupt.h:224: syntax error before `;' token
> > /usr/include/linux/interrupt.h:227: cannot declare static function inside
> >    another function
> > In file included from /usr/local/include/click/glue.hh:34,
> >                  from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/include/linux/ctype.h: In function `void mark_bh(int)':
> > /usr/include/linux/ctype.h:38: cannot declare static function inside another
> >    function
> > /usr/include/linux/ctype.h: In function `unsigned char __tolower(unsigned
> >    char)':
> > /usr/include/linux/ctype.h:45: cannot declare static function inside another
> >    function
> > In file included from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/local/include/click/glue.hh: In function `unsigned char __toupper(unsigned
> >    char)':
> > /usr/local/include/click/glue.hh:37: parse error before `}' token
> > In file included from /usr/local/include/click/element.hh:4,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/local/include/click/glue.hh: In function `uint32_t random()':
> > /usr/local/include/click/glue.hh:121: `jiffies' undeclared (first use this
> >    function)
> > /usr/local/include/click/glue.hh: In function `long unsigned int strtoul(const
> >    char*, char**, int)':
> > /usr/local/include/click/glue.hh:157: `simple_strtoul' undeclared (first use
> >    this function)
> > /usr/local/include/click/glue.hh: In function `timeval operator-(timeval, const
> >    timeval&)':
> > /usr/local/include/click/glue.hh:357: non-local function `operator-(timeval,
> >    const timeval&)::StringAccum& operator<<(operator-(timeval, const
> >    timeval&)::StringAccum&, const timeval&)' uses local type `
> >    operator-(timeval, const timeval&)::StringAccum'
> > In file included from /usr/local/include/click/element.hh:5,
> >                  from sampleelt.hh:15,
> >                  from sampleelt.cc:22:
> > /usr/local/include/click/vector.hh: In function `const T* find(const T*, const
> >    T*, const T&)':
> > /usr/local/include/click/vector.hh:7: template argument is required for `
> >    find(const T*, const T*, const T&)::Vector<T>'
> > /usr/local/include/click/vector.hh:9: confused by earlier errors, bailing out
> > make[1]: *** [sampleelt.ko] Error 1
> > make[1]: Leaving directory `/root/kernel/samplepackage'
> > make: *** [sample.ko] Error 2
> > --- LOG END ---
> >
>


More information about the click mailing list