f4pga / f4pga-arch-defs

FOSS architecture definitions of FPGA hardware useful for doing PnR device generation.
https://f4pga.org
ISC License
273 stars 113 forks source link

CMake generation error with fusesoc #1695

Open mkurc-ant opened 4 years ago

mkurc-ant commented 4 years ago

When running make env from the root directory everything passes fine. Later if any of CMake scripts gets modified and a command make <target> is invoked CMake tires to re-generate related Makefiles. Then the error emerges:

patching file examples/fpga/artya7/rtl/top_artya7.sv
patching file shared/rtl/fpga/xilinx/clkgen_xil7series.sv
patching file vendor/lowrisc_ip/prim/rtl/prim_lfsr.sv
patching file vendor/lowrisc_ip/prim_generic/rtl/prim_generic_clock_gating.sv
/usr/bin/python3: Error while finding module specification for 'fusesoc.main' (ModuleNotFoundError: No module named 'fusesoc')
Traceback (most recent call last):
  File "/home/mkurc/Repos/google-symbiflow-arch-defs/xc/xc7/tests/soc/ibex/generate.py", line 142, in <module>
    main()
  File "/home/mkurc/Repos/google-symbiflow-arch-defs/xc/xc7/tests/soc/ibex/generate.py", line 116, in main
    run_fusesoc(ibex_tmp_dir, soc, part, f_log)
  File "/home/mkurc/Repos/google-symbiflow-arch-defs/xc/xc7/tests/soc/ibex/generate.py", line 46, in run_fusesoc
    cwd=ibex_tmp_dir
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'python3 -mfusesoc.main --cores-root=/tmp/tmpf5bq9xyu/ibex run --target=synth --setup lowrisc:ibex:top_artya7 --part xc7a35ticsg324-1L' returned non-zero exit status 1.
CMake Error at xc/xc7/tests/soc/ibex/CMakeLists.txt:34 (add_custom_command):
  add_custom_command Wrong syntax.  A TARGET or OUTPUT must be specified.
litghost commented 4 years ago

This is a result of not being the conda environment. "make enter" can be used to use the right env.