[Libre-soc-dev] Libre-soc Environment Installation

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Jun 14 13:20:57 BST 2022


---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68

On Tue, Jun 14, 2022 at 12:44 PM Santhosh Kumar V V . via
Libre-soc-dev <libre-soc-dev at lists.libre-soc.org> wrote:
>
> Hi sir, I tried running "nosetests3" there are several errors but all of
> them are ModuleNotFoundError: No module named 'vcd'
>
> ======================================================================
> ERROR: test_xor_unary (tests.test_sim.SimulatorUnitTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/src/nmigen/tests/test_sim.py", line 91, in test_xor_unary
>     self.assertStatement(stmt, [C(0b00, 2)], C(0))
>   File "/home/src/nmigen/tests/test_sim.py", line 30, in assertStatement
>     sim = Simulator(frag)
>   File "/home/src/nmigen/nmigen/sim/core.py", line 60, in __init__
>     from .pysim import PySimEngine
>   File "/home/src/nmigen/nmigen/sim/pysim.py", line 4, in <module>
>     from vcd import VCDWriter
> ModuleNotFoundError: No module named 'vcd'

that's extremely strange.  if you look here:

https://gitlab.com/nmigen/nmigen/-/blob/master/setup.py#L30
    install_requires=[
        "importlib_metadata; python_version<'3.8'",  # for __version__
and nmigen._yosys
        "importlib_resources; python_version<'3.9'", # for nmigen._yosys
--->    "pyvcd~=0.2.2", # for nmigen.pysim  <----
        "Jinja2~=3.1",  # for nmigen.build

> I tried installing VCD from pip3 but the error persists still.

you should not have needed to do that (and in fact if you did, it was
the latest version, which is definitely the wrong version)

hdl-dev-repos, the automated-install script, definitely runs
"python3 setup.py develop"
https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=hdl-dev-repos;hb=HEAD#l24

  22 cd /home/$SUDO_USER/src/nmigen
  23 git tag | xargs git tag -d # very annoying
  24 python3 setup.py develop

which should definitely install pyvcd as part of the installation
of dependencies.

so there is something *extremely* strange going on.

are you sure that you followed *exactly* these commands listed here?
https://libre-soc.org/HDL_workflow/devscripts/

$ git clone https://git.libre-soc.org/git/dev-env-setup.git
$ cd dev-env-setup
$ sudo bash
# ./mk-deb-chroot libresoc
# exit
$ schroot -c libresoc
(libresoc)$ git clone https://git.libre-soc.org/git/dev-env-setup.git
(libresoc)$ cd dev-env-setup
(libresoc)$ sudo bash
(libresoc)# ./install-hdl-apt-reqs
(libresoc)# ./hdl-dev-repos
(libresoc)# ./ppc64-gdb-gcc           # needed for compiling unit tests
(libresoc)# exit
(libresoc)$



More information about the Libre-soc-dev mailing list