Dependencies
In general, OpenFPGA requires specific versions for the following dependencies:
- cmake
version >3.15 for graphical interface
- gcc
version >9 as the project requires full support on C++17 features
- qt
version >5 as the project requires Qt5 features
- python dependencies
python packages are also required:
python3 -m pip install -r requirements.txt
Ubuntu
Full list of dependencies can be found at install_ubuntu_dependencies_build_.
# Install required dependencies for Ubuntu systems
pip3 install gcovr==6.0
sudo apt-get update -qq
sudo apt install -y \
g++-11 gcc-11 \
tclsh \
cmake \
build-essential \
google-perftools \
uuid-dev \
valgrind \
xorg \
qt6-base-dev qt6-webengine-dev qt6-webengine* libqt6webenginecore6* libegl1-mesa-dev libx11-xcb-dev libxkbcommon-dev \
xvfb \
yosys \
automake \
libusb-1.0-0-dev \
pkg-config \
python3-dev
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt update
sudo apt install vulkan-sdk
sudo apt install -y libunwind-dev
sudo apt install -y --no-install-recommends libgoogle-perftools-dev
# For QML: qtdeclarative5-dev
sudo ln -sf /usr/bin/g++-11 /usr/bin/g++
sudo ln -sf /usr/bin/gcc-11 /usr/bin/gcc
sudo ln -sf /usr/bin/gcov-11 /usr/bin/gcov
Note
Different Ubuntu version may require different package names. See details in the sub subsections
Ubuntu 18.04
sudo apt-get install qt5-default g++-9 \
libkf5qqc2desktopstyle-dev \
tclsh \
cmake \
build-essential \
google-perftools \
libgoogle-perftools-dev \
uuid-dev \
lcov \
valgrind \
xorg \
xvfb
Ubuntu 20.04
sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools g++-9 \
libkf5qqc2desktopstyle-dev \
tclsh \
cmake \
build-essential \
google-perftools \
libgoogle-perftools-dev \
uuid-dev \
lcov \
valgrind \
xorg \
xvfb
Ubuntu 21.04
sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools g++-9 \
libkf5qqc2desktopstyle-dev \
tclsh \
cmake \
build-essential \
google-perftools \
libgoogle-perftools-dev \
uuid-dev \
lcov \
valgrind \
xorg \
xvfb
Ubuntu 21.10
sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools g++-9 \
libkf5qqc2desktopstyle-dev \
tclsh \
cmake \
build-essential \
google-perftools \
libgoogle-perftools-dev \
uuid-dev \
lcov \
valgrind \
xorg \
xvfb \
autoconf
AlmaLinux 8.4
Warning
needs further testing
sudo dnf install qt5-qtbase-devel
Note
Both “make” and “make test” will pass after this package is installed, however I don’t know the difference between this package and the Ubuntu 20.04/21.04 ones yet, and potential differences may bring impacts in the future. Consider support for RHEL-based distros experimental at the moment.
Mac OS
Full list of dependencies can be found at install_macos_dependencies_build_.
# Install required dependencies for Mac OS systems
brew install qt5 pkgconfig libusb
brew install fmt
export PATH="/usr/local/opt/qt@5/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/qt@5/lib"
export CPPFLAGS="-I/usr/local/opt/qt@5/include"
WIN
MSVC
Minimal requirements:
Microsoft Visual Studio сommunity edition
Qt5 for MSVC
Make sure component ‘C++ CMake tools for windows’ is installed for Microsoft Visual Studio
Make sure Qt bin are in the PATH variable. e.g. set PATH=C:Qt5.15.2msvc2019_64bin;%PATH%
Make sure Qt5_DIR is set. e.g. C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5
MSYS2 MinGW64
MSYS2 env with the MinGW64 g++ compiler can be used to build FOEDAG.
Get the latest installer from : https://www.msys2.org/
Follow the steps on the main site : https://www.msys2.org/ (also listed below, step 1-6), and step 7 lists the additional packages needed to build FOEDAG:
Invoke the downloaded installer
Allow installer to run the MSYS2 MSYS Shell
Run
pacman -Syu
for initial base updatesAt the end, it will close the terminal after confirmation
Run MSYS2 MSYS Shell
Run
pacman -Su
for remaining base updatesRun
pacman -S --needed base-devel mingw-w64-x86_64-toolchain git mingw-w64-x86_64-cmake mingw-w64-x86_64-qt5-base-debug mingw-w64-x86_64-qt5 mingw-w64-x86_64-qt5-declarative-debug mingw-w64-x86_64-tcl mingw-w64-x86_64-zlib
for installing required packages.Select default (all) packages to install here
Close the MSYS2 MSYS Shell
Now, use MSYS2 MinGW x64 Shell (from Start Menu) to open the right shell and start building.
- If the system has MSVC compiler setup with Qt5 installed, it is likely that
Qt5_DIR
env variable is set.If so, the MSYS2 build will pick up the MSVC Qt5 install, and linking will fail due to the difference in name mangling.In this case, ensure thatQt5_DIR
is set to the MinGW64 Qt5 packages before building.export Qt5_DIR=/mingw64/lib/cmake/Qt5