[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
  SystemPerl
  Voneline
  WFH
General Info
  Papers

Compiling verilator in Freebsd

Added by Otacílio de Araújo Ramos Neto about 4 years ago

I'm trying compile verilator in FreeBSD but I´m getting a problem.

When I type gmake after .configure the compile starts, but stop with a error.

/usr/local/bin/flex -d -oV3Lexer_pregen.yy.cpp ../verilog.l

/usr/local/bin/perl ../flexfix <V3Lexer_pregen.yy.cpp >V3Lexer.yy.cpp

g++ -I/usr/local/include -MMD -I. -I.. -I../../include -DYYDEBUG -ggdb -DVL_DEBUG -c ../V3Read.cpp

In file included from ../V3Read.cpp:39:

V3Lexer_pregen.yy.cpp:385: error: no 'int V3LexerBase::yywrap()' member function declared in class 'V3LexerBase'

In file included from ../V3Read.cpp:39:

V3Lexer_pregen.yy.cpp: In member function 'virtual int V3LexerBase::yylex()':

V3Lexer_pregen.yy.cpp:2868: error: 'yy_buffer_stack' was not declared in this scope

V3Lexer_pregen.yy.cpp:2868: error: 'yy_buffer_stack_top' was not declared in this scope

V3Lexer_pregen.yy.cpp:2869: error: 'yyensure_buffer_stack' was not declared in this scope

My tools are

flex-2.5.35_1

bison-2.4.1,1

gettext-0.17_1

gmake-3.81_3

help2man-1.36.4_2

libiconv-1.11_1

m4-1.4.11,1 GNU m4

p5-gettext-1.05_2

perl-5.8.9_2

Thanks by help

config.log (21.9 kB)

config.status (23.9 kB)


Replies (4)

RE: Compiling verilator in Freebsd - Added by Wilson Snyder about 4 years ago

Googling for that problem suggests it's really a flex problem. I just installed flex 2.5.35 on Cygwin and it works OK, so the base version of flex is ok, so it's probably Mac/BSD specific.

Can you attach the V3Lexer_pregen.yy.cpp file? Also somewhere on your system is FlexLexer.h (most likely /usr/include/FlexLexer.h) please include that too.

RE: Compiling verilator in Freebsd - Added by Otacílio de Araújo Ramos Neto about 4 years ago

they are attached

V3Lexer_pregen.yy.cpp (230.6 kB)

FlexLexer.h - /usr/local/include/flex/FlexLexer.h (6.1 kB)

RE: Compiling verilator in Freebsd - Added by Wilson Snyder about 4 years ago

The error you report doesn't make sense given the FlexLexer file you sent. Please search your system for ANOTHER FlexLexer.h; I believe it's getting confused because there's multiple versions of FlexLexer.h

RE: Compiling verilator in Freebsd - Added by Otacílio de Araújo Ramos Neto about 4 years ago

Yes Wilson!

I find another FlexLexer in /usr/include I moved it to FlexLexer.h.old and try another ./configure, but the error occours again, then I create a link to /usr/local/include/flex/FlexLexer.h, run ./configure and the compilation works OK!

I will verify about the file /usr/include/FlexLexer.h

Thanks

(1-4/4)