Ok, I lied. KiCAD 5.99, which will become 6 sometime in 2021! Nightly builds are produced for a bunch of platforms but not for Raspberry Pi OS. I needed KiCAD 5.99 to work with CM4IO schematics. While there are instructions provided for Linux, the prereqs aren’t documented best I can tell. I didn’t get very far. And even though the below might be suboptimal in places, it does work.

Please let me know in the comments if you know of ways to improve this process. Yes, it builds and the project manager app launches with XFCE4 as the window manager (which was set up per these instructions). I haven’t extensively tested this but I’m hoping it will help somebody else ou after investing a bunch of time into this.

Starting with Raspberry OS Lite, I installed the following packages:

sudo apt -y install \
  cmake \
  git \
  build-essential \
  ninja-build \
  libegl-dev \
  libglew-dev \
  libglm-dev \
  libcurl4-openssl-dev \
  libcairo2-dev \
  libboost-all-dev \
  libngspice0-dev \
  liboce-foundation-dev \
  liboce-ocaf-dev \
  swig \
  libwxgtk3.0-dev \
  python-wxgtk3.0-dev \
  doxygen \
  libgtk-3-dev \
  libssl-dev \

Next, I cloned the KiCAD mirror on github as follows:

git clone \

Then I realized I needed to build wxWidgets from source to link them with gtk3 (instead of gtk2). This git clone comes with special instructions for a flag to add:

git clone \
  --recurse-submodules \

Now I built wxWidgets with gtk3 from source:

cd wxWidgets && \
mkdir build_gtk && \
cd build_gtk && \
../configure && \
make && \
sudo make install && \
sudo ldconfig

At this point I’m ready to build KiCAD itself:

cd ~/kicad-source-mirror && \
mkdir -p build/release && \
cd build/release && \
cmake \
  -G Ninja \
  ../../ -L && \
ninja && \
sudo ninja install

You can add other compile options as needed. -L is specified to see what cmake comes up with exactly. The EGL compile is mandatory for these instructions. I don’t use scripting and haven’t had luck building it with scripting turned on. Let me know if you know how to make it work.

This builds configs for ninja to build KiCAD, builds KiCAD, and installs KiCAD. On an overclocked Pi 4 4GB, the build takes just under 2 hours. And if you don’t like ninja as the build system, you can of course go back to make by omitting the -G Ninja flag. The build will just take slightly longer.

Done! Happy KiCAD’ing!


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: