Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling fails when nsclick is enabled #196

Closed
fabian-marquardt opened this issue May 26, 2015 · 6 comments
Closed

Compiling fails when nsclick is enabled #196

fabian-marquardt opened this issue May 26, 2015 · 6 comments

Comments

@fabian-marquardt
Copy link

If I configure click with "--enable-nsclick", compiling fails with the following error message:

  CXX ../elements/tcpudp/fasttcpflows.cc
In file included from ../elements/tcpudp/fasttcpflows.cc:20:0:
../elements/tcpudp/fasttcpflows.hh:60:37: error: expected class-name before ‘{’ token
 class FastTCPFlows : public Element {
                                     ^
../elements/tcpudp/fasttcpflows.hh:72:3: error: ‘click_jiffies_t’ does not name a type
   click_jiffies_t _first;
   ^
../elements/tcpudp/fasttcpflows.hh:73:3: error: ‘click_jiffies_t’ does not name a type
   click_jiffies_t _last;
   ^
../elements/tcpudp/fasttcpflows.hh:76:5: error: ‘Packet’ does not name a type
     Packet *syn_packet;
     ^
../elements/tcpudp/fasttcpflows.hh:77:5: error: ‘Packet’ does not name a type
     Packet *fin_packet;
     ^
../elements/tcpudp/fasttcpflows.hh:78:5: error: ‘Packet’ does not name a type
     Packet *data_packet;
     ^
../elements/tcpudp/fasttcpflows.hh:83:3: error: ‘Packet’ does not name a type
   Packet *get_packet();
   ^
../elements/tcpudp/fasttcpflows.hh:89:3: error: ‘GapRate’ does not name a type
   GapRate _rate;
   ^
../elements/tcpudp/fasttcpflows.hh:101:17: error: ‘Vector’ has not been declared
   int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
                 ^
../elements/tcpudp/fasttcpflows.hh:101:23: error: expected ‘,’ or ‘...’ before ‘<’ token
   int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
                       ^
../elements/tcpudp/fasttcpflows.hh:102:18: error: ‘ErrorHandler’ has not been declared
   int initialize(ErrorHandler *) CLICK_COLD;
                  ^
../elements/tcpudp/fasttcpflows.hh:103:16: error: ‘CleanupStage’ has not been declared
   void cleanup(CleanupStage) CLICK_COLD;
                ^
../elements/tcpudp/fasttcpflows.hh:104:3: error: ‘Packet’ does not name a type
   Packet *pull(int);
   ^
../elements/tcpudp/fasttcpflows.hh:109:3: error: ‘click_jiffies_t’ does not name a type
   click_jiffies_t first() { return _first; }
   ^
../elements/tcpudp/fasttcpflows.hh:110:3: error: ‘click_jiffies_t’ does not name a type
   click_jiffies_t last() { return _last; }
   ^
../elements/tcpudp/fasttcpflows.hh: In member function ‘const char* FastTCPFlows::port_count() const’:
../elements/tcpudp/fasttcpflows.hh:98:43: error: ‘PORTS_0_1’ was not declared in this scope
   const char *port_count() const { return PORTS_0_1; }
                                           ^
../elements/tcpudp/fasttcpflows.hh: In member function ‘const char* FastTCPFlows::processing() const’:
../elements/tcpudp/fasttcpflows.hh:99:43: error: ‘PULL’ was not declared in this scope
   const char *processing() const { return PULL; }
                                           ^
../elements/tcpudp/fasttcpflows.cc: In constructor ‘FastTCPFlows::FastTCPFlows()’:
../elements/tcpudp/fasttcpflows.cc:33:3: error: ‘_first’ was not declared in this scope
   _first = _last = 0;
   ^
../elements/tcpudp/fasttcpflows.cc:33:12: error: ‘_last’ was not declared in this scope
   _first = _last = 0;
            ^
../elements/tcpudp/fasttcpflows.cc: At global scope:
../elements/tcpudp/fasttcpflows.cc:42:25: error: ‘int FastTCPFlows::configure’ is not a static data member of ‘class FastTCPFlows’
 FastTCPFlows::configure(Vector<String> &conf, ErrorHandler *errh)
                         ^
../elements/tcpudp/fasttcpflows.cc:42:25: error: ‘Vector’ was not declared in this scope
../elements/tcpudp/fasttcpflows.cc:42:25: note: suggested alternative:
In file included from ../include/click/element.hh:5:0,
                 from ../elements/tcpudp/fasttcpflows.hh:53,
                 from ../elements/tcpudp/fasttcpflows.cc:20:
../include/click/vector.hh:111:7: note:   ‘Click::Vector’
 class Vector {
       ^
../elements/tcpudp/fasttcpflows.cc:42:32: error: ‘String’ was not declared in this scope
 FastTCPFlows::configure(Vector<String> &conf, ErrorHandler *errh)
                                ^
../elements/tcpudp/fasttcpflows.cc:42:32: note: suggested alternative:
In file included from ../include/click/element.hh:6:0,
                 from ../elements/tcpudp/fasttcpflows.hh:53,
                 from ../elements/tcpudp/fasttcpflows.cc:20:
../include/click/string.hh:18:7: note:   ‘Click::String’
 class String { public:
       ^
../elements/tcpudp/fasttcpflows.cc:42:41: error: ‘conf’ was not declared in this scope
 FastTCPFlows::configure(Vector<String> &conf, ErrorHandler *errh)
                                         ^
../elements/tcpudp/fasttcpflows.cc:42:47: error: ‘ErrorHandler’ was not declared in this scope
 FastTCPFlows::configure(Vector<String> &conf, ErrorHandler *errh)
                                               ^
../elements/tcpudp/fasttcpflows.cc:42:47: note: suggested alternative:
In file included from ../elements/tcpudp/fasttcpflows.cc:23:0:
../include/click/error.hh:90:7: note:   ‘Click::ErrorHandler’
 class ErrorHandler { public:
       ^
../elements/tcpudp/fasttcpflows.cc:42:61: error: ‘errh’ was not declared in this scope
 FastTCPFlows::configure(Vector<String> &conf, ErrorHandler *errh)
                                                             ^
../elements/tcpudp/fasttcpflows.cc:42:65: error: expression list treated as compound expression in initializer [-fpermissive]
 FastTCPFlows::configure(Vector<String> &conf, ErrorHandler *errh)
                                                                 ^
../elements/tcpudp/fasttcpflows.cc:43:1: error: expected ‘,’ or ‘;’ before ‘{’ token
 {
 ^
elements.mk:362: recipe for target 'fasttcpflows.o' failed
make[1]: *** [fasttcpflows.o] Error 1
make[1]: Leaving directory '/data/nsclick/lib/click-master/ns'
Makefile:55: recipe for target 'ns' failed
make: *** [ns] Error 2
@chuanic
Copy link

chuanic commented May 27, 2015

you can find the suggested alternative, that is maybe your method to correct your program

ctrl+F and input "suggested alternative" in the above content.

@tbarbette
Copy link
Collaborator

Hi,

What are the other configure options you're using? Following http://www.read.cs.ucla.edu/click/nsclick for NS 3 it works for me. Did you try a "make distclean" before too? I recently submitted a PR which moved fasttcpflows from linuxmodule to be compatible with userlevel. Maybe the old fasttcpflows.cc/hh is still in your elements/linuxmodule folder which would prevent tcpudp/fasttcpflows.hh from being included?

Tom

@lthurlow
Copy link

I had a related issue with this build (2a181e0). I used EC2 instance clean, followed the instruction in INSTALL and got the following error. I found that this build (392b1f6) was able to make following the instructions.

In file included from ../elements/standard/cpuqueue.cc:2:0:
../elements/standard/cpuqueue.hh:22:33: error: expected class-name before ‘{’ token
 class CPUQueue : public Element {
                                 ^
../elements/standard/cpuqueue.hh:24:5: error: ‘Packet’ does not name a type
     Packet **_q;
     ^
../elements/standard/cpuqueue.hh:36:3: error: ‘Packet’ does not name a type
   Packet *deq(int);
   ^
../elements/standard/cpuqueue.hh:38:10: error: ‘String’ does not name a type
   static String read_handler(Element *, void *) CLICK_COLD;
          ^
../elements/standard/cpuqueue.hh:48:18: error: ‘ErrorHandler’ has not been declared
   int initialize(ErrorHandler *) CLICK_COLD;
                  ^
../elements/standard/cpuqueue.hh:49:16: error: ‘CleanupStage’ has not been declared
   void cleanup(CleanupStage) CLICK_COLD;
                ^
../elements/standard/cpuqueue.hh:54:17: error: ‘Vector’ has not been declared
   int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
                 ^
../elements/standard/cpuqueue.hh:54:23: error: expected ‘,’ or ‘...’ before ‘<’ token
   int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
                       ^
../elements/standard/cpuqueue.hh:56:23: error: ‘Packet’ has not been declared
   void push(int port, Packet *);
                       ^
../elements/standard/cpuqueue.hh:57:3: error: ‘Packet’ does not name a type
   Packet *pull(int port);
   ^
../elements/standard/cpuqueue.hh: In member function ‘const char* CPUQueue::processing() const’:
../elements/standard/cpuqueue.hh:47:44: error: ‘PUSH_TO_PULL’ was not declared in this scope
   const char *processing() const  { return PUSH_TO_PULL; }
                                            ^
../elements/standard/cpuqueue.cc: At global scope:
../elements/standard/cpuqueue.cc:17:21: error: ‘int CPUQueue::configure’ is not a static member of ‘class CPUQueue’
 CPUQueue::configure(Vector<String> &conf, ErrorHandler *errh)
                     ^
../elements/standard/cpuqueue.cc:17:21: error: ‘Vector’ was not declared in this scope
../elements/standard/cpuqueue.cc:17:21: note: suggested alternative:
In file included from ../include/click/element.hh:5:0,
                 from ../elements/standard/cpuqueue.hh:20,
                 from ../elements/standard/cpuqueue.cc:2:
../include/click/vector.hh:111:7: note:   ‘Click::Vector’
 class Vector {
       ^
../elements/standard/cpuqueue.cc:17:28: error: ‘String’ was not declared in this scope
 CPUQueue::configure(Vector<String> &conf, ErrorHandler *errh)
                            ^
../elements/standard/cpuqueue.cc:17:28: note: suggested alternative:
In file included from ../include/click/element.hh:6:0,
                 from ../elements/standard/cpuqueue.hh:20,
                 from ../elements/standard/cpuqueue.cc:2:
../include/click/string.hh:18:7: note:   ‘Click::String’
 class String { public:
       ^
../elements/standard/cpuqueue.cc:17:37: error: ‘conf’ was not declared in this scope
 CPUQueue::configure(Vector<String> &conf, ErrorHandler *errh)
                                     ^
../elements/standard/cpuqueue.cc:17:43: error: ‘ErrorHandler’ was not declared in this scope
 CPUQueue::configure(Vector<String> &conf, ErrorHandler *errh)
                                           ^
../elements/standard/cpuqueue.cc:17:43: note: suggested alternative:
In file included from ../elements/standard/cpuqueue.cc:3:0:
../include/click/error.hh:90:7: note:   ‘Click::ErrorHandler’
 class ErrorHandler { public:
       ^
../elements/standard/cpuqueue.cc:17:57: error: ‘errh’ was not declared in this scope
 CPUQueue::configure(Vector<String> &conf, ErrorHandler *errh)
                                                         ^
../elements/standard/cpuqueue.cc:17:61: error: expression list treated as compound expression in initializer [-fpermissive]
 CPUQueue::configure(Vector<String> &conf, ErrorHandler *errh)
                                                             ^
../elements/standard/cpuqueue.cc:18:1: error: expected ‘,’ or ‘;’ before ‘{’ token
 {
 ^
../elements/standard/cpuqueue.cc:31:22: error: ‘int CPUQueue::initialize’ is not a static member of ‘class CPUQueue’
 CPUQueue::initialize(ErrorHandler *errh)
                      ^
../elements/standard/cpuqueue.cc:31:22: error: ‘ErrorHandler’ was not declared in this scope
../elements/standard/cpuqueue.cc:31:22: note: suggested alternative:
In file included from ../elements/standard/cpuqueue.cc:3:0:
../include/click/error.hh:90:7: note:   ‘Click::ErrorHandler’
 class ErrorHandler { public:
       ^
../elements/standard/cpuqueue.cc:31:36: error: ‘errh’ was not declared in this scope
 CPUQueue::initialize(ErrorHandler *errh)
                                    ^
../elements/standard/cpuqueue.cc:32:1: error: expected ‘,’ or ‘;’ before ‘{’ token
 {
 ^
../elements/standard/cpuqueue.cc:42:31: error: variable or field ‘cleanup’ declared void
 CPUQueue::cleanup(CleanupStage)
                               ^
../elements/standard/cpuqueue.cc:42:19: error: ‘CleanupStage’ was not declared in this scope
 CPUQueue::cleanup(CleanupStage)
                   ^
make[1]: *** [cpuqueue.o] Error 1
make[1]: Leaving directory `/home/ubuntu/ns-allinone-3.23/click/ns'

@tbarbette
Copy link
Collaborator

Is it solved by the commit #199? If so, please close the issue ;)

@lthurlow
Copy link

Tested on fedora I do not guild a build issue with --enable-nsclick. I think you can close this one, I will open another one for --enable-all-elements.

@fabian-marquardt
Copy link
Author

Sorry for my long absence, I was busy with other projects. Just to let you know, the issue is fixed on my system when using the recent master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants