Click and 2.4.9 kernel bug in compiling + fix

powell molleti powelllinux at yahoo.com
Wed Feb 20 00:03:11 EST 2002


hi,
 
--- Brecht Vermeulen <brecht.vermeulen at rug.ac.be>
wrote:
> 
> Hi,
> 
> I had problems compiling click with linux kernel
> 2.4.9.
> 
> It was in the configure script, at the 
> checking whether -fpermissive is required test
> 
> the answer was 'yes' because the program :
> #line 3654 "configure"
> #include "confdefs.h"
> #define __KERNEL__
> #define MODULE
> #define _FEATURES_H
> #define new xxx_new
> #define this xxx_this
> #define delete xxx_delete
> #define class xxx_class
> #define virtual xxx_virtual
> #include <linux/skbuff.h>
> int main() {
>  
> ; return 0; }
> 
> didn't compile:
> In file included from
> /usr/src/linux/include/linux/highmem.h:5,
>                  from
> /usr/src/linux/include/linux/skbuff.h:27,
>                  from configure:3999:
> /usr/src/linux/include/asm/pgalloc.h: In function
> `void
> flush_tlb_mm(mm_struct *)':
> /usr/src/linux/include/asm/pgalloc.h:173: parse
> error before `::'
> /usr/src/linux/include/asm/pgalloc.h: In function
> `void
> flush_tlb_range(mm_struct *, long unsigned int, long
> unsigned int)':
> /usr/src/linux/include/asm/pgalloc.h:187: parse
> error before `::'
> 
> and the next test, 'is -fpermissive allowed' did
> return 'no' , same
> problem while compiling, so the warning was printed
> that the kernel
> module couldn't be builded because the header files
> were not adapted to
> C++.
> 
> I did some lookup work and arrived in
> include/asm/pgalloc.h 
> at                
> __flush_tlb();                                      
>                                 
> 
> which is defined in pgtable.h as
> #define __flush_tlb()                               
>                   
> \
>         do {                                        
>                   
> \
>                 unsigned int tmpreg;                
>                   
> \
>                                                     
>                   
> \
>                 __asm__ __volatile__(               
>                   
> \
>                         "movl %%cr3, %0;  # flush
> TLB \n"              
> \
>                         "movl %0, %%cr3;            
>  \n"              
> \
>                         : "=r" (tmpreg)             
>                   
> \
>                         :: "memory");               
>                   \
>         } while (0)
> 
> to solve the problem I have changed :: in : : based
> on a similar thing
> in the 2.2.18 patch for rwlock.h. But I don't know
> what this means and
> if this is the correct solution (and why hasn't
> nobody else had this
> problem before ?

yes it broke for me here too, i did not mail to the
list about it though.

cya
powell

> 
> best regards,
> Brecht


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com



More information about the click mailing list