Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

networking branch of ivy cannot be built #82

Open
prpr2770 opened this issue Jun 22, 2020 · 3 comments
Open

networking branch of ivy cannot be built #82

prpr2770 opened this issue Jun 22, 2020 · 3 comments

Comments

@prpr2770
Copy link

I've downloaded the networking branch of Ivy and tried to build Ivy from source. I obtained the following errors

# python ./build_submodules.py 
python scripts/mk_make.py --python --prefix /home/docker/ivy_networking/ivy --pypkgdir /home/docker/ivy_networking/ivy/ivy/
python: can't open file 'scripts/mk_make.py': [Errno 2] No such file or directory

# python setup.py 
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: no commands supplied

@kenmcmil
Copy link
Contributor

Did you clone ivy with --recurse-submodules? If not, then do this:

$ git submodule update --init

Also, setup.py needs a command, either install or develop.

By the way, you can also just do this in your existing clone of ivy:

$ git checkout networking
$ git pull origin networking
$ python setup.py install

The last line isn't needed if you installed Ivy using develop, since in that case the Ivy files are installed by symbolic links.

@prpr2770
Copy link
Author

I tried the following steps to install ivy

$ git clone --recurse-submodules https://github.com/microsoft/ivy.git
$ python ./build_submodules.py 
$ git checkout networking
$ git pull origin networking
$ sudo python setup.py install

While trying to compile the following ivy script(ip_codec_test.ivy), I obtained the following error

ivy/doc/examples/networking# ivyc target=test ./ip_codec_test.ivy
g++  -I /usr/local/lib/python2.7/dist-packages/ms_ivy-0.3-py2.7.egg/ivy/include -L /usr/local/lib/python2.7/dist-packages/ms_ivy-0.3-py2.7.egg/ivy/lib -Wl,-rpath=/usr/local/lib/python2.7/dist-packages/ms_ivy-0.3-py2.7.egg/ivy/lib -g -o ./ip_codec_test ./ip_codec_test.cpp -lz3 -pthread
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:9: error: expected unqualified-id before '/' token
 class __/ip_codec_test {
         ^
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:694:33: error: expected ',' or '...' before '/' token
 inline bool operator ==(const __/ip_codec_test::ip__datagram &s, const __/ip_codec_test::ip__datagram &t){
                                 ^
././ip_codec_test.h:694:105: error: 'bool operator==(__)' must take exactly two arguments
 inline bool operator ==(const __/ip_codec_test::ip__datagram &s, const __/ip_codec_test::ip__datagram &t){
                                                                                                         ^
./ip_codec_test.cpp:32:11: error: expected unqualified-id before '/' token
 typedef __/ip_codec_test ivy_class;
           ^
./ip_codec_test.cpp:104:8: error: expected initializer before '/' token
 void __/ip_codec_test::install_reader(reader *r) {
        ^
./ip_codec_test.cpp:110:8: error: expected initializer before '/' token
 void __/ip_codec_test::install_thread(reader *r) {
        ^
./ip_codec_test.cpp:137:8: error: expected initializer before '/' token
 void __/ip_codec_test::install_timer(timer *r) {
        ^
./ip_codec_test.cpp:145:12: error: expected initializer before '/' token
     void __/ip_codec_test::__lock() { pthread_mutex_lock(&mutex); }
            ^
./ip_codec_test.cpp:146:12: error: expected initializer before '/' token
     void __/ip_codec_test::__unlock() { pthread_mutex_unlock(&mutex); }
            ^
./ip_codec_test.cpp:188:29: error: expected ',' or '...' before '/' token
     virtual bool generate(__/ip_codec_test& obj)=0;
                             ^
./ip_codec_test.cpp:189:28: error: expected ',' or '...' before '/' token
     virtual void execute(__/ip_codec_test& obj)=0;
                            ^
./ip_codec_test.cpp:1142:52: error: expected ',' or '...' before '/' token
 std::ostream &operator <<(std::ostream &s, const __/ip_codec_test::ip__datagram &t);
                                                    ^
./ip_codec_test.cpp:1144:3: error: expected unqualified-id before '/' token
 __/ip_codec_test::ip__datagram _arg<__/ip_codec_test::ip__datagram>(std::vector<ivy_value> &args, unsigned idx, long long bound);
   ^
./ip_codec_test.cpp:1146:7: error: parse error in template argument list
 void  __ser<__/ip_codec_test::ip__datagram>(ivy_ser &res, const __/ip_codec_test::ip__datagram&);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1146:67: error: expected ',' or '...' before '/' token
 void  __ser<__/ip_codec_test::ip__datagram>(ivy_ser &res, const __/ip_codec_test::ip__datagram&);
                                                                   ^
./ip_codec_test.cpp:1146:7: error: template-id '__ser<<expression error> >' for 'void __ser(ivy_ser&, __)' does not match any template declaration
 void  __ser<__/ip_codec_test::ip__datagram>(ivy_ser &res, const __/ip_codec_test::ip__datagram&);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:937:25: note: candidate is: template<class T> void __ser(ivy_ser&, const T&)
 template <class T> void __ser(ivy_ser &res, const T &inp);
                         ^~~~~
./ip_codec_test.cpp:1148:7: error: parse error in template argument list
 void  __deser<__/ip_codec_test::ip__datagram>(ivy_deser &inp, __/ip_codec_test::ip__datagram &res);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1148:65: error: expected ',' or '...' before '/' token
 void  __deser<__/ip_codec_test::ip__datagram>(ivy_deser &inp, __/ip_codec_test::ip__datagram &res);
                                                                 ^
./ip_codec_test.cpp:1148:7: error: template-id '__deser<<expression error> >' for 'void __deser(ivy_deser&, __)' does not match any template declaration
 void  __deser<__/ip_codec_test::ip__datagram>(ivy_deser &inp, __/ip_codec_test::ip__datagram &res);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:969:25: note: candidate is: template<class T> void __deser(ivy_deser&, T&)
 template <class T> void __deser(ivy_deser &inp, T &res);
                         ^~~~~~~
./ip_codec_test.cpp:1150:6: error: parse error in template argument list
 void __from_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v, __/ip_codec_test::ip__datagram &res);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1150:83: error: expected ',' or '...' before '/' token
 void __from_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v, __/ip_codec_test::ip__datagram &res);
                                                                                   ^
./ip_codec_test.cpp:1150:6: error: template-id '__from_solver<<expression error> >' for 'void __from_solver(gen&, const z3::expr&, __)' does not match any template declaration
 void __from_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v, __/ip_codec_test::ip__datagram &res);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1012:25: note: candidate is: template<class T> void __from_solver(gen&, const z3::expr&, T&)
 template <class T> void __from_solver( gen &g, const  z3::expr &v, T &res);
                         ^~~~~~~~~~~~~
./ip_codec_test.cpp:1152:10: error: parse error in template argument list
 z3::expr __to_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v, __/ip_codec_test::ip__datagram &val);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1152:85: error: expected ',' or '...' before '/' token
 z3::expr __to_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v, __/ip_codec_test::ip__datagram &val);
                                                                                     ^
./ip_codec_test.cpp:1152:10: error: template-id '__to_solver<<expression error> >' for 'z3::expr __to_solver(gen&, const z3::expr&, __)' does not match any template declaration
 z3::expr __to_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v, __/ip_codec_test::ip__datagram &val);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1048:29: note: candidate is: template<class T> z3::expr __to_solver(gen&, const z3::expr&, T&)
 template <class T> z3::expr __to_solver( gen &g, const  z3::expr &v, T &val) {
                             ^~~~~~~~~~~
./ip_codec_test.cpp:1154:6: error: parse error in template argument list
 void __randomize<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1154:6: error: template-id '__randomize<<expression error> >' for 'void __randomize(gen&, const z3::expr&)' does not match any template declaration
./ip_codec_test.cpp:1100:25: note: candidate is: template<class T> void __randomize(gen&, const z3::expr&)
 template <class T> void __randomize( gen &g, const  z3::expr &v);
                         ^~~~~~~~~~~
./ip_codec_test.cpp:1155:25: error: expected ',' or '...' before '/' token
 bool operator==(const __/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned &x, const __/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned &y){
                         ^
./ip_codec_test.cpp:1155:163: error: 'bool operator==(__)' must take exactly two arguments
 bool operator==(const __/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned &x, const __/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned &y){
                                                                                                                                                                   ^
./ip_codec_test.cpp:1169:65: error: expected ',' or '...' before '/' token
              std::ostream &operator <<(std::ostream &s, const __/ip_codec_test::stream &a) {
                                                                 ^
./ip_codec_test.cpp: In function 'std::ostream& operator<<(std::ostream&, __)':
./ip_codec_test.cpp:1169:63: error: '<anonymous>' has incomplete type
              std::ostream &operator <<(std::ostream &s, const __/ip_codec_test::stream &a) {
                                                               ^~
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:7: note: forward declaration of 'class __'
 class __/ip_codec_test {
       ^~
./ip_codec_test.cpp: In function 'std::ostream& operator<<(std::ostream&, __)':
./ip_codec_test.cpp:1171:28: error: 'a' was not declared in this scope
   for (unsigned i = 0; i < a.size(); i++) {
                            ^
./ip_codec_test.cpp: At global scope:
./ip_codec_test.cpp:1181:8: error: expected unqualified-id before '/' token
      __/ip_codec_test::stream _arg<__/ip_codec_test::stream>(std::vector<ivy_value> &args, unsigned idx, long long bound) {
        ^
./ip_codec_test.cpp:1194:11: error: parse error in template argument list
      void __deser<__/ip_codec_test::stream>(ivy_deser &inp, __/ip_codec_test::stream &res) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1194:63: error: expected ',' or '...' before '/' token
      void __deser<__/ip_codec_test::stream>(ivy_deser &inp, __/ip_codec_test::stream &res) {
                                                               ^
./ip_codec_test.cpp:1194:11: error: template-id '__deser<<expression error> >' for 'void __deser(ivy_deser&, __)' does not match any template declaration
      void __deser<__/ip_codec_test::stream>(ivy_deser &inp, __/ip_codec_test::stream &res) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:969:25: note: candidate is: template<class T> void __deser(ivy_deser&, T&)
 template <class T> void __deser(ivy_deser &inp, T &res);
                         ^~~~~~~
./ip_codec_test.cpp:1205:11: error: parse error in template argument list
      void __ser<__/ip_codec_test::stream>(ivy_ser &res, const __/ip_codec_test::stream &inp) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1205:65: error: expected ',' or '...' before '/' token
      void __ser<__/ip_codec_test::stream>(ivy_ser &res, const __/ip_codec_test::stream &inp) {
                                                                 ^
./ip_codec_test.cpp:1205:11: error: template-id '__ser<<expression error> >' for 'void __ser(ivy_ser&, __)' does not match any template declaration
      void __ser<__/ip_codec_test::stream>(ivy_ser &res, const __/ip_codec_test::stream &inp) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:937:25: note: candidate is: template<class T> void __ser(ivy_ser&, const T&)
 template <class T> void __ser(ivy_ser &res, const T &inp);
                         ^~~~~
./ip_codec_test.cpp:1218:67: error: expected ',' or '...' before '/' token
             z3::expr __to_solver(gen& g, const z3::expr& z3val, __/ip_codec_test::stream& val) {
                                                                   ^
./ip_codec_test.cpp:1218:22: error: template-id '__to_solver<>' for 'z3::expr __to_solver(gen&, const z3::expr&, __)' does not match any template declaration
             z3::expr __to_solver(gen& g, const z3::expr& z3val, __/ip_codec_test::stream& val) {
                      ^~~~~~~~~~~
./ip_codec_test.cpp:1048:29: note: candidate is: template<class T> z3::expr __to_solver(gen&, const z3::expr&, T&)
 template <class T> z3::expr __to_solver( gen &g, const  z3::expr &v, T &val) {
                             ^~~~~~~~~~~
./ip_codec_test.cpp:1228:12: error: parse error in template argument list
      void  __from_solver<__/ip_codec_test::stream>( gen &g, const  z3::expr &v,__/ip_codec_test::stream &res){
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1228:82: error: expected ',' or '...' before '/' token
      void  __from_solver<__/ip_codec_test::stream>( gen &g, const  z3::expr &v,__/ip_codec_test::stream &res){
                                                                                  ^
./ip_codec_test.cpp:1228:12: error: template-id '__from_solver<<expression error> >' for 'void __from_solver(gen&, const z3::expr&, __)' does not match any template declaration
      void  __from_solver<__/ip_codec_test::stream>( gen &g, const  z3::expr &v,__/ip_codec_test::stream &res){
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1012:25: note: candidate is: template<class T> void __from_solver(gen&, const z3::expr&, T&)
 template <class T> void __from_solver( gen &g, const  z3::expr &v, T &res);
                         ^~~~~~~~~~~~~
./ip_codec_test.cpp:1238:12: error: parse error in template argument list
      void  __randomize<__/ip_codec_test::stream>( gen &g, const  z3::expr &v){
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1238:12: error: template-id '__randomize<<expression error> >' for 'void __randomize(gen&, const z3::expr&)' does not match any template declaration
./ip_codec_test.cpp:1100:25: note: candidate is: template<class T> void __randomize(gen&, const z3::expr&)
 template <class T> void __randomize( gen &g, const  z3::expr &v);
                         ^~~~~~~~~~~
./ip_codec_test.cpp:1248:8: error: expected initializer before '/' token
  int __/ip_codec_test::___ivy_choose(int rng,const char *name,int id) {
        ^
./ip_codec_test.cpp:1255:22: error: expected initializer before '/' token
 unsigned long long __/ip_codec_test::stream__begin(const stream& A){
                      ^
./ip_codec_test.cpp:1261:12: error: expected initializer before '/' token
 unsigned __/ip_codec_test::stream__value(const stream& a, unsigned long long i){
            ^
./ip_codec_test.cpp:1267:22: error: expected initializer before '/' token
 unsigned long long __/ip_codec_test::stream__end(const stream& a){
                      ^
./ip_codec_test.cpp:1273:3: error: expected unqualified-id before '/' token
 __/ip_codec_test::stream __/ip_codec_test::stream__segment(const stream& a, unsigned long long lo, unsigned long long hi){
   ^
./ip_codec_test.cpp:1278:106: error: wrong number of template arguments (1, should be 2)
         struct __thunk__0 : z3_thunk<__/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned,bool>{
                                                                                                          ^
./ip_codec_test.cpp:1137:7: note: provided for 'template<class D, class R> class z3_thunk'
 class z3_thunk : public thunk<D,R> {
       ^~~~~~~~
./ip_codec_test.cpp:1281:37: error: expected ',' or '...' before '/' token
             bool operator()(const __/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned &arg){
                                     ^
./ip_codec_test.cpp: In member function 'bool __thunk__0::operator()(__)':
./ip_codec_test.cpp:1281:35: error: '<anonymous>' has incomplete type
             bool operator()(const __/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned &arg){
                                   ^~
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:7: note: forward declaration of 'class __'
 class __/ip_codec_test {
       ^~
./ip_codec_test.cpp: At global scope:
./ip_codec_test.cpp:1289:8: error: expected initializer before '/' token
 void __/ip_codec_test::__init(){
        ^
./ip_codec_test.cpp:1294:12: error: expected initializer before '/' token
 unsigned __/ip_codec_test::ip__checksum_codec__decode(const stream& raw, unsigned long long idx){
            ^
./ip_codec_test.cpp:1315:3: error: expected unqualified-id before '/' token
 __/ip_codec_test::stream __/ip_codec_test::ip__encode(const ip__datagram& dgram){
   ^
./ip_codec_test.cpp:1372:22: error: expected initializer before '/' token
 unsigned long long __/ip_codec_test::ip__pos_codec__decode(const stream& raw, unsigned long long idx){
                      ^
./ip_codec_test.cpp:1393:8: error: expected initializer before '/' token
 void __/ip_codec_test::stream__set(stream& a, unsigned long long x, unsigned y){
        ^
./ip_codec_test.cpp:1400:8: error: expected initializer before '/' token
 void __/ip_codec_test::ip__addr_codec__encode(stream& raw, unsigned long long idx, unsigned val){
        ^
./ip_codec_test.cpp:1422:22: error: expected initializer before '/' token
 unsigned long long __/ip_codec_test::pos__next(unsigned long long x){
                      ^
./ip_codec_test.cpp:1430:8: error: expected initializer before '/' token
 void __/ip_codec_test::show_decoded(const ip__datagram& dgram){
        ^
./ip_codec_test.cpp:1436:8: error: expected initializer before '/' token
 void __/ip_codec_test::imp__show_decoded(const ip__datagram& dgram){
        ^
./ip_codec_test.cpp:1440:8: error: expected initializer before '/' token
 void __/ip_codec_test::ip__pos_codec__encode(stream& raw, unsigned long long idx, unsigned long long val){
        ^
./ip_codec_test.cpp:1462:8: error: expected initializer before '/' token
 bool __/ip_codec_test::ext__ip__datagram__valid(const ip__datagram& d){
        ^
./ip_codec_test.cpp:1470:8: error: expected initializer before '/' token
 void __/ip_codec_test::stream__resize(stream& a, unsigned long long s, unsigned v){
        ^
./ip_codec_test.cpp:1479:8: error: expected initializer before '/' token
 void __/ip_codec_test::imp__show_encoded(const stream& raw){
        ^
./ip_codec_test.cpp:1483:12: error: expected initializer before '/' token
 unsigned __/ip_codec_test::ip__addr_codec__decode(const stream& raw, unsigned long long idx){
            ^
./ip_codec_test.cpp:1504:8: error: expected initializer before '/' token
 void __/ip_codec_test::ip__ident_codec__encode(stream& raw, unsigned long long idx, unsigned val){
        ^
./ip_codec_test.cpp:1526:8: error: expected initializer before '/' token
 void __/ip_codec_test::stream__extend(stream& a, const stream& b){
        ^
./ip_codec_test.cpp:1533:8: error: expected initializer before '/' token
 void __/ip_codec_test::show_encoded(const stream& raw){
        ^
./ip_codec_test.cpp:1539:3: error: expected unqualified-id before '/' token
 __/ip_codec_test::ip__datagram __/ip_codec_test::ip__decode(const stream& raw){
   ^
./ip_codec_test.cpp:1641:12: error: expected initializer before '/' token
 unsigned __/ip_codec_test::ip__ident_codec__decode(const stream& raw, unsigned long long idx){
            ^
./ip_codec_test.cpp:1662:8: error: expected initializer before '/' token
 void __/ip_codec_test::ip__checksum_codec__encode(stream& raw, unsigned long long idx, unsigned val){
        ^
./ip_codec_test.cpp:1684:8: error: expected initializer before '/' token
 void __/ip_codec_test::ext__test(ip__datagram dgram){
        ^
./ip_codec_test.cpp:1753:12: error: expected initializer before '/' token
 unsigned __/ip_codec_test::ip__get_checksum(const stream& bytes){
            ^
./ip_codec_test.cpp:1796:8: error: expected initializer before '/' token
 void __/ip_codec_test::__tick(int __timeout){
        ^
./ip_codec_test.cpp:1798:3: error: expected unqualified-id before '/' token
 __/ip_codec_test::__/ip_codec_test(){
   ^
./ip_codec_test.cpp:1814:3: error: expected unqualified-id before '/' token
 __/ip_codec_test::~__/ip_codec_test(){
   ^
./ip_codec_test.cpp:1832:21: error: expected ',' or '...' before '/' token
     bool generate(__/ip_codec_test&);
                     ^
./ip_codec_test.cpp:1833:20: error: expected ',' or '...' before '/' token
     void execute(__/ip_codec_test&){}
                    ^
./ip_codec_test.cpp: In member function 'virtual void init_gen::execute(__)':
./ip_codec_test.cpp:1833:18: error: '<anonymous>' has incomplete type
     void execute(__/ip_codec_test&){}
                  ^~
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:7: note: forward declaration of 'class __'
 class __/ip_codec_test {
       ^~
./ip_codec_test.cpp: At global scope:
./ip_codec_test.cpp:1883:27: error: expected ',' or '...' before '/' token
 bool init_gen::generate(__/ip_codec_test& obj) {
                           ^
./ip_codec_test.cpp: In member function 'virtual bool init_gen::generate(__)':
./ip_codec_test.cpp:1883:25: error: '<anonymous>' has incomplete type
 bool init_gen::generate(__/ip_codec_test& obj) {
                         ^~
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:7: note: forward declaration of 'class __'
 class __/ip_codec_test {
       ^~
./ip_codec_test.cpp:1885:102: error: wrong number of template arguments (1, should be 2)
     struct __thunk__1 : z3_thunk<__/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned,bool>{
                                                                                                      ^
./ip_codec_test.cpp:1137:7: note: provided for 'template<class D, class R> class z3_thunk'
 class z3_thunk : public thunk<D,R> {
       ^~~~~~~~
./ip_codec_test.cpp:1888:33: error: expected ',' or '...' before '/' token
         bool operator()(const __/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned &arg){
                                 ^
./ip_codec_test.cpp: In member function 'bool init_gen::generate(__)::__thunk__1::operator()(__)':
./ip_codec_test.cpp:1888:31: error: '<anonymous>' has incomplete type
         bool operator()(const __/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned &arg){
                               ^~
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:7: note: forward declaration of 'class __'
 class __/ip_codec_test {
       ^~
./ip_codec_test.cpp:1890:21: error: '___ivy_choose' was not declared in this scope
     __tmp10 = (bool)___ivy_choose(0,"ip.sent",0);
                     ^~~~~~~~~~~~~
./ip_codec_test.cpp:1890:21: note: suggested alternative: '__ivy_out'
     __tmp10 = (bool)___ivy_choose(0,"ip.sent",0);
                     ^~~~~~~~~~~~~
                     __ivy_out
./ip_codec_test.cpp: In member function 'z3::expr init_gen::generate(__)::__thunk__1::to_z3(gen&, const z3::expr&)':
./ip_codec_test.cpp:1895:21: error: '___ivy_choose' was not declared in this scope
     __tmp11 = (bool)___ivy_choose(0,"ip.sent",0);
                     ^~~~~~~~~~~~~
./ip_codec_test.cpp:1895:21: note: suggested alternative: '__ivy_out'
     __tmp11 = (bool)___ivy_choose(0,"ip.sent",0);
                     ^~~~~~~~~~~~~
                     __ivy_out
./ip_codec_test.cpp: In member function 'virtual bool init_gen::generate(__)':
./ip_codec_test.cpp:1900:5: error: 'obj' was not declared in this scope
     obj.ip__sent = hash_thunk<__/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned,bool>(new __thunk__1());
     ^~~
./ip_codec_test.cpp:1900:99: error: wrong number of template arguments (1, should be at least 2)
     obj.ip__sent = hash_thunk<__/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned,bool>(new __thunk__1());
                                                                                                   ^
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:571:8: note: provided for 'template<class D, class R, class HashFun> struct hash_thunk'
 struct hash_thunk {
        ^~~~~~~~~~
./ip_codec_test.cpp: At global scope:
./ip_codec_test.cpp:1915:7: error: expected unqualified-id before '/' token
     __/ip_codec_test::ip__datagram dgram;
       ^
./ip_codec_test.cpp:1917:21: error: expected ',' or '...' before '/' token
     bool generate(__/ip_codec_test&);
                     ^
./ip_codec_test.cpp:1918:20: error: expected ',' or '...' before '/' token
     void execute(__/ip_codec_test&);
                    ^
./ip_codec_test.cpp:1983:32: error: expected ',' or '...' before '/' token
 bool ext__test_gen::generate(__/ip_codec_test& obj) {
                                ^
./ip_codec_test.cpp: In member function 'virtual bool ext__test_gen::generate(__)':
./ip_codec_test.cpp:1983:30: error: '<anonymous>' has incomplete type
 bool ext__test_gen::generate(__/ip_codec_test& obj) {
                              ^~
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:7: note: forward declaration of 'class __'
 class __/ip_codec_test {
       ^~
./ip_codec_test.cpp:1991:5: error: parse error in template argument list
     __randomize<__/ip_codec_test::stream>(*this,apply("__fml:dgram__ip.datagram.payload"));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1991:90: error: no matching function for call to '__randomize<<expression error> >(ext__test_gen&, z3::expr)'
     __randomize<__/ip_codec_test::stream>(*this,apply("__fml:dgram__ip.datagram.payload"));
                                                                                          ^
./ip_codec_test.cpp:1100:25: note: candidate: template<class T> void __randomize(gen&, const z3::expr&)
 template <class T> void __randomize( gen &g, const  z3::expr &v);
                         ^~~~~~~~~~~
./ip_codec_test.cpp:1100:25: note:   template argument deduction/substitution failed:
./ip_codec_test.cpp:1991:90: error: template argument 1 is invalid
     __randomize<__/ip_codec_test::stream>(*this,apply("__fml:dgram__ip.datagram.payload"));
                                                                                          ^
./ip_codec_test.cpp:2001:9: error: 'dgram' was not declared in this scope
         dgram.may_fragment_flag = (bool)eval_apply("__fml:dgram__ip.datagram.may_fragment_flag");
         ^~~~~
./ip_codec_test.cpp:2006:17: error: parse error in template argument list
                 __from_solver<__/ip_codec_test::stream>(*this,apply("__fml:dgram__ip.datagram.payload"),dgram.payload);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:2015:5: error: 'obj' was not declared in this scope
     obj.___ivy_gen = this;
     ^~~
./ip_codec_test.cpp: At global scope:
./ip_codec_test.cpp:2018:31: error: expected ',' or '...' before '/' token
 void ext__test_gen::execute(__/ip_codec_test& obj){
                               ^
./ip_codec_test.cpp: In member function 'virtual void ext__test_gen::execute(__)':
./ip_codec_test.cpp:2018:29: error: '<anonymous>' has incomplete type
 void ext__test_gen::execute(__/ip_codec_test& obj){
                             ^~
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:7: note: forward declaration of 'class __'
 class __/ip_codec_test {
       ^~
./ip_codec_test.cpp:2019:62: error: 'dgram' was not declared in this scope
     __ivy_out  << std::hex << std::showbase  << "> test(" << dgram << ")" << std::endl;
                                                              ^~~~~
./ip_codec_test.cpp:2020:5: error: 'obj' was not declared in this scope
     obj.ext__test(dgram);
     ^~~
./ip_codec_test.cpp: At global scope:
./ip_codec_test.cpp:2022:52: error: expected ',' or '...' before '/' token
 std::ostream &operator <<(std::ostream &s, const __/ip_codec_test::ip__datagram &t){
                                                    ^
./ip_codec_test.cpp: In function 'std::ostream& operator<<(std::ostream&, __)':
./ip_codec_test.cpp:2022:50: error: '<anonymous>' has incomplete type
 std::ostream &operator <<(std::ostream &s, const __/ip_codec_test::ip__datagram &t){
                                                  ^~
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:7: note: forward declaration of 'class __'
 class __/ip_codec_test {
       ^~
./ip_codec_test.cpp:2022:15: error: redefinition of 'std::ostream& operator<<(std::ostream&, __)'
 std::ostream &operator <<(std::ostream &s, const __/ip_codec_test::ip__datagram &t){
               ^~~~~~~~
./ip_codec_test.cpp:1169:28: note: 'std::ostream& operator<<(std::ostream&, __)' previously defined here
              std::ostream &operator <<(std::ostream &s, const __/ip_codec_test::stream &a) {
                            ^~~~~~~~
./ip_codec_test.cpp:2025:10: error: 't' was not declared in this scope
     s << t.version_field;
          ^
./ip_codec_test.cpp: At global scope:
./ip_codec_test.cpp:2060:7: error: parse error in template argument list
 void  __ser<__/ip_codec_test::ip__datagram>(ivy_ser &res, const __/ip_codec_test::ip__datagram&t){
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:2060:67: error: expected ',' or '...' before '/' token
 void  __ser<__/ip_codec_test::ip__datagram>(ivy_ser &res, const __/ip_codec_test::ip__datagram&t){
                                                                   ^
./ip_codec_test.cpp:2060:7: error: template-id '__ser<<expression error> >' for 'void __ser(ivy_ser&, __)' does not match any template declaration
 void  __ser<__/ip_codec_test::ip__datagram>(ivy_ser &res, const __/ip_codec_test::ip__datagram&t){
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:937:25: note: candidate is: template<class T> void __ser(ivy_ser&, const T&)
 template <class T> void __ser(ivy_ser &res, const T &inp);
                         ^~~~~
./ip_codec_test.cpp:2112:13: error: expected unqualified-id before '/' token
     class __/ip_codec_test_repl : public __/ip_codec_test {
             ^
./ip_codec_test.cpp:2274:3: error: expected unqualified-id before '/' token
 __/ip_codec_test::ip__datagram _arg<__/ip_codec_test::ip__datagram>(std::vector<ivy_value> &args, unsigned idx, long long bound){
   ^
./ip_codec_test.cpp:2436:6: error: parse error in template argument list
 void __deser<__/ip_codec_test::ip__datagram>(ivy_deser &inp, __/ip_codec_test::ip__datagram &res){
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:2436:64: error: expected ',' or '...' before '/' token
 void __deser<__/ip_codec_test::ip__datagram>(ivy_deser &inp, __/ip_codec_test::ip__datagram &res){
                                                                ^
./ip_codec_test.cpp:2436:6: error: template-id '__deser<<expression error> >' for 'void __deser(ivy_deser&, __)' does not match any template declaration
 void __deser<__/ip_codec_test::ip__datagram>(ivy_deser &inp, __/ip_codec_test::ip__datagram &res){
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:969:25: note: candidate is: template<class T> void __deser(ivy_deser&, T&)
 template <class T> void __deser(ivy_deser &inp, T &res);
                         ^~~~~~~
./ip_codec_test.cpp:2474:7: error: parse error in template argument list
 void  __from_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v,__/ip_codec_test::ip__datagram &res){
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:2474:83: error: expected ',' or '...' before '/' token
 void  __from_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v,__/ip_codec_test::ip__datagram &res){
                                                                                   ^
./ip_codec_test.cpp:2474:7: error: template-id '__from_solver<<expression error> >' for 'void __from_solver(gen&, const z3::expr&, __)' does not match any template declaration
 void  __from_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v,__/ip_codec_test::ip__datagram &res){
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1012:25: note: candidate is: template<class T> void __from_solver(gen&, const z3::expr&, T&)
 template <class T> void __from_solver( gen &g, const  z3::expr &v, T &res);
                         ^~~~~~~~~~~~~
./ip_codec_test.cpp:2488:11: error: parse error in template argument list
 z3::expr  __to_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v,__/ip_codec_test::ip__datagram &val){
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:2488:85: error: expected ',' or '...' before '/' token
 z3::expr  __to_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v,__/ip_codec_test::ip__datagram &val){
                                                                                     ^
./ip_codec_test.cpp:2488:11: error: template-id '__to_solver<<expression error> >' for 'z3::expr __to_solver(gen&, const z3::expr&, __)' does not match any template declaration
 z3::expr  __to_solver<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v,__/ip_codec_test::ip__datagram &val){
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:1048:29: note: candidate is: template<class T> z3::expr __to_solver(gen&, const z3::expr&, T&)
 template <class T> z3::expr __to_solver( gen &g, const  z3::expr &v, T &val) {
                             ^~~~~~~~~~~
./ip_codec_test.cpp:2504:7: error: parse error in template argument list
 void  __randomize<__/ip_codec_test::ip__datagram>( gen &g, const  z3::expr &v){
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:2504:7: error: template-id '__randomize<<expression error> >' for 'void __randomize(gen&, const z3::expr&)' does not match any template declaration
./ip_codec_test.cpp:1100:25: note: candidate is: template<class T> void __randomize(gen&, const z3::expr&)
 template <class T> void __randomize( gen &g, const  z3::expr &v);
                         ^~~~~~~~~~~
./ip_codec_test.cpp:2517:120: error: wrong number of template arguments (1, should be at least 2)
 template<typename R> class to_solver_class<hash_thunk<__/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned,R> >{
                                                                                                                        ^
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:571:8: note: provided for 'template<class D, class R, class HashFun> struct hash_thunk'
 struct hash_thunk {
        ^~~~~~~~~~
./ip_codec_test.cpp:2517:122: error: template argument 1 is invalid
 template<typename R> class to_solver_class<hash_thunk<__/ip_codec_test::__tup__unsigned__unsigned__unsigned__unsigned,R> >{
                                                                                                                          ^
./ip_codec_test.cpp:2571:7: error: expected unqualified-id before '/' token
     __/ip_codec_test_repl &ivy;
       ^
./ip_codec_test.cpp:2573:18: error: expected ',' or '...' before '/' token
     cmd_reader(__/ip_codec_test_repl &_ivy) : ivy(_ivy) {
                  ^
./ip_codec_test.cpp: In constructor 'cmd_reader::cmd_reader(__)':
./ip_codec_test.cpp:2573:16: error: '<anonymous>' has incomplete type
     cmd_reader(__/ip_codec_test_repl &_ivy) : ivy(_ivy) {
                ^~
In file included from ./ip_codec_test.cpp:1:0:
././ip_codec_test.h:593:7: note: forward declaration of 'class __'
 class __/ip_codec_test {
       ^~
./ip_codec_test.cpp:2573:47: error: class 'cmd_reader' does not have any field named 'ivy'
     cmd_reader(__/ip_codec_test_repl &_ivy) : ivy(_ivy) {
                                               ^~~
./ip_codec_test.cpp:2573:51: error: '_ivy' was not declared in this scope
     cmd_reader(__/ip_codec_test_repl &_ivy) : ivy(_ivy) {
                                                   ^~~~
./ip_codec_test.cpp:2573:51: note: suggested alternative: 'div'
     cmd_reader(__/ip_codec_test_repl &_ivy) : ivy(_ivy) {
                                                   ^~~~
                                                   div
./ip_codec_test.cpp: In member function 'virtual void cmd_reader::process(const string&)':
./ip_codec_test.cpp:2584:13: error: 'ivy' was not declared in this scope
             ivy.__lock();
             ^~~
./ip_codec_test.cpp:2588:35: error: parse error in template argument list
                     ivy.ext__test(_arg<__/ip_codec_test::ip__datagram>(args,0,0));
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ip_codec_test.cpp:2588:80: error: no matching function for call to '_arg<<expression error> >(std::vector<ivy_value>&, int, int)'
                     ivy.ext__test(_arg<__/ip_codec_test::ip__datagram>(args,0,0));
                                                                                ^
./ip_codec_test.cpp:858:22: note: candidate: template<class T> T _arg(std::vector<ivy_value>&, unsigned int, long long int)
 template <class T> T _arg(std::vector<ivy_value> &args, unsigned idx, long long bound);
                      ^~~~
./ip_codec_test.cpp:858:22: note:   template argument deduction/substitution failed:
./ip_codec_test.cpp:2588:80: error: template argument 1 is invalid
                     ivy.ext__test(_arg<__/ip_codec_test::ip__datagram>(args,0,0));
                                                                                ^
./ip_codec_test.cpp:2598:13: error: 'ivy' was not declared in this scope
             ivy.__unlock();
             ^~~
./ip_codec_test.cpp:2602:13: error: 'ivy' was not declared in this scope
             ivy.__unlock();
             ^~~
./ip_codec_test.cpp:2606:13: error: 'ivy' was not declared in this scope
             ivy.__unlock();
             ^~~
./ip_codec_test.cpp: In function 'int main(int, char**)':
./ip_codec_test.cpp:2729:7: error: expected unqualified-id before '/' token
     __/ip_codec_test_repl ivy;
       ^
./ip_codec_test.cpp:2730:41: error: 'ivy' was not declared in this scope
     for(unsigned i = 0; i < argc; i++) {ivy.__argv.push_back(argv[i]);}
                                         ^~~
./ip_codec_test.cpp:2731:5: error: 'ivy' was not declared in this scope
     ivy._generating = false;
     ^~~

@prpr2770
Copy link
Author

I resolved the above issue, by compiling it using the following command:

ivyc target=test ip_codec_test.ivy

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

No branches or pull requests

2 participants