PrincetonUniversity / prga

Open-source FPGA research and prototyping framework.
http://parallel.princeton.edu/prga/
BSD 3-Clause "New" or "Revised" License
192 stars 24 forks source link

Error while building fpga_tiny_k4_N2_8x8 #7

Closed kiranhollag closed 4 years ago

kiranhollag commented 4 years ago

Hi, I came across PRGA topic while searching for open source FPGA and EDA tools, looks really amazing; I am very new to these open-source tools and Python. While building k4_N2_8x8 as per docs/source/intro.rst (shorturl.at/iopAM), I am facing following error.

python build.py Traceback (most recent call last): File "build.py", line 3, in from prga.api.context import * ModuleNotFoundError: No module named 'prga' make: *** [../../Makefile.in:10: ctx.pickled] Error 1

Installation was successful and before running the MAKE, ./envscr/activate was also run without any issues.

I am missing something extremely important? Can anyone please help?

kiranhollag commented 4 years ago

@leon575777642 any thoughts on this?

angl-dev commented 4 years ago

Hi @kiranhollag ! Sorry for the late reply.

That seems to me like a python module installation problem. prga.py is not successfully installed into the virtual environment. I suggest you do the following:

  1. go to prga.py, run rm -rf .venv. This cleans the previously installed Python virtual environment
  2. Rerun envscr/install and save the entire log. Post the log here and I'll help you with the installation
kiranhollag commented 4 years ago

Hi @leon575777642 thank you for the reply.

Please find the attached log (while running envscr/install) prga_install_log.txt

Now facing "AttributeError: install_layout" @ different places. FYI, I am using Ubuntu 20.04, just wanted to know are there any OS/Linux version dependencies?

Thanks, Kiran

angl-dev commented 4 years ago

Hi Kiran, I noticed two things in the log:

  1. Check the commit of your VTR installation and make sure it is consistent with the submodule in prga.
  2. It seems the pipfile created in prga.py requires python 3.8. You may remove the Pipefile and Pipfile.lock in prga.py and rerun the installation. I'm not sure if that's why bitarray and prga.py failed to install, but worth a try.

By the way, are you using the release branch?

kiranhollag commented 4 years ago

Hi @leon575777642, Thanks again for the info.

  1. VTR installation : perl run_quick_test.pl ran successfully, so it looks to be fine.
  2. Reran the build with clean setup and "PYTHON_VERSION=3.8.0" in ./envscr/install, it took Python 3.8.0 for the local installation, but again hitting issue while building "bitarray future hdlparse"; this error is coming while "installing -e" .One thing I observed is, its taking cached bitarray-1.2.2.tar.gz, future-0.18.2.tar.gz etc; but this might be ok. VTR installation looks fine here too. Please find the the log for reference prga_install_log_failed_at_bitarray.txt.

Regarding the Branch, : I had cloned it using "https://github.com/PrincetonUniversity/prga"

Thanks, Kiran

angl-dev commented 4 years ago

Hi @kiranhollag , this might be an OS/compiler problem. I googled a bit and it seems upgrading setuptools and pip usually helps. This is a bit strange in our case, because the installation script installs pyenv to manage not only the python packages but also the python interpretter and pip themselves. Could you try activating the virtual environment manually, then run pip install --upgrade setuptools pip?

kiranhollag commented 4 years ago

Hi @leon575777642, Thanks for the info.

I am trying this option, I will let you know on the progress.

Thanks, Kiran

angl-dev commented 4 years ago

By the way, another developer encountered some problems when installing VPR on Ubuntu 19.10 so he eventually used a VM to install prga. This is not the best option, but if other solutions don't work, you can give it a try.

kiranhollag commented 4 years ago

Hi @leon575777642

Now I am able to solve this issue and it works perfectly fine on Ubuntu 20.04, there were few problems as listed below; detailed the resolution also so that it would be easier for a newcomer like me.

Attaching the Original(install_orig.txt) and the working(install_working.txt) copy of install files Thanks for all the information provided.

Regards, Kiran

angl-dev commented 4 years ago

Hi @kiranhollag ,

Thanks a lot for looking into this issue. Could you create a pull request with your update on the install script? I'm working towards a new release and let's see if we can merge your changes into the new release!

angl-dev commented 4 years ago

Hi @kiranhollag ,

I've updated the scripts in the latest release and included the fixes you recommended. Thanks for looking into this!