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
Cygwin verilator_coverage fails due to cygwin bug in getline() #1349
Comments
Original Redmine Comment If you run the verilator_coverage_dbg executable under gdb then do "bt" get a backtrace, what do you get? |
Original Redmine Comment This looks to be caused by two getline calls in VlcTop.cpp expecting \r\n in Cygwin I believe. A quick fix can be made by using something like safeGetline, example: http://stackoverflow.com/a/6089413 |
Original Redmine Comment Here's the output from gdb (I apologize, I'm not an expert on Cygwin and gdb in general...):
|
Original Redmine Comment Try recompiling with -O0 or updating your GCC package, this seems a GCC/Cygwin bug. https://www.mail-archive.com/cygwin@cygwin.com/msg153502.html |
Original Redmine Comment Thanks, Wilson. 4.002 is working fine on my CentOS 7.3 running inside Oracle VM VirtualBox so I'll just verilate there for now and worry about Cygwin later. You can close this issue. |
Original Redmine Comment Glad it is working now. |
Original Redmine Comment Hi, I had exactly this same situation. After some tracing works, I come to this quick and dirty fix:
src/VlcTop.cpp is the original file, It looks like
doesn't work, but
works. Is that because Cygwin's Stdc++ library requires an more strict initialization of
? Cheers~ |
Original Redmine Comment Thanks for figuring out a work around, will need to decide how to best support this. Note the code as written is legal, please also report this problem to the cygwin maintainers. |
Original Redmine Comment Thanks for the patch. Work around added to git towards 4.008. |
Original Redmine Comment In 4.008. |
Author Name: Lloyd Gomez
Original Redmine Issue: 1349 from https://www.veripool.org
Hello,
I am trying to install Verilator 4.002 on Cygwin. Compilation looks ok but I get a failure when running the "make test" step:
I'm not sure how to debug this and figure out what the problem is. These are the steps I did to do the installation:
My Cygwin version is as follows and I am running on Windows 10:
Any help would be appreciated.
Regards,
Lloyd
The text was updated successfully, but these errors were encountered: