Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  IPC::Locker
  Parallel::Forker
  Voneline
General Info
  Papers

verilator_3_920 error: 'VL_UNREACHABLE' was not declared in this scope

Added by Peter Tengstrand almost 2 years ago

Greetings,

Has anyone else seen these errors? I'm building from git master (currently 9.20) on Ubuntu 14.04.3 LTS using gcc 4.8.4

../V3Error.h:263:90: error: 'VL_UNREACHABLE' was not declared in this scope (Added Wed Sep 13 19:27:59 2017 -0400)

../V3Options.h:187:28: error: ISO C++ forbids declaration of 'VL_UNCOPYABLE' with no type [-fpermissive] VL_UNCOPYABLE(V3Options); (Added Wed Nov 1 18:51:41 2017 -0400(

../V3SymTable.h:284:12: error: 'vl_unique_ptr' does not name a type

../V3SymTable.h:285:10: error: 'logp' was not declared in this scope

Regards, Peter

[U-nhblade12:verilator](314)% make
------------------------------------------------------------
making verilator in src
make[1]: Entering directory `/home/ptengstrand/support/verilator/src'
mkdir obj_dbg
cd obj_dbg && make -j 1  TGT=../../bin/verilator_bin_dbg VL_DEBUG=1 -f ../Makefile_obj serial
make[2]: Entering directory `/home/ptengstrand/support/verilator/src/obj_dbg'
/usr/bin/perl ../astgen -I..  --classes
If you get errors from verilog.y below, try upgrading bison to version 1.875 or newer.
/usr/bin/perl ../bisonpre --yacc /usr/bin/bison -d -v -o V3ParseBison.c ../verilog.y
  edit ../verilog.y V3ParseBison_pretmp.y
  /usr/bin/bison -d -v --report=itemset --report=lookahead -b V3ParseBison_pretmp -o V3ParseBison_pretmp.c V3ParseBison_pretmp.y
  edit V3ParseBison_pretmp.output V3ParseBison.output
  edit V3ParseBison_pretmp.c V3ParseBison.c
  edit V3ParseBison_pretmp.h V3ParseBison.h
make[2]: Leaving directory `/home/ptengstrand/support/verilator/src/obj_dbg'
cd obj_dbg && make       TGT=../../bin/verilator_bin_dbg VL_DEBUG=1 -f ../Makefile_obj
make[2]: Entering directory `/home/ptengstrand/support/verilator/src/obj_dbg'
      Compile flags:  g++ -I/home/ptengstrand/local/include -MMD -I. -I.. -I.. -I../../include -DYYDEBUG -ggdb -DVL_DEBUG -MP -fno-delete-null-pointer-checks -Wno-unused-parameter -Wno-shadow -DDEFENV_SYSTEMC="" -DDEFENV_SYSTEMC_ARCH="" -DDEFENV_SYSTEMC_INCLUDE="" -DDEFENV_SYSTEMC_LIBDIR="" -DDEFENV_VERILATOR_ROOT="/home/ptengstrand/local/share/verilator" 
g++ -I/home/ptengstrand/local/include -MMD -I. -I.. -I.. -I../../include -DYYDEBUG      -ggdb -DVL_DEBUG -MP  -fno-delete-null-pointer-checks -Wno-unused-parameter -Wno-shadow -DDEFENV_SYSTEMC=\"\" -DDEFENV_SYSTEMC_ARCH=\"\" -DDEFENV_SYSTEMC_INCLUDE=\"\" -DDEFENV_SYSTEMC_LIBDIR=\"\" -DDEFENV_VERILATOR_ROOT=\"/home/ptengstrand/local/share/verilator\" -c ../Verilator.cpp
In file included from ../V3Global.h:28:0,
                 from ../Verilator.cpp:21:
../V3Error.h: In function 'void v3errorEndFatal(std::ostringstream&)':
../V3Error.h:263:90: error: 'VL_UNREACHABLE' was not declared in this scope
 inline void v3errorEndFatal(ostringstream& sstr) { V3Error::v3errorEnd(sstr); assert(0); VL_UNREACHABLE }
                                                                                          ^
../V3Error.h:263:105: error: expected ';' before '}' token
 inline void v3errorEndFatal(ostringstream& sstr) { V3Error::v3errorEnd(sstr); assert(0); VL_UNREACHABLE }
                                                                                                         ^
In file included from ../V3Global.h:30:0,
                 from ../Verilator.cpp:21:
../V3Options.h: At global scope:
../V3Options.h:187:28: error: ISO C++ forbids declaration of 'VL_UNCOPYABLE' with no type [-fpermissive]
     VL_UNCOPYABLE(V3Options);
                            ^
In file included from ../Verilator.cpp:53:0:
../V3File.h:87:29: error: ISO C++ forbids declaration of 'VL_UNCOPYABLE' with no type [-fpermissive]
     VL_UNCOPYABLE(V3InFilter);
                             ^
In file included from ../Verilator.cpp:74:0:
../V3Parse.h:40:26: error: ISO C++ forbids declaration of 'VL_UNCOPYABLE' with no type [-fpermissive]
     VL_UNCOPYABLE(V3Parse);
                          ^
In file included from ../V3ParseSym.h:28:0,
                 from ../Verilator.cpp:75:
../V3SymTable.h:253:28: error: ISO C++ forbids declaration of 'VL_UNCOPYABLE' with no type [-fpermissive]
     VL_UNCOPYABLE(VSymGraph);
                            ^
../V3SymTable.h: In member function 'void VSymGraph::dumpFilePrefixed(const string&)':
../V3SymTable.h:284:12: error: 'vl_unique_ptr' does not name a type
      const vl_unique_ptr<ofstream> logp (V3File::new_ofstream(filename));
            ^
../V3SymTable.h:285:10: error: 'logp' was not declared in this scope
      if (logp->fail()) v3fatalSrc("Can't write "<<filename);
          ^
../V3SymTable.h:286:12: error: 'logp' was not declared in this scope
      dump(*logp, "");
            ^
make[2]: *** [Verilator.o] Error 1
make[2]: Leaving directory `/home/ptengstrand/support/verilator/src/obj_dbg'
make[1]: *** [../bin/verilator_bin_dbg] Error 2
make[1]: Leaving directory `/home/ptengstrand/support/verilator/src'
make: *** [verilator_exe] Error 2

Replies (5)

RE: verilator_3_920 error: 'VL_UNREACHABLE' was not declared in this scope - Added by Wilson Snyder almost 2 years ago

VL_UNREACHABLE is defined in verilatedos.h which is included by V3Error.h, so I can't explain this. Are you sure there's no changes in your sources?

RE: verilator_3_920 error: 'VL_UNREACHABLE' was not declared in this scope - Added by Peter Tengstrand almost 2 years ago

Hi Wilson,

I started looking into this more this morning. I left out one detail in my original post: I ran configure with the prefix argurment (--prefix=/home/ptengstrand/local/). When I look at the compile log I see that g++ is picking up /home/ptengstrand/local/include as an include directory - is that correct? I thought the prefix argument only told configure where to install not where to find source/includes? Because of this the compile is picking up an older version of verilatedos.h which doesn't have the new defines. Everything compiles correctly if I run configure without any arguments but then I can't (easily) copy the install into my local install directory.

make[2]: Entering directory `/home/ptengstrand/support/verilator/src/obj_dbg'
     Compile flags:  g++ -I/home/ptengstrand/local/include -MMD -I. -I.. -I.. -I../../include -DYYDEBUG -ggdb -DVL_DEBUG -MP -fno-delete-null-pointer-checks
                     -Wno-unused-parameter -Wno-shadow -DDEFENV_SYSTEMC="" -DDEFENV_SYSTEMC_ARCH="" -DDEFENV_SYSTEMC_INCLUDE="" -DDEFENV_SYSTEMC_LIBDIR="" 
                     -DDEFENV_VERILATOR_ROOT="/home/ptengstrand/local/share/verilator" 
g++ -I/home/ptengstrand/local/include -MMD -I. -I.. -I.. -I../../include -DYYDEBUG -ggdb -DVL_DEBUG -MP  -fno-delete-null-pointer-checks 
    -Wno-unused-parameter -Wno-shadow -DDEFENV_SYSTEMC=\"\" -DDEFENV_SYSTEMC_ARCH=\"\" -DDEFENV_SYSTEMC_INCLUDE=\"\" -DDEFENV_SYSTEMC_LIBDIR=\"\" 
    -DDEFENV_VERILATOR_ROOT=\"/home/ptengstrand/local/share/verilator\" -c ../Verilator.cpp

RE: verilator_3_920 error: 'VL_UNREACHABLE' was not declared in this scope - Added by Peter Tengstrand almost 2 years ago

I was able to build and install using the following:

autoconfig ./configure make make prefix=/home/ptengstrand/local install

instead of:

autoconfig ./configure --prefix=/home/ptengstrand/local make make install

RE: verilator_3_920 error: 'VL_UNREACHABLE' was not declared in this scope - Added by Wilson Snyder over 1 year ago

I presume you mean "autoconf" instead of "autoconfig". Both worked OK for me on 16.04, so to fix it you'd need to debug it and provide a patch, but as you also have it working we can just leave it as a mystery, too.

RE: verilator_3_920 error: 'VL_UNREACHABLE' was not declared in this scope - Added by Peter Tengstrand over 1 year ago

Yes I did mean autoconf. Unfortunately due to time constraints it will have to remain a mystery.

For future reference in case anyone else runs across this:

Working:
autoconf
./configure 
make
make prefix=<install_directory> install
Not working:
autoconf
./configure --prefix=<install_directory>
make
make install

Thank you as always!

    (1-5/5)