Skip to content

svsim failing on windows due to no 'rm' executable found #4780

@tobias1012

Description

@tobias1012

Type of issue: Bug Report

Please provide the steps to reproduce the problem:
On a windows 10 machine run sbt test with verilator.

What is the current behavior?
Tests fail with java.io.IOException: Cannot run program "rm": CreateProcess error=2
What is the expected behavior?
Tests should run

Please tell us about your environment:

Other Information
[info] java.io.IOException: Cannot run program "rm": CreateProcess error=2, File not found [info] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170) [info] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089) [info] at java.base/java.lang.Runtime.exec(Runtime.java:681) [info] at java.base/java.lang.Runtime.exec(Runtime.java:530) [info] at svsim.Workspace.reset(Workspace.scala:54) [info] at chisel3.simulator.Simulator._simulate(Simulator.scala:102) [info] at chisel3.simulator.Simulator._simulate$(Simulator.scala:97) [info] at chisel3.simulator.EphemeralSimulator$DefaultSimulator._simulate(EphemeralSimulator.scala:28) [info] at chisel3.simulator.SingleBackendSimulator.simulate(Simulator.scala:146) [info] at chisel3.simulator.SingleBackendSimulator.simulate$(Simulator.scala:142) [info] ... [info] Cause: java.io.IOException: CreateProcess error=2, File not found [info] at java.base/java.lang.ProcessImpl.create(Native Method) [info] at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:500) [info] at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159) [info] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126) [info] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089) [info] at java.base/java.lang.Runtime.exec(Runtime.java:681) [info] at java.base/java.lang.Runtime.exec(Runtime.java:530) [info] at svsim.Workspace.reset(Workspace.scala:54) [info] at chisel3.simulator.Simulator._simulate(Simulator.scala:102) [info] at chisel3.simulator.Simulator._simulate$(Simulator.scala:97) [info] ... [info] Run completed in 813 milliseconds. [info] Total number of tests run: 1 [info] Suites: completed 1, aborted 0 [info] Tests: succeeded 0, failed 1, canceled 0, ignored 0, pending 0 [info] *** 1 TEST FAILED ***

It seems this error is caused by the file chisel/svsim/src/scala/Workspace.scala on line 53 where rm -rf is called. This should be a relatively simple fix that I can implement.

However there should also be a fix for the clean command generated in the makefile. what would be the best course of action?

What is the use case for changing the behavior?
Allowing use of simulator on windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions