How to build Kicad on Ubuntu
Final update: These directions are exceptionally out of date. Follow the official guide here: https://dev-docs.kicad.org/en/build/
Update: Looking to run the latest and greatest version of Kicad on your Ubuntu computer, but don’t want to mess about with compiling it yourself? Look no further, we’ve set up a PPA for Ubuntu with the newest Kicad automatically compiled each night.
Update 2: It looks like you need to install the “bzrtools” package now, to enable the “patch” command for bzr. Something along the lines of “sudo apt-get install bzrtools” should do the trick on a Debian-based distro. I updated the commands below to install bzrtools.
Wayne and Layne are big fans of Kicad, a suite of high-quality, open-source tools for designing circuit schematics and printed circuit boards. Since development is very active, with awesome updates nearly every day, we like to keep up-to-date with the most recent version. The best way to stay current is by building the software yourself from the source code in the repository. The official Kicad docs are a bit lacking in a complete guide on how to build Kicad from source using a modern Ubuntu Linux, so here is a quick guide we wrote up. This was tested on a fresh install of Ubuntu 10.10 on i386.
Please note that most people won’t need to follow this procedure in order to use Kicad. Prebuilt packages are available from most major Linux distributions, and installers are available for Windows and OSX. However, some people (like us) want to run kicad with brand new updates or contribute to the code. If that sounds like something you want to do, here’s how you do it.
The Kicad source code is stored in a Bazaar repository, so we need to install the bzr utility. We download the source code first, because it doesn’t have any tool requirements to download, and it also will take a while to download all that data:
sudo apt-get install bzr bzrtools bzr checkout lp:kicad kicad.bzr
While that is running, open another terminal and start installing the necessary build tools:
sudo apt-get install build-essential checkinstall cmake doxygen zlib1g-dev sudo apt-get build-dep kicad
You might also need to install the freeglut3 package for the OpenGL stuff.
sudo apt-get install freeglut3
Once the source code has downloaded and all the build tools are installed, go into the new source code directory:
To keep things cleaner, it’s suggested that you create a build directory for the build files:
mkdir build cd build
Kicad uses the CMake tool, so we must run that first:
cmake -DKICAD_TESTING_VERSION=ON ../
CMake generates standard Makefiles, so we proceed in the usual way:
If you have multiple processor cores in your computer, you can do some of the work in parallel, by adding -j N to your make line. Replace N with the number of cores in your computer. My computer has four cores, so I used this command to more quickly build Kicad:
make -j 4
Once the build is finished, install the Kicad files:
sudo make install
Now, you can run kicad and check that everything is working.
Once a few days or weeks have passed and you want to get back up to date, start by updating your copy of the Kicad source code:
cd ~/kicad.bzr bzr update
You probably want to remove all the old build files:
cd build rm -rf *
Continue as before, for compiling and installing Kicad:
cmake -DKICAD_TESTING_VERSION=ON ../ make sudo make install
We hope this guide was useful and accurate! If you run into any trouble, please leave a comment below and we’ll do our best to help you out.
If you want to also install the Kicad library of parts, you can use these commands:
bzr checkout lp:~kicad-lib-committers/kicad/library kicad-library.bzr cd kicad-library.bzr/ mkdir build cd build/ cmake ../ sudo make install