Comments (24)
sby-script.py is located in
C:\msys64\usr\local\bin
sby.exe is in the same location
The shebang line of sby-script is the following:
#!C:/msys64/usr/local/bin/python3
From a MSYS2 prompt, "where python" produces:
C:\msys64\mingw64\bin\python.exe
Replacing the shebang line with #!C:/msys64/mingw64/bin/python.exe returns something now:
$sby
File "C:\msys64\usr\local\bin\sby-script.py", line 130
print("ERROR: Use -f to re-run in existing directory.", file=sys.stderr)
^
SyntaxError: invalid syntax
from sby.
Try adding a SymbiYosys script to the command line, such as
sby -f file.sby
One example of such a script would be this one, used to verify this fairly simple bus counter. You can find a longer discussion of this timer, and its proof, here. For more information about the SymbiYosys script file format, check out this readthedocs page.
Dan
from sby.
Do you get any output at all from sby --help
? (Just calling sby
should read a .sby file from stdin. So maybe that operating mode is not the best thing to start with.)
from sby.
sby --help gives me the same error:
failed to create process.
It didn't give me any build errors and is located in
C:\msys64\usr\local\bin\sby.exe
Hm. Perhaps some combination of things while using MSYS2?
from sby.
Since I'm not a windows user I can only assume this is somehow related to #32. cc @cr1901
from sby.
This DOES look related! Excellent that someone else is in the same (or similar) boat.
from sby.
@cliffordwolf Yes, it's related. failed to create process
is the very helpful and definitely-not-opaque error that launcher.c emits when it couldn't launch the Python interpreter. sby.exe
is the compiled version of launcher.c
.
@trayres Where is the file sby-script.py
located? Is it in the same directory as sby.exe
? What does the shebang line of sby-script.py
look like after installation? sby.exe
does use the shebang line to find the Python interpreter.
from sby.
@trayres Replace with #!C:/msys64/mingw64/bin/python3.exe
... you appear to be calling the python2
interpreter.
In any case, I provide a Makefile
variable called PYTHON
to override the autodetection of where your Python interpreter is, in case the default is inappropriate.
Try installing SymbiYosys again with either of the following invocations (I prefer the second one), and sby.exe
should work:
make PYTHON=C:\\msys64\\mingw64\\bin\\python3.exe PREFIX=/usr/local install
make PREFIX=/mingw64 install
from sby.
Good catch, I thought I had symlinked python to python3 but apparently I had installed them both via MSYS2.
I will pull latest, reinstall and provide feedback this weekend. Thank you.
from sby.
Like yosys
, I only intend to support compiling and installing from an MSYS prompt, but users on Windows should be able to use sby
outside of said prompt. I should probably add something to the make help
or README.md
to indicate user-settable Makefile
vars...
from sby.
Just to clarify: Is using from within MSYS2 recommended or viable practice? Or is the intended workflow to compile/install via MSYS2 then use CMD?
from sby.
@trayres If you're using sby
interactively from a console, then either msys2
or cmd
will work fine.
However, stuff like Python's subprocess
module on Windows (or anything using CreateProcess
directly) has no concept of msys2
bash or the shebang; the launcher exectuable called sby.exe
is meant to workaround this.
from sby.
I used this after git pull:
make PREFIX=/mingw64 install
Now I get:
$sby demo.sby
Traceback (most recent call last):
File "C:\msys64\mingw64\bin\sby-script.py", line 22, in
from sby_core import SbyJob, SbyAbort
File "C:\msys64\mingw64\bin/../share/yosys/python3\sby_core.py", line 37, in
signal.signal(signal.SIGINT, force_shutdown)
NameError: name 'signal' is not defined
from sby.
@trayres Yes I noticed that too about 2 nights ago; that change appears to postdate my PR being accepted. Anyways I have a new PR in the works to improve Windows support, so I would suggest being on standby until that is ready.
from sby.
@trayres Try this branch and see if it fixes your problem :).
from sby.
Hm, this is what I get with that branch:
$ sby demo.sby
Traceback (most recent call last):
File "C:\msys64\mingw64\bin\sby-script.py", line 22, in
from sby_core import SbyJob, SbyAbort
File "C:\msys64\mingw64\bin/../share/yosys/python3\sby_core.py", line 37, in
signal.signal(signal.SIGINT, force_shutdown)
NameError: name 'signal' is not defined
from sby.
Then I added "import signal" to sby_core.py, and I got a little farther:
$ sby demo.sby
SBY 16:26:18 [demo] Copy 'demo.sv' to 'demo/src/demo.sv'.
SBY 16:26:18 [demo] engine_0: smtbmc z3
SBY 16:26:18 [demo] base: starting process "cd demo/src& yosys -ql ../model/design.log ../model/design.ys"
Traceback (most recent call last):
File "C:\msys64\mingw64\bin\sby-script.py", line 388, in
retcode |= run_job(t)
File "C:\msys64\mingw64\bin\sby-script.py", line 346, in run_job
job.run(setupmode)
File "C:\msys64\mingw64\bin/../share/yosys/python3\sby_core.py", line 625, in run
self.taskloop()
File "C:\msys64\mingw64\bin/../share/yosys/python3\sby_core.py", line 239, in taskloop
select(fds, [], [], 1.0) == ([], [], [])
OSError: [WinError 10093] Either the application has not called WSAStartup, or WSAStartup failed
from sby.
OSError: [WinError 10093] Either the application has not called WSAStartup, or WSAStartup failed
Mmm, that doesn't seem right at all... line 239 in my branch isn't a call to select at all... did you forget to do make PREFIX=/prefix install
before testing?
from sby.
I just followed https://symbiyosys.readthedocs.io/en/latest/quickstart.html#installing
from sby.
Line 239 on your machine doesn't match line 239 in the branch that I pointed you to. Can you make sure the C:\msys64\mingw64\bin\sby-script.py
and C:\msys64\mingw64\bin/../share/yosys/python3\*.py
files are identical to the async branch?
from sby.
Something ain't right - it looked like there was another set of files from an earlier attempt to get this up and running.
So I blew away everything and reinstalled.
$ sby demo.sby
Traceback (most recent call last):
File "C:\msys64\mingw64\bin\sby-script.py", line 22, in
from sby_core import SbyJob, SbyAbort
ModuleNotFoundError: No module named 'sby_core'
Fine, add it to $PYTHONPATH:
$ export PYTHONPATH=/c/msys64/usr/local/share/yosys/python3/
Let's try again:
$ sby demo.sby
SBY 20:56:17 [demo] Copy 'demo.sv' to 'demo/src/demo.sv'.
SBY 20:56:18 [demo] engine_0: smtbmc z3
SBY 20:56:18 [demo] base: starting process "cd demo/src& yosys -ql ../model/design.log ../model/design.ys"
SBY 20:56:18 [demo] base: finished (returncode=0)
SBY 20:56:18 [demo] smt2: starting process "cd demo/model& yosys -ql design_smt2.log design_smt2.ys"
SBY 20:56:18 [demo] smt2: finished (returncode=0)
SBY 20:56:18 [demo] engine_0: starting process "cd demo& yosys-smtbmc -s z3 --presat --noprogress -t 100 --append 0 --dump-vcd engine_0/trace.vcd --dump-vlogtb engine_0/trace_tb.v --dump-smtc engine_0/trace.smtc model/design_smt2.smt2"
SBY 20:56:18 [demo] engine_0: failed to create process.
SBY 20:56:18 [demo] engine_0: finished (returncode=0)
SBY 20:56:18 [demo] ERROR: engine_0: Engine terminated without status.
SBY 20:56:18 [demo] DONE (ERROR, rc=16)
At this point, I'm sensing that the error is between the screen and the chair, and/or potentially between my ears, however it is now doing more than it previously has.
Does the (current) error make sense to you, or is it still something wrong with my configuration (...seems likely)?
from sby.
SBY 20:56:18 [demo] engine_0: failed to create process.
Make sure your yosys
is up to date- at least newer than 53b28b3. Not using an up-to-date yosys
would be one source of that that "very helpful" error message.
from sby.
Shoot, I thought it was:
$ yosys -V
Yosys 0.8+369 (git sha1 ea0e0722, x86_64-w64-mingw32-g++ 8.3.0 -Os)
from sby.
@trayres Then make sure yosys-smtbmc.exe
and yosys-smtbmc-script.py
exist on your path.
If they exist on your path already, then I don't know what the problem is then, sorry :(.
from sby.
Related Issues (20)
- Absolute paths in Windows
- Yices 2 default solver despite being 'optional' HOT 3
- allow removing -simcheck
- Tags persist across section boundaries HOT 1
- Hierarchical Signal Access HOT 2
- fib liveness example : suprove command not found HOT 1
- [RFC] Ensuring code is formatted in accordance to pep8 HOT 2
- Error `Option skip is only valid for smtbmc and btor engines` running riscv-formal HOT 4
- Suggestion for bug-template
- Error when running command `sby` HOT 3
- Please add tags corresponding to Yosys releases HOT 2
- python error codes HOT 1
- VCD dump for PASS HOT 1
- `sby` depends on `click` without specifying a version constraint HOT 4
- `$stable` assumption is violated HOT 1
- Apparent problem in induction verifier HOT 3
- Hierarchy Checks Command Syntax Error HOT 1
- Setting PREFIX doesn't appear to work
- Unexpected behaviour with asynchronous reset HOT 8
- Yosys doesn't work on btor pono engine. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sby.