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

Verilator installation make error #1336

Closed
veripoolbot opened this issue Aug 28, 2018 · 2 comments
Closed

Verilator installation make error #1336

veripoolbot opened this issue Aug 28, 2018 · 2 comments

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Aug 28, 2018


Author Name: S Bagchi
Original Redmine Issue: 1336 from https://www.veripool.org


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.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Aug 28, 2018


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-08-28T18:40:08Z


Seems like #�. 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?

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Mar 30, 2019


Original Redmine Comment
Author Name: Dwayne Jackson
Original Date: 2019-03-30T18:10:44Z


I ran into similar issues building verilator on Linux Mint and Ubuntu, they seem to exist on RedHat & Suse as well issue1329, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.