Difference between revisions of "KiCAD from Source"
Jump to navigation
Jump to search
| (17 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= | > | ||
{{{!}} class="wikitable" style="float: right; width: 322px;" border="2" | |||
{{!}}+ Proven on: | |||
{{!}}- --="" lmde="" | |||
{{!}} style="text-align: center; width: 65.675px;" {{!}} [[File:Logo LMDE.png{{!}}60px{{!}}link=https://linuxmint.com/edition.php?id=279{{!}}center{{!}}middle{{!}}frameless]] | |||
{{!}} style="text-align: center; width: 40px;" {{!}} 6 (Faye) | |||
{{!}} | |||
<br> | |||
{{!}}- <!-- Debian --> | |||
{{!}} style="text-align: center; width: 60px;" {{!}} [[File:Logo Debian.png{{!}}60px{{!}}link=https://www.debian.org/{{!}}center{{!}}middle{{!}}frameless]] | |||
{{!}} style="text-align: center; width: 40px;" {{!}} 12 (bookworm) | |||
{{!}} | |||
<br> | |||
{{!}}} | |||
Installing KiCAD from the repositories gives you a couple silly options. Directly installing gets you a seriously outdated version and installing a FLATPAK which seems to be rather broken. | |||
<span style="color: rgb(153, 51, 102);" >'''Note: This builds a non-stable version.''' (Whatever state the code is currently in...)</span> | So, let's try building it from source. | ||
(Based on: [https://dev-docs.kicad.org/en/build/ KiCAD Developer Documentation / Building KiCad from Source]) | |||
== '''<span style="color: rgb(132, 63, 161);">The required tools:</span>''' == | |||
* <code>sudo apt install git cmake</code> | |||
== '''<span style="color: rgb(132, 63, 161);">Get the source:</span>''' == | |||
<span style="color: rgb(153, 51, 102);">'''Note: This builds a non-stable version.''' (Whatever state the code is currently in...)</span> | |||
* <code>git clone <nowiki>https://github.com/KiCad/kicad-source-mirror</nowiki> kicad</code> | * <code>git clone <nowiki>https://github.com/KiCad/kicad-source-mirror</nowiki> kicad</code> | ||
'''<span style="color: rgb(132, 63, 161);" >or maybe:</span>''' | '''<span style="color: rgb(132, 63, 161);">or maybe:</span>''' | ||
<span style="color: rgb(153, 51, 102);" >'''Note: This should build a stable version.''' (You can change branch to match current stable version...)</span> | <span style="color: rgb(153, 51, 102);">'''Note: This should build a stable version.''' (You can change branch to match current stable version...)</span> | ||
* <code>git clone <nowiki>https://github.com/KiCad/kicad-source-mirror</nowiki> --branch | * <code>git clone <nowiki>https://github.com/KiCad/kicad-source-mirror</nowiki> --branch 9.0 kicad</code> | ||
* <code>sudo apt install swig libwxgtk3.2-dev libboost1.74-all-dev libglew-dev libglm-dev libglut-dev libcairo-dev python3-dev wxpython-tools libcurl4-openssl-dev libgit2-dev libngspice0-dev libharfbuzz-dev libocct-data-exchange-dev unixodbc-dev libgtk-3-dev libsecret-1-dev</code> | == '''<span style="color: rgb(132, 63, 161);">The prerequisites:</span>''' == | ||
'''<span style="color: rgb(132, 63, 161);" >Set it up:</span>''' | * <code>sudo apt install swig libwxgtk3.2-dev libboost1.74-all-dev libglew-dev libglm-dev libglut-dev libcairo-dev python3-dev wxpython-tools libcurl4-openssl-dev libgit2-dev libngspice0-dev libharfbuzz-dev libocct-data-exchange-dev unixodbc-dev libgtk-3-dev libsecret-1-dev libnng-dev libprotobuf-dev protobuf-compiler</code> | ||
=== Notes: === | |||
Took a bit of further digging to learn about adding '''libnng-dev''', '''libprotobuf-dev''' and '''protobuf-compiler''' | |||
== '''<span style="color: rgb(132, 63, 161);">Set it up:</span>''' == | |||
* <code>cd kicad/</code> | * <code>cd kicad/</code> | ||
* <code>mkdir -p build/release</code> | * <code>mkdir -p build/release</code> | ||
* <code>cd build/release</code> | * <code>cd build/release</code> | ||
* <code>cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../../</code> | * <code>cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DKICAD_USE_CMAKE_FINDPROTOBUF=ON ../../</code> | ||
'''<span style="color: rgb(132, 63, 161);" >Build it:</span>''' | |||
== '''<span style="color: rgb(132, 63, 161);">Build it:</span>''' == | |||
* <code>make -j$(nproc --ignore=2)</code> | |||
== '''<span style="color: rgb(132, 63, 161);">Install it:</span>''' == | |||
'''<span style="color: rgb(132, 63, 161);" >Install it:</span>''' | |||
* <code>sudo make install</code> | * <code>sudo make install</code> | ||
== <span style="color: rgb(132, 63, 161);">'''AAANNNDDD...'''</span> == | |||
WTF? | |||
'''kicad: error while loading shared libraries: libkigal.so.9.0.4: cannot open shared object file: No such file or directory''' | |||
Latest revision as of 23:56, 8 August 2025
>
| 6 (Faye) |
| |
| 12 (bookworm) |
|
Installing KiCAD from the repositories gives you a couple silly options. Directly installing gets you a seriously outdated version and installing a FLATPAK which seems to be rather broken.
So, let's try building it from source.
(Based on: KiCAD Developer Documentation / Building KiCad from Source)
The required tools:
sudo apt install git cmake
Get the source:
Note: This builds a non-stable version. (Whatever state the code is currently in...)
git clone https://github.com/KiCad/kicad-source-mirror kicad
or maybe:
Note: This should build a stable version. (You can change branch to match current stable version...)
git clone https://github.com/KiCad/kicad-source-mirror --branch 9.0 kicad
The prerequisites:
sudo apt install swig libwxgtk3.2-dev libboost1.74-all-dev libglew-dev libglm-dev libglut-dev libcairo-dev python3-dev wxpython-tools libcurl4-openssl-dev libgit2-dev libngspice0-dev libharfbuzz-dev libocct-data-exchange-dev unixodbc-dev libgtk-3-dev libsecret-1-dev libnng-dev libprotobuf-dev protobuf-compiler
Notes:
Took a bit of further digging to learn about adding libnng-dev, libprotobuf-dev and protobuf-compiler
Set it up:
cd kicad/mkdir -p build/releasecd build/releasecmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DKICAD_USE_CMAKE_FINDPROTOBUF=ON ../../
Build it:
make -j$(nproc --ignore=2)
Install it:
sudo make install
AAANNNDDD...
WTF?
kicad: error while loading shared libraries: libkigal.so.9.0.4: cannot open shared object file: No such file or directory