Open xiaottang2 opened 8 years ago
Here's the actual compiler error.
In file included from /home/jasontang/Documents/click/include/click-linuxmodule/include2/linux/spinlock.h:92:0,
from /home/jasontang/Documents/click/include/click-linuxmodule/include2/linux/seqlock.h:34,
from /home/jasontang/Documents/click/include/click-linuxmodule/include2/linux/time.h:13,
from /home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/signal.h:11,
from /home/jasontang/Documents/click/include/click-linuxmodule/include2/linux/signal.h:9,
from conftest.cpp:132:
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock.h: In function 'int __ticket_spin_trylock(arch_spinlock_t*)':
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock.h:77:16: error: no match for 'operator=' in 'old.arch_spinlock::<anonymous>.arch_spinlock::<anonymous union>::tickets = *(volatile __raw_tickets*)(& lock->arch_spinlock::<anonymous>.arch_spinlock::<anonymous union>::tickets)'
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock.h:77:16: note: candidates are:
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: __raw_tickets& __raw_tickets::operator=(const __raw_tickets&)
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: no known conversion for argument 1 from 'volatile __raw_tickets' to 'const __raw_tickets&'
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: __raw_tickets& __raw_tickets::operator=(__raw_tickets&&)
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: no known conversion for argument 1 from 'volatile __raw_tickets' to '__raw_tickets&&'
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock.h: In function 'int __ticket_spin_is_locked(arch_spinlock_t*)':
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock.h:107:29: error: no matching function for call to '__raw_tickets::__raw_tickets(volatile __raw_tickets&)'
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock.h:107:29: note: candidates are:
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: __raw_tickets::__raw_tickets()
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: candidate expects 0 arguments, 1 provided
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: constexpr __raw_tickets::__raw_tickets(const __raw_tickets&)
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: no known conversion for argument 1 from 'volatile __raw_tickets' to 'const __raw_tickets&'
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: constexpr __raw_tickets::__raw_tickets(__raw_tickets&&)
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: no known conversion for argument 1 from 'volatile __raw_tickets' to '__raw_tickets&&'
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock.h: In function 'int __ticket_spin_is_contended(arch_spinlock_t*)':
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock.h:114:29: error: no matching function for call to '__raw_tickets::__raw_tickets(volatile __raw_tickets&)'
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock.h:114:29: note: candidates are:
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: __raw_tickets::__raw_tickets()
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: candidate expects 0 arguments, 1 provided
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: constexpr __raw_tickets::__raw_tickets(const __raw_tickets&)
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: no known conversion for argument 1 from 'volatile __raw_tickets' to 'const __raw_tickets&'
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: constexpr __raw_tickets::__raw_tickets(__raw_tickets&&)
/home/jasontang/Documents/click/include/click-linuxmodule/include0/asm/spinlock_types.h:26:8: note: no known conversion for argument 1 from 'volatile __raw_tickets' to '__raw_tickets&&'
I am facing the same issue. Are you successful in building it now ?
This was introduced by 7d0d624 which breaks compilation with kernel <=3.2 at least (maybe anything up to <3.16 which compile fine) by stopping to patch ACCESS_ONCE. Fix is as easy as uncommenting line 434 of linuxmodule/click-linuxtool.pl . I would like to enable it if kernel is lower than 3.2 but there is no reference to linux version in click-linuxtool.pl. Anyone have an idea about a clean way to do that? @kohler @pallas ?
When I was trying to build click's kernel module by running
./configure --enable-linuxmodule
, it gave me an error as below:So I took a look at the config.log file, here is a snippet of it:
whole file is here ### config.log.txt
According to the INSTALL, kernel 3.2 should be supported, and this is running on a clean VM (iso from http://old-linux.com/ ).
I appreciate your help.