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 fails to build with flex-2.6.2 #1103

Closed
veripoolbot opened this issue Nov 6, 2016 · 8 comments
Closed

Verilator fails to build with flex-2.6.2 #1103

veripoolbot opened this issue Nov 6, 2016 · 8 comments

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Nov 6, 2016


Author Name: Sergey Kvachonok (@ravenexp)
Original Redmine Issue: 1103 from https://www.veripool.org


/usr/bin/flex --version
flex 2.6.2
/usr/bin/flex -d -oV3Lexer_pregen.yy.cpp ../verilog.l
../verilog.l:1078: EOF encountered inside an action
../verilog.l:1078: unrecognized rule
../verilog.l:1078: fatal parse error
make[2]: *** [../Makefile_obj:318: V3Lexer_pregen.yy.cpp] Error 1
make[2]: *** Waiting for unfinished jobs....

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Nov 6, 2016


Original Redmine Comment
Author Name: Sergey Kvachonok (@ravenexp)
Original Date: 2016-11-06T09:30:51Z


Looks like this is a known Flex bug:

westes/flex#102

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Nov 6, 2016


Original Redmine Comment
Author Name: Sergey Kvachonok (@ravenexp)
Original Date: 2016-11-06T08:59:01Z


/usr/bin/flex --version
flex 2.6.2
/usr/bin/flex -d -oV3Lexer_pregen.yy.cpp ../verilog.l
../verilog.l:1078: EOF encountered inside an action
../verilog.l:1078: unrecognized rule
../verilog.l:1078: fatal parse error
make[2]: *** [../Makefile_obj:318: V3Lexer_pregen.yy.cpp] Error 1
make[2]: *** Waiting for unfinished jobs....

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Nov 6, 2016


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-11-06T12:06:34Z


The Flex team seems to have terrible regression process, as they break something obvious every few years. Anyhow there's a few dozen comments like that in the two .l files, verilog.l and V3PreLex.l. Can you confirm it works if you remove the comments which match "//.*'"?

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Nov 6, 2016


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-11-06T12:11:10Z


I speculate there's only two places that hit their bug, try this patch.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Nov 6, 2016


Original Redmine Comment
Author Name: Sergey Kvachonok (@ravenexp)
Original Date: 2016-11-06T12:19:47Z


flex-2.6.2 seems to have other issues besides // comment parsing,
like %option prefix=myscanner being completely broken.

westes/flex#113

I suggest giving up on trying to get it to work and waiting for the upstream to fix this.

If there's a way to blacklist flex-2.6.2 in the configure script that would be nice.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Nov 6, 2016


Original Redmine Comment
Author Name: Sergey Kvachonok (@ravenexp)
Original Date: 2016-11-06T12:22:04Z


Unfortunately I've already reverted flex to 2.6.1 system-wide,
so testing the patch won't be as easy.

Do you really think replacing all // comments with /**/ is the way to go?

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Nov 6, 2016


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-11-06T13:14:46Z


I'll speculate it's those two lines and commit that, besides I expect the flex team will fix it soon.

Please reopen if you or anyone try 2.6.2 again.

Fixed in git towards 3.889.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Nov 25, 2016


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-11-25T16:02:25Z


In 3.890.

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.