olofk / fusesoc

Package manager and build abstraction tool for FPGA/ASIC development
BSD 2-Clause "Simplified" License
1.16k stars 240 forks source link

Issue with SECTION_MAP attribute #54

Closed juliusbaxter closed 8 years ago

juliusbaxter commented 10 years ago

I've just updated to 15cf8143c30b4bb and I am seeing the following:

$ fusesoc list-cores
Traceback (most recent call last):
  File "/home/jules/git/fusesoc/bin/fusesoc", line 232, in 
    run(parsed_args)
  File "/home/jules/git/fusesoc/bin/fusesoc", line 167, in run
    cm.add_cores_root(config.cores_root)
  File "/home/jules/git/fusesoc/fusesoc/coremanager.py", line 64, in add_cores_root
    self.load_cores(os.path.expanduser(p))
  File "/home/jules/git/fusesoc/fusesoc/coremanager.py", line 53, in load_cores
    self.load_core(d, f)
  File "/home/jules/git/fusesoc/fusesoc/coremanager.py", line 30, in load_core
    self._cores[name] = Core(file)
  File "/home/jules/git/fusesoc/fusesoc/core.py", line 34, in __init__
    for s in section.SECTION_MAP:
AttributeError: 'module' object has no attribute 'SECTION_MAP'

By following the helpful advice of stekern here I was able to get this to work again. So I did something like:

$ make distclean
$ find . -name "*.pyc" | xargs rm

.. and list-cores worked again. However, probably the root cause of this should be identified?

Not sure if this is Python issue or what, but maybe a clean should clear away .pycs?

bandvig commented 10 years ago

I've got quite similar issue. If I try to execute:

fusesoc system-info atlys

I receive the following:

... Private Testbench files:bench/orpsoc_tb.v bench/uart_decoder.v

SYSTEM INFO Name: atlys Backend name: ise run(parsed_args) File "/home/BAndViG/ORPSoC/fusesoc/bin/fusesoc", line 179, in run args.func(args) File "/home/BAndViG/ORPSoC/fusesoc/bin/fusesoc", line 110, in system_info core.system.info() File "/home/BAndViG/ORPSoC/fusesoc/fusesoc/system.py", line 35, in info print(" family: " + self.backend['family']) TypeError: 'IseSection' object has no attribute 'getitem'

However, list-cores option works fine.

olofk commented 10 years ago

Thanks for reporting this. I can confirm the issue that @bandvig is seeing, and I'll probably remove the system info printouts until this is properly resolved. The issue that @juliusbaxter is seeing is probably due to an internal change to FuseSoC in commit c199bfabbb75 . We didn't think of it then when we commited that, but it requires the user to remove the old version of FuseSoC before installing a new one. The easiest way that I have found is to get a version before that commit and run ./configure && make uninstall to remove the old files

olofk commented 10 years ago

The system-info problem is fixed in a94acbc87f136

olofk commented 8 years ago

Closing now