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

VUnit based project runs error on Windows due to mkdir -p #472

Open
pintert3 opened this issue Oct 2, 2023 · 4 comments
Open

VUnit based project runs error on Windows due to mkdir -p #472

pintert3 opened this issue Oct 2, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@pintert3
Copy link

pintert3 commented Oct 2, 2023

Describe the bug
When trying to run a project whose sources are got from a vunit file, an error is thrown when trying to create directories:

2023-10-02 23:22:13.986 [info] "Creating libraries directories"

2023-10-02 23:22:13.989 [info] mkdir -p lib

2023-10-02 23:22:14.015 [info] mkdir -p vunit_lib

2023-10-02 23:22:14.038 [info] A subdirectory or file -p already exists.
Error occurred while processing: -p.

2023-10-02 23:22:14.042 [info] make: *** [make_libraries_directories] Error 1

I reckon the error is due to the whatever make command is being used, as it doesn't work directly on Windows.

To Reproduce
Create a VUnit run.py, a VHDL file and it's test bench.
Create and an empty project in TerosHDL.
Load source files to the project using VUnit run.py.
Set the testbench as the toplevel and try to run.

Please complete the following information:

  • Windows 11
  • VSCode version 1.82.3
@pintert3 pintert3 added the bug Something isn't working label Oct 2, 2023
@pintert3
Copy link
Author

pintert3 commented Oct 4, 2023

For windows CMD and Powershell, the -p is not necessary

@SebDunst
Copy link

Having the same issue here.
I'm also using Windows (Win10). I have everything perfectly installed (Check dependencies passes without any errors).

In my case I am trying a "GHDL"-Run with the "half_adder" example.
When compiling the two source files "half_adder.vhd" and "half_adder_tb.vhd" into library "work", then everything is fine.
But if I try to introduce some kind of library (e.g. compiling "half_adder.vhd" into "mylib", then there is the same error as described above.

Regards,
Sebastian

@pintert3
Copy link
Author

I did some digging earlier and realized it's an issue with edalize. I opened an issue there: olofk/edalize#403. Unfortunately, doesn't seem like they'll fix it soon, so I fixed mine by changing the
"mkdir -p {}".format(lib) in the edalize/ghdl.py with "if not exist {s} mkdir {s}".format(s=lib).

It fixed that particular bug for me, although I found another one related to ghdl failing to find the main vhd tb file I was attempting to simulate

@olofk
Copy link

olofk commented Dec 8, 2023

Sorry for being a bit slow here. Looking at the code I wonder if we need the -p switch at all. That would be required to create parent directories, but unless I'm misreading things, the command would always make a single-depth subdir in a known existing directory, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants