Overview
Fritzing is a powerful tool to document electronics connections for many projects. At the moment of writing, there is no binary executable available to be downloaded from Fritzing’s website. People who want to use it can build the application on their own. This page is used to log my attempts to build the application for Ubuntu 22.04.
Get The Source Code
Fritzing is an open source software, the developers do provide the source code and building procedures to follow on the corresponding github repositories.
First, I create a directory in my home directory with the cmd: mkdir homemade_application
This command needs to be run in a terminal with the current directory “home” and there is a “~”shown on the left side of the terminal prompt.
Then, change directory to the new made directory homemade_application with the command: cd homemade_application
Then, git clone the Fritzing-app and Fritzing-parts to this directory with command: git clone https://github.com/fritzing/fritzing-app.git
and command git clone https://github.com/fritzing/fritzing-parts.git
, these two command will download(clone) the repositories to the homemade_application directory
Main Reference Links
Install Prerequisites
According to the first reference link, the “Linux notes”, some prerequisites are needed and can be installed with the command on the page:
$sudo apt-get install build-essential git cmake libssl-dev libudev-dev qt5-default libqt5serialport5-dev libqt5svg5-dev
And I followed that and found the qt5-default CANNOT be installed with this command under Ubuntu 22.04. Then I followed the instruction on this page https://askubuntu.com/questions/1404263/how-do-you-install-qt-on-ubuntu22-04 .
Install the Qt suite with the command :$sudo apt install -y qtcreator qtbase5-dev qt5-qmake cmake
The answer on the page also suggests changing the Qt version manually on two spots(Tools->option), as the following two figures show. I found mine is just OK and skipped this part.
![1.png](https://cdn-learn.adafruit.com/user_assets/assets/000/000/026/large1024/1.png?1666335513)
![2.png](https://cdn-learn.adafruit.com/user_assets/assets/000/000/027/large1024/2.png?1666335593)
Then, add the bin folder of qt5 to the bash PATH, my qt5/bin
folder is in /usr/lib
; the reference link 1 suggests /usr/lib64
. Please double check where the qt5/bin
is and add that to the PATH. I used vim to edit the .bashrc
file and add a line export PATH=/usr/lib/qt5/bin:PATH
at the bottom of the .bashrc
file and restarted the terminal.
Then I changed the directory to ~/homemade_application/fritzing-app
as the “Building Fritzing” section suggests in reference 1, and used qmake
command
The project MESSAGE from the terminal prompt told me Fritzing requires libgit2 and it seems that the libgit2 should sit next to the directory of fritzting-app. Fritzing requires version 0.28.x of libgit2 according to reference link 2
So I looked up in the release page of libgit2 in the following link.
and downloaded the 0.28.5 version, unzipped it in the homemade_application directory.
The basic build of libgit2 is documented in the following link.
with four step as :
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .
I replaced the 3rd and 4th step with
$cmake -DBUILD_SHARED_LIBS=OFF ..
$sudo cmake --build . --target install
As the reference link 2 suggests
There is another catch needs to pay attention, the libgit2 you downloaded may have version information in the directory name like libgit2-0.28.5, you can rename that to libgit2 if the qmake command keeps complainting Project ERROR: libgit2 include path not found in XXXX, the XXXX is the directory the qmake expect the libgit2/include, in my case, it is ../homemade_application/fritzing-app/../libgit2/include
Build
Then I followed the “Run” section in reference link 2. The steps need to be performed in the Qt creator GUI app. It did take a while to compile. After throwing out 200+ warnings, my Fritzing was successfully built.
After compiling, pressed the green play button again. It launched the Fritzing app and it was ready to be used.
With this method, the fritzing can only be used through Qt creator. If a standalone executable is needed, release steps should be done. I am quite happy with a usable fritzing right now and may log the release procedure later.