[Click] Using class templates compile, but fail to link at runtime.

Paine, Thomas Asa PAINETA at uwec.edu
Tue Oct 3 18:10:47 EDT 2006


Eddie,
	I haven't tried the template version again yet, but the non
template class is now doing it after replacing its news/deletes with
vmalloc/vfree (because of large array allocations in this class).  This
too produced similar errors when trying to install the module (below).
Removing the ksyms.* didn't seem to make any difference here.

With using vmalloc....

click: starting router thread pid 1050 (f7950640)
tms: module license 'unspecified' taints kernel.
tms: Unknown symbol _Z5vfreePv
tms: Unknown symbol _Z7vmallocm

Thanks, 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
   Thomas Paine (paineta at uwec.edu) 
   University of Wisconsin - Eau Claire 
   garbage foo(garbage g){return(g);} 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 


-----Original Message-----
From: Eddie Kohler [mailto:kohler at cs.ucla.edu] 
Sent: Sunday, October 01, 2006 6:51 PM
To: Paine, Thomas Asa
Cc: click at amsterdam.lcs.mit.edu
Subject: Re: [Click] Using class templates compile, but fail to link at
runtime.

Hi Thomas,

Try the following magic incantation:

    cd CLICKBUILDDIR
    rm linuxmodule/ksyms.*
    make install

and then click-install again.  I think there may be an issue with the
way the new Click build process marks symbols as exportable.

Eddie


Paine, Thomas Asa wrote:
> 	I have added a simple template based class to my own package,
but for 
> some reason it will not link when click-install is run.  When I build 
> the package I have no compilation errors and everything seems to look 
> good.  The class uses the ELEMENT_PROVIDES(HistoryQueue) and the user 
> element uses ELEMENT_REQUIRES(HistoryQueue).  Checking the 
> kelements.conf and elementmap-tms.xml files I can see everything is 
> accounted for.  As well, all the .ko files are produced.  If I 
> implement my class without using templates it compiles, links, and 
> loads fine (and runs).
> 
> However, when I try to load my TMS package with the template version 
> of the implementation I get this...
> 
> click: starting router thread pid 28918 (f6699de0)
> tms: Unknown symbol _ZN12HistoryQueueI5EventE3popEv
> tms: Unknown symbol _ZN12HistoryQueueI5EventED1Ev
> tms: Unknown symbol _ZN12HistoryQueueI5EventEC1Ej
> tms: Unknown symbol _ZN12HistoryQueueI5EventE4pushERS0_
> click: stopping router thread pid 28918
> 
> 
> Is there something special like a pecompiler setting, something I need

> to declare, macro, or something in the packages Makefile I need to 
> add/change when using templates in my classes?  When looking at things

> like bighashmap or vector (which also use templates), I don't see any 
> major differences (except for what seems to be misplaced 
> CLICK_ENDDECLS and CLICK_DECLS macros in those).
> 
> Thanks,
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
>    Thomas Paine (paineta at uwec.edu) 
>    University of Wisconsin - Eau Claire 
>    garbage foo(garbage g){return(g);} 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click



More information about the click mailing list