Search code examples
linuxperlterminalrootverilator

Can't open perl script "/bin/verilator" during 'make test'


I'm following a tutorial to install a program on an RHEL environment and I've overcome some errors up until this point. I'm at the end of the installation process, attempting to confirm the validity through "make test", which returns the following error:

[user@localhost verilator-4.018]$ make test
Can't open perl script "/bin/verilator": No such file or directory
...
[Makefile:228: smoke-test] Error 10

I first checked to see if there was a verilator-4.018/bin/verilator file, which there was.

I then tried researching the error online and got a single result, where a user stated the issue could be solved by "Setting VERILATOR_ROOT to the root of your checkout", but I'm not too sure how to interpret this since I'm a beginner.

I tried setting as root:

[root@localhost verilator-4.018]# make test

But got the same error messages.

Also, please let me know how I can rephrase the title to make it more specific. I thought it was difficult to be specific about a question where I need interpretation help.


Solution

  • There is no /bin/verilator ... there is bin/verilator. But it's more tricky than that : The tests are done with test_regress/driver.pl, so "bin/verilator" is one level up.

    Edit test_regress/driver.pl, line 782 to

       my @cmdargs = ("perl", "$ENV{VERILATOR_ROOT}../bin/verilator",
    

    ... and the firsts tests can be run.

    More bugs : "smoke-test" fails : Will use a file from the install destination. Please do # make install ... and the next tests can also be run.

    Test result → make-test__result.txt https://www.dropbox.com/s/tebcqj7bl5dkzx8/make-test__result.txt?dl=0

    Please notice the SYSTEMC settings. verilator was built with $ export SYSTEMC_INCLUDE=/usr/local/include/ && export SYSTEMC_LIBDIR=/usr/local/lib-linux64 && ./configure && make

    SYSTEMC is required for the tests to pass. See verilator/README