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 does not pass tests on sparc #288
Comments
Original Redmine Comment the build on sparc fails at the following:
|
Original Redmine Comment That's a syntax error in the run-time tests, so the compile log doesn't help much unfortunately. To debug it, cd test_c IE add "--debugi 9" to the end of the failing command and post results. It's likely a flex/bison issue. If there's a system I can log in to test it, I can help. |
Original Redmine Comment Hello, I got access to one of Debian's sparc machines, then I added |--debugi 9" to the failing command. Please find the result attached. |
Original Redmine Comment It does seem to be dieing when parsing the first module, but doesn't tell Please try --gdbbt --debug that should make a backtrace. |
Original Redmine Comment Attached is the output when I added "--gdbbt --debug" (I did not add --debugi 9"). Please note that after the error, verilator did not return to the shell prompt, so I had to suspend it (CTRL+Z). |
Original Redmine Comment It looks like bison is confused and never takes the first token. The next debug output should have been:
It might be worth running the bison kit's self tests, maybe it's just misinstalled. Beyond that to debug further it'll be a matter of editing the bison output to add Sorry no simple fix, |
Original Redmine Comment bison self tests passed successfully. |
Original Redmine Comment Please explain what you meant by "editing the bison output to add print statements ...". In other words, what is the other step to debug this problem |
Original Redmine Comment I think the best thing to do is have a window on x86 linux and another on sparc, and At the top this will print the raw command being executed; what
|
Original Redmine Comment Ok, here's what I have got
|
Original Redmine Comment Please note that sparc did not go to line 6187 of V3ParseBison_pretmp.c |
Original Redmine Comment Unfortunately the line numbers may not line up because of the different bison versions, which is related to the problem. In theory :) you can copy V3ParseBison.c from the x86 to the sparc version, "make" and see if it still shows the problem, I think what may help is if you get the source code to print out as it goes, it may make it more obvious when the paths diverge by The key is to keep "c" continuing until there's the syntax error. |
Original Redmine Comment Hello,
|
Original Redmine Comment From aelmahmoudy: I just tried to build old versions of verilator on sparc, and I found |
Original Redmine Comment Hello, Another bug ( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607033 ) was filed on Debian, which I think might help debugging this issue. When building verilator 3.805 on hppa arch, the following error message appeared:
|
Original Redmine Comment Can you login there? That's a library routine error, so it's all about who's calling it. cd test_c |
Original Redmine Comment Hello, Unfortunately, I still didn't get access on an hppa machine (I requested it at the same day I received the hppa build error). Anyways, verilator 3.810 did pass on hppa. I hope this gives you a clue. |
Original Redmine Comment Glad it passes, but I don't see an obvious reason why it was broken before. I'll leave this issue open for a little while if something else turns up. |
Original Redmine Comment Please note that it still fails on sparc. |
Original Redmine Comment Now verilator 3.812 has the same failure on powerpc architecture, did you change anything from 3.811 to 3.812 that might cause this failure ? The build log can be found on: The build log for 3.811 (which was the last successful build for powerpc arch) can be found on: By quickly checking both build logs I noticed the following:
|
Original Redmine Comment I suspect that the cause of the failure is probably the toolchain changes, rather than the changes introduced in 3.812 |
Original Redmine Comment Toolchain differences:
|
Original Redmine Comment I fixed the compile warnings. If you can figure out how to get me a shell on a system that shows this I'll debug it, otherwise I think we're stuck. |
Original Redmine Comment BTW a VNC session or equivelent would be fine too, I don't mind if you need to look over my shoulder for security reasons. |
Original Redmine Comment Hello, I was talking to a Debian Developer today, and he suggested using Qemu, it can emulate a MIPS machine on a x86 machine for example. You can get the Debian images from: http://people.debian.org/~aurel32/qemu/ For powerpc, I would suggest using debian_squeeze_powerpc_standard.qcow2 image from |
Original Redmine Comment I built verilator under the qemu image suggested and it works fine. If you could point to a qemu image that fails, I'll debug it. |
Original Redmine Comment Oh yes, the build fails for the wheezy/sid release. You can upgrade the image you've got as follows:
deb http://ftp.debian.org/debian squeeze main contrib non-free You might find 'stable' instead of 'squeeze', just replace 'squeeze' (or stable) with 'unstable', and save the file.
|
Original Redmine Comment With /etc/apt/sources.list deb http://ftp.debian.org/debian unstable main Updating doesn't seem to do anything Reading package lists... |
Original Redmine Comment Wierd, are you sure that you first ran: apt-get update |
Original Redmine Comment Er, now I'm getting the below. Maybe there's some network oddity? A "wget http://ftp.debian.org" seems to work.
|
Original Redmine Comment That's normal, because there aren't any security/updates/backports for the unstable release. Anyways, I beleive that now running: apt-get dist-upgrade |
Original Redmine Comment I got it to start updating (it's not unstable-updates but still squeeze-updates) but it runs out of disk space. Sorry; if you can point me to a qcow image that fails I'll look at it, but don't have more time now to play with this. |
Original Redmine Comment I've prepared a Qemu powerpc image (size is 1GB !), I intend upload it during this week and put the link when the upload is done. |
Original Redmine Comment Here's the link to the PowerPC image: http://people.ubuntu.com/~aelmahmoudy/ppc.img |
Original Redmine Comment Great work making the image. I was able to reproduce it and tracked it down to (paraphrasing) int V3Parse::x() { y(); } where I was missing a return - which seems to work ok on most architectures! Unfortunately lint was turned off on that file to get around flex warnings and I never noticed. Fixed in git towards 3.821. |
Original Redmine Comment Wonderful ! Thanks a lot. |
Original Redmine Comment In 3.821 |
Author Name: أحمد المحمودي
Original Redmine Issue: 288 from https://www.veripool.org
Original Date: 2010-09-28
Original Assignee: Wilson Snyder (@wsnyder)
Hello,
This issue was reported on Debian bug tracker [1], the build on sparc fails at the following:
| make[2]: Entering directory `/build/buildd-verilator_3.803-1-sparc-KKtZnz/verilator-3.803/test_c'
| /usr/bin/perl /build/buildd-verilator_3.803-1-sparc-KKtZnz/verilator-3.803/test_c/../bin/verilator --cc -f /build/buildd-verilator_3.803-1-sparc-K
z/verilator-3.803/test_c/../test_v/input.vc top.v --trace
| %Error: ../test_v/top.v:8: syntax error, unexpected $undefined
| make[1]: *** wait: No child processes. Stop.
The full build log can be found at:
https://buildd.debian.org/fetch.cgi?pkg=verilator&arch=sparc&ver=3.803-1&stamp=1279241597&file=log&as=raw
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598256
The text was updated successfully, but these errors were encountered: