Environment configuration process
git clone https://github.com/LNIS-Projects/OpenFPGA.git
cd OpenFPGA/.github/workflows
# Add ‘sudo’ before apt-get in script: install_depencies_build.sh
source install_depencies_build.sh # (install all depencies)
# back to OpenFPGA
python3 –m pip install –r requirements.txt
make all
# During make, watch the error messages and see which package is missing, repeatly using ‘sudo apt install XXX’ to install them like:
Tcl.h: sudo apt install tcl-dev
readline: sudo apt install readline-dev
How to Solve the Errors:
Compilation error
SIGSTKSZ Error
- Cause: Guess it is a C compilation tool chain version problem caused by different source change
- Solution: Update the version of catch.hpp and replace
1. Download
wget -O ~/Downloads/catch.hpp https://github.com/catchorg/Catch2/releases/download/v2.13.9/catch.hpp
2. Replace the file
cd {OpenFPGA_File_location}/libs/EXTERNAL/libcatch/
mv catch.hpp catch.bak.hpp
mv ~/Downloads/catch.hpp ./
FATAL ERROR issues about TBB
- Cause: system problem missing header file tbb_stddef.h
- Solution:
wget -O ~/Downloads/tbb_stddef.h https://raw.githubusercontent.com/wjakob/tbb/9e219e24fe223b299783200f217e9d27790a87b0/include/tbb/tbb_stddef.h
sudo mv ~/Downloads/tbb_stddef.h /usr/include/tbb
Missing header file task_scheduler_init.h
wget -O ~/Downloads/task_scheduler_init.h https://raw.githubusercontent.com/wjakob/tbb/raw/master/include/tbb/task_scheduler_init.h
sudo mv ~/Downloads/task_scheduler_init.h /usr/include/tbb
Dependency not found
- Uniform problem: Error or not running when running install_dependencies_build.sh or when pip install
- Solution: rerun both steps and install separately if there is still a problem
Note
# Missing ffi.h
sudo apt install libffi-dev
# Missing tcl.h
sudo apt install tk tcl tk-dev tcl-dev
# Missing readline
sudo apt install readline-dev libreadline6-dev
run-task error
Check the log. The most observed problem is that envYAML package is not installed
pip3 install envyaml
ModuleNotFoundError ‘prettytable’
When running run_vtr_task.py, it prompts: ModuleNotFoundError: No module named ‘prettytable’
processing:
# update pip
python -m pip install --upgrade pip
# install PrettyTable package
pip install PrettyTable
Script unsatisfiable
- ctags, qt5-default are not available candidates (no installation candidate)
- Solution: In most usage scenarios, these two packages are not important, edit the install_dependencies_build.sh file and delete the lines ctags and qt5-default
Network environment problems
include:
-
-
- Connection refused Connection refused
- 443 SSL could not be established
- Clone failed Clone failed
Solution:
-
-
- Modify hosts
- Open accelerator/VPN
- Use personal hotspot for mobile traffic
Runtime problems
Permission Denied | Can not find directory…
Problem Analysis: The command is incorrectly run with the root user when git clone or install dependencies, resulting in the personal user not having any modification rights.
Solution: In the root directory of OpenFPGA
sudo chown -hR {user name}:{user group, usually same as user name} . /
# Change all file owners to individual users
In the yosys shell, when the show command views the circuit diagram, it prompts an error
Problem: lack of dot matrix graphic display tool
solution: try running sudo apt-get install xdot