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

Eddie Kohler kohler at cs.ucla.edu
Sun Oct 1 19:50:41 EDT 2006


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