Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1336

Verilator installation make error

Added by S Bagchi about 1 year ago. Updated 6 months ago.

Status:
Duplicate
Priority:
Urgent
Assignee:
-
Category:
Configure/Make/Compiling
% Done:

0%


Description

Using verilator-3.926, I was able to run ./configure, but get an error with 'make', as shown below. The Linux version being used is also given below. Your help is appreciated.

>> make
In file included from V3Lexer_pregen.yy.cpp:245,  
                 from ../V3ParseLex.cpp:37:       
/usr/include/FlexLexer.h:130: error: expected unqualified-id before numeric constant
In file included from ../V3ParseLex.cpp:37:                                         
V3Lexer_pregen.yy.cpp: In member function 'virtual int V3LexerBase::yylex()':       
V3Lexer_pregen.yy.cpp:3420: error: 'yy_current_buffer' was not declared in this scope
In file included from ../V3ParseLex.cpp:37:                                          
V3Lexer_pregen.yy.cpp:6954: error: 'yy_current_buffer' was not declared in this scope
V3Lexer_pregen.yy.cpp:6977: error: 'yy_current_buffer' was not declared in this scope
V3Lexer_pregen.yy.cpp: In constructor 'V3LexerBase::V3LexerBase(std::istream*, std::ostream*)':
V3Lexer_pregen.yy.cpp:7094: error: 'yy_current_buffer' was not declared in this scope          
V3Lexer_pregen.yy.cpp: In destructor 'virtual V3LexerBase::~V3LexerBase()':                    
V3Lexer_pregen.yy.cpp:7106: error: 'yy_current_buffer' was not declared in this scope          
V3Lexer_pregen.yy.cpp: In member function 'virtual void V3LexerBase::switch_streams(std::istream*, std::ostream*)':
V3Lexer_pregen.yy.cpp:7113: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp: In member function 'int V3LexerBase::yy_get_next_buffer()':                                 
V3Lexer_pregen.yy.cpp:7166: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp: In member function 'void V3LexerBase::yyunput(int, char*)':                                 
V3Lexer_pregen.yy.cpp:7361: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp: In member function 'int V3LexerBase::yyinput()':                                            
V3Lexer_pregen.yy.cpp:7403: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp: In member function 'virtual void V3LexerBase::yyrestart(std::istream*)':                    
V3Lexer_pregen.yy.cpp:7462: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp:7465: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp: In member function 'virtual void V3LexerBase::yy_switch_to_buffer(yy_buffer_state*)':       
V3Lexer_pregen.yy.cpp:7472: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp:7475: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp:7483: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp: In member function 'void V3LexerBase::yy_load_buffer_state()':                              
V3Lexer_pregen.yy.cpp:7497: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp: In member function 'virtual void V3LexerBase::yy_delete_buffer(yy_buffer_state*)':          
V3Lexer_pregen.yy.cpp:7534: error: 'yy_current_buffer' was not declared in this scope                              
V3Lexer_pregen.yy.cpp: In member function 'void V3LexerBase::yy_flush_buffer(yy_buffer_state*)':                   
V3Lexer_pregen.yy.cpp:7576: error: 'yy_current_buffer' was not declared in this scope                              
make-3.81[2]: *** [V3ParseLex.o] Error 1                                                                           
make-3.81[1]: *** [../bin/verilator_bin_dbg] Error 2                                                               
make-3.81: *** [verilator_exe] Error 2                                                                             
>> rpm -qi glibc                                                                                   
Name        : glibc                        Relocations: (not relocatable)                                          
Version     : 2.12                              Vendor: Red Hat, Inc.                                              
Release     : 1.209.el6_9.2                 Build Date: Fri May 26 10:05:11 2017                                   
Install Date: Sat Apr 21 10:19:36 2018         Build Host: x86-042.build.eng.bos.redhat.com                        
Group       : System Environment/Libraries   Source RPM: glibc-2.12-1.209.el6_9.2.src.rpm                          
Size        : 13121423                         License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Signature   : RSA/8, Wed May 31 05:16:33 2017, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://sources.redhat.com/glibc/
Summary     : The GNU libc libraries
Description :
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.
Name        : glibc                        Relocations: (not relocatable)
Version     : 2.12                              Vendor: Red Hat, Inc.
Release     : 1.209.el6_9.2                 Build Date: Fri May 26 10:17:47 2017
Install Date: Sat Apr 21 10:21:38 2018         Build Host: x86-041.build.eng.bos.redhat.com
Group       : System Environment/Libraries   Source RPM: glibc-2.12-1.209.el6_9.2.src.rpm
Size        : 13944811                         License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Signature   : RSA/8, Wed May 31 05:16:18 2017, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://sources.redhat.com/glibc/
Summary     : The GNU libc libraries
Description :
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.

History

#1 Updated by Wilson Snyder about 1 year ago

  • Description updated (diff)
  • Status changed from New to Duplicate

Seems like bug1329. Please post followups there, namely update that bug with the distribution you are using (RedHat - what version)? Is this also a very old distro? Can you look at the code and suggest what needs fixing?

#2 Updated by Dwayne Jackson 6 months ago

I ran into similar issues building verilator on Linux Mint and Ubuntu, they seem to exist on RedHat & Suse as well bug1329, the problem was an outdated FlexLexer.h. Please see the working FlexLexer.h from the following link https://github.com/westes/flex/blob/master/src/FlexLexer.h. Perform unix> locate FlexLexer.h and replace each instance after backing them up.

Ubuntu also has problems with missing:

Perl Unix::Processors use cpan to install sudo cpan cpan> install Unix::Processors effects multiprocessing.

Make sure the latest flex is installed unix> sudo apt-get install flex bison

Missing libl.a and libfl.a unix> apt-get install libfl-dev

When running the regression suite it is required to set LIBRARY_PATH to the systemc library path, if the systemc library is static.

I hope that some find this useful.

Dwayne

Also available in: Atom