Compiling on Ubuntu 18.04 LTS-How?

I’d like to compile a local copy of the latest Kicad 5.1.x on Ubuntu 18.04 LTS.
I’ve cloned the source code (Master branch) using git. I have tried to follow the instructions here

https://kicad-source-mirror.readthedocs.io/en/latest/Documentation/development/compiling/#library-dependencies-library_dependencies

Building KiCad on Linux # {#build_linux}

To perform a full build on Linux, run the following commands:

cd <your kicad source mirror>
mkdir -p build/release
mkdir build/debug               # Optional for debug build.
cd build/release
cmake -DCMAKE_BUILD_TYPE=Release \
      ../../
make
sudo make install

If the CMake configuration fails, determine the missing dependencies and install them on your system. By default, CMake sets the install path on Linux to /usr/local. Use the CMAKE_INSTALL_PREFIX option to specify a different install path.

It stalls at the CMake command (specifically cmake -DCMAKE_BUILD_TYPE=Release ) and I’m assuming it’s because of all the dependencies that are not installed. Is there a way of pulling in all the dependencies with a script? Or do I have to install them all manually (potentially VERY open to errors).

I tried the command apt-get build-dep kicad but it asks for a source code location and I’m not sure how to provide this information.

My sole aim for compiling Kicad locally is so that I can start to understand the source code (in particular the append_board_to_current.cpp file)

Any help in getting the code compiled would be welcome

Can you paste in the output of the cmake command that is failing? Can you also paste the exact output from apt-get build-dep kicad?

Thanks for your reply.
Here is the rather lengthy output after I changed to the correct directory containing the cmake text file/s and later enabled the Kicad nightly PPA source code repository.

david@david-Precision-7510:~$ cd kicad
david@david-Precision-7510:~/kicad$ cd build/release
david@david-Precision-7510:~/kicad/build/release$ sudo cmake -DCMAKE_BUILD_TYPE=Release \

[sudo] password for david:
CMake Error: The source directory “/home/david/kicad/build/release” does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
david@david-Precision-7510:~/kicad/build/release$ cd …
david@david-Precision-7510:~/kicad/build$ cd…
cd…: command not found
david@david-Precision-7510:~/kicad/build$ cd…
cd…: command not found
david@david-Precision-7510:~/kicad/build$ cd kicad
bash: cd: kicad: No such file or directory
david@david-Precision-7510:~/kicad/build$ cd …
david@david-Precision-7510:~/kicad$ ls
3d-viewer demos LICENSE.BOOSTv1_0 potrace
AUTHORS.txt Documentation LICENSE.CC-BY-SA-4.0 qa
bitmap2component Doxyfile LICENSE.GPLv3 README.txt
bitmaps_png dxflib_qcad LICENSE.ISC resources
build eeschema LICENSE.README scripting
_clang-format gerbview new scripts
CMakeLists.txt helpers pagelayout_editor template
CMakeModules include patches TODO.txt
common INSTALL.txt pcb_calculator tools
copyright.h kicad pcbnew uncrustify.cfg
CTestConfig.cmake libs plugins utils
cvpcb LICENSE.AGPLv3 polygon
david@david-Precision-7510:~/kicad$ sudo cmake -DCMAKE_BUILD_TYPE=Release
– The C compiler identification is GNU 7.3.0
– The CXX compiler identification is GNU 7.3.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– KiCad install dir: </usr/local>
– Looking for malloc.h
– Looking for malloc.h - found
– Looking for iso646.h
– Looking for iso646.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for strcasecmp
– Looking for strcasecmp - found
– Looking for strncasecmp
– Looking for strncasecmp - found
– Looking for strtok_r
– Looking for strtok_r - found
– Looking for malloc
– Looking for malloc - found
– Looking for math.h
– Looking for math.h - found
– Looking for C++ include cmath
– Looking for C++ include cmath - found
– Looking for asinh
– Looking for asinh - found
– Looking for acosh
– Looking for acosh - found
– Looking for atanh
– Looking for atanh - found
– Performing Test HAVE_CMATH_ISINF
– Performing Test HAVE_CMATH_ISINF - Success
– Looking for clock_gettime in rt
– Looking for clock_gettime in rt - found
– Looking for gettimeofday
– Looking for gettimeofday - found
– Looking for getc_unlocked
– Looking for getc_unlocked - found
– Performing Test COMPILER_SUPPORTS_WSUGGEST_OVERRIDE
– Performing Test COMPILER_SUPPORTS_WSUGGEST_OVERRIDE - Success
– Performing Test COMPILER_SUPPORTS_WVLA
– Performing Test COMPILER_SUPPORTS_WVLA - Success
– Performing Test COMPILER_SUPPORTS_WSHADOW
– Performing Test COMPILER_SUPPORTS_WSHADOW - Success
– Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GLEW (missing: GLEW_INCLUDE_DIR GLEW_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
CMakeModules/FindGLEW.cmake:38 (find_package_handle_standard_args)
CMakeLists.txt:557 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/david/kicad/CMakeFiles/CMakeOutput.log”.

apt-get build-dep kicad output to follow next.

david@david-Precision-7510:~/kicad$ sudo apt-get build-dep kicad
Reading package lists… Done
E: You must put some ‘source’ URIs in your sources.list
david@david-Precision-7510:~/kicad$ sudo add-apt-repository ppa:js-reynaud/ppa-kicad
This ppa provide a nightly build for KiCad git repo (lp:kicad).
More info: https://launchpad.net/~js-reynaud/+archive/ubuntu/ppa-kicad
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu bionic InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://ppa.launchpad.net/js-reynaud/ppa-kicad/ubuntu bionic InRelease [15.4 kB]
Hit:6 https://packages.microsoft.com/repos/vscode stable InRelease
Get:7 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [9,372 B]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [7,788 B]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [17.2 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [35.7 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16.4 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [97.4 kB]
Get:14 http://ppa.launchpad.net/js-reynaud/ppa-kicad/ubuntu bionic/main amd64 Packages [7,628 B]
Get:15 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:16 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [278 kB]
Get:17 http://ppa.launchpad.net/js-reynaud/ppa-kicad/ubuntu bionic/main i386 Packages [7,620 B]
Get:18 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [66.7 kB]
Get:19 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [123 kB]
Get:20 http://ppa.launchpad.net/js-reynaud/ppa-kicad/ubuntu bionic/main Translation-en [2,292 B]
Get:21 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [222 kB]
Get:22 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [187 kB]
Get:23 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [387 kB]
Get:24 http://gb.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:25 http://gb.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7,352 B]
Fetched 1,746 kB in 2s (1,079 kB/s)
Reading package lists… Done
david@david-Precision-7510:~/kicad$ sudo apt-get update
Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu bionic InRelease
Hit:4 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:6 http://ppa.launchpad.net/js-reynaud/ppa-kicad/ubuntu bionic InRelease
Hit:7 https://packages.microsoft.com/repos/vscode stable InRelease
Reading package lists… Done
david@david-Precision-7510:~/kicad$ sudo apt-get build-dep kicad
Reading package lists… Done
E: You must put some ‘source’ URIs in your sources.list
david@david-Precision-7510:~/kicad$ sudo apt-get build-dep kicad
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
gconf-service gconf-service-backend gconf2-common libgconf-2-4
libllvm6.0:i386 python-wxgtk3.0 python-wxversion x11proto-dri2-dev
x11proto-gl-dev
Use ‘sudo apt autoremove’ to remove them.
The following NEW packages will be installed
asciidoc asciidoc-base asciidoc-common dblatex dh-python doxygen
fonts-gfs-baskerville fonts-gfs-porson fonts-lmodern ibverbs-providers
libboost-all-dev libboost-atomic-dev libboost-atomic1.65-dev
libboost-atomic1.65.1 libboost-chrono-dev libboost-chrono1.65-dev
libboost-chrono1.65.1 libboost-container-dev libboost-container1.65-dev
libboost-container1.65.1 libboost-context-dev libboost-context1.65-dev
libboost-context1.65.1 libboost-coroutine-dev libboost-coroutine1.65-dev
libboost-coroutine1.65.1 libboost-date-time-dev libboost-date-time1.65-dev
libboost-dev libboost-exception-dev libboost-exception1.65-dev
libboost-fiber-dev libboost-fiber1.65-dev libboost-fiber1.65.1
libboost-filesystem-dev libboost-filesystem1.65-dev libboost-graph-dev
libboost-graph-parallel-dev libboost-graph-parallel1.65-dev
libboost-graph-parallel1.65.1 libboost-graph1.65-dev libboost-graph1.65.1
libboost-iostreams-dev libboost-iostreams1.65-dev libboost-locale-dev
libboost-locale1.65-dev libboost-log-dev libboost-log1.65-dev
libboost-log1.65.1 libboost-math-dev libboost-math1.65-dev
libboost-math1.65.1 libboost-mpi-dev libboost-mpi-python-dev
libboost-mpi-python1.65-dev libboost-mpi-python1.65.1 libboost-mpi1.65-dev
libboost-mpi1.65.1 libboost-numpy-dev libboost-numpy1.65-dev
libboost-numpy1.65.1 libboost-program-options-dev
libboost-program-options1.65-dev libboost-program-options1.65.1
libboost-python-dev libboost-python1.65-dev libboost-python1.65.1
libboost-random-dev libboost-random1.65-dev libboost-random1.65.1
libboost-regex-dev libboost-regex1.65-dev libboost-serialization-dev
libboost-serialization1.65-dev libboost-serialization1.65.1
libboost-signals-dev libboost-signals1.65-dev libboost-signals1.65.1
libboost-stacktrace-dev libboost-stacktrace1.65-dev
libboost-stacktrace1.65.1 libboost-system-dev libboost-system1.65-dev
libboost-test-dev libboost-test1.65-dev libboost-test1.65.1
libboost-thread-dev libboost-thread1.65-dev libboost-timer-dev
libboost-timer1.65-dev libboost-timer1.65.1 libboost-tools-dev
libboost-type-erasure-dev libboost-type-erasure1.65-dev
libboost-type-erasure1.65.1 libboost-wave-dev libboost-wave1.65-dev
libboost-wave1.65.1 libboost1.65-dev libboost1.65-tools-dev libbz2-dev
libcurl4-openssl-dev libfabric1 libfreeimage-dev libgl2ps-dev libglew-dev
libglm-dev libhwloc-dev libhwloc-plugins libhwloc5 libibverbs-dev
libibverbs1 libmime-charset-perl libngspice-kicad libnl-route-3-200
libnuma-dev liboce-foundation-dev liboce-modeling-dev liboce-ocaf-dev
liboce-ocaf-lite-dev liboce-visualization-dev libopenmpi-dev libopenmpi2
libosp5 libpotrace0 libpsm-infinipath1 libptexenc1 libpython-dev
libpython2.7-dev libpython3-dev libpython3.6-dev librdmacm1 libsgmls-perl
libsombok3 libsource-highlight-common libsource-highlight4v5 libssl-dev
libsynctex1 libtexlua52 libtexluajit2 libunicode-linebreak-perl
libwxbase3.0-dev libwxgtk3.0-gtk3-dev libxmu-dev libxmu-headers libxt-dev
libzzip-0-13 mpi-default-bin mpi-default-dev ocl-icd-libopencl1 openmpi-bin
openmpi-common opensp po4a preview-latex-style python-apt python-dev
python2.7-dev python3-dev python3.6-dev source-highlight swig3.0 tex-common
texlive texlive-base texlive-bibtex-extra texlive-binaries
texlive-extra-utils texlive-fonts-recommended texlive-lang-greek
texlive-latex-base texlive-latex-extra texlive-latex-recommended
texlive-pictures texlive-science wx-common wx3.0-headers
0 to upgrade, 177 to newly install, 0 to remove and 3 not to upgrade.
Need to get 335 MB of archives.
After this operation, 886 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 tex-common all 6.09 [33.0 kB]
Get:2 http://ppa.launchpad.net/js-reynaud/ppa-kicad/ubuntu bionic/main amd64 libngspice-kicad amd64 0.1-2~201810171224+2e5be8d~ubuntu18.04.1 [1,909 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 asciidoc-common all 8.6.10-2 [199 kB]
Get:4 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 asciidoc-base all 8.6.10-2 [80.7 kB]
Get:5 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 asciidoc all 8.6.10-2 [3,264 B]
Get:6 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python-apt amd64 1.6.3ubuntu1 [149 kB]
Get:7 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libptexenc1 amd64 2017.20170613.44572-8ubuntu0.1 [34.5 kB]
Get:8 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsynctex1 amd64 2017.20170613.44572-8ubuntu0.1 [41.4 kB]
Get:9 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtexlua52 amd64 2017.20170613.44572-8ubuntu0.1 [91.2 kB]
Get:10 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtexluajit2 amd64 2017.20170613.44572-8ubuntu0.1 [230 kB]
Get:11 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libpotrace0 amd64 1.14-2 [17.4 kB]
Get:12 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libzzip-0-13 amd64 0.13.62-3.1ubuntu0.18.04.1 [26.0 kB]
Get:13 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 texlive-binaries amd64 2017.20170613.44572-8ubuntu0.1 [8,179 kB]
Get:14 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 texlive-base all 2017.20180305-1 [18.7 MB]
Get:15 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-fonts-recommended all 2017.20180305-1 [5,262 kB]
Get:16 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 fonts-lmodern all 2.004.5-3 [4,551 kB]
Get:17 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 texlive-latex-base all 2017.20180305-1 [951 kB]
Get:18 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 texlive-latex-recommended all 2017.20180305-1 [14.9 MB]
Get:19 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 texlive all 2017.20180305-1 [14.4 kB]
Get:20 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-bibtex-extra all 2017.20180305-2 [56.0 MB]
Get:21 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libsombok3 amd64 2.4.0-1 [27.2 kB]
Get:22 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libmime-charset-perl all 1.012.2-1 [30.9 kB]
Get:23 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libunicode-linebreak-perl amd64 0.0.20160702-1build2 [96.6 kB]
Get:24 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-extra-utils all 2017.20180305-2 [20.9 MB]
Get:25 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 preview-latex-style all 11.91-1ubuntu1 [185 kB]
Get:26 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-pictures all 2017.20180305-1 [4,026 kB]
Get:27 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-latex-extra all 2017.20180305-2 [10.6 MB]
Get:28 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-baskerville all 1.1-5 [43.4 kB]
Get:29 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-porson all 1.1-6 [33.7 kB]
Get:30 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-lang-greek all 2017.20180305-1 [76.3 MB]
Get:31 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-science all 2017.20180305-2 [3,077 kB]
Get:32 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 dblatex all 0.3.10-2 [346 kB]
Get:33 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 dh-python all 3.20180325ubuntu2 [89.2 kB]
Get:34 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 doxygen amd64 1.8.13-10 [3,880 kB]
Get:35 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libnl-route-3-200 amd64 3.2.29-0ubuntu3 [146 kB]
Get:36 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libibverbs1 amd64 17.1-1ubuntu0.1 [44.5 kB]
Get:37 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ibverbs-providers amd64 17.1-1ubuntu0.1 [160 kB]
Get:38 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [7,218 kB]
Get:39 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-dev amd64 1.65.1.0ubuntu1 [3,128 B]
Get:40 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost1.65-tools-dev amd64 1.65.1+dfsg-0ubuntu5 [1,222 kB]
Get:41 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-tools-dev amd64 1.65.1.0ubuntu1 [3,096 B]
Get:42 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-atomic1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [7,268 B]
Get:43 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-atomic1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [5,160 B]
Get:44 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-atomic-dev amd64 1.65.1.0ubuntu1 [3,224 B]
Get:45 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-chrono1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [10.2 kB]
Get:46 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-chrono1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [9,804 B]
Get:47 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-chrono-dev amd64 1.65.1.0ubuntu1 [3,544 B]
Get:48 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-container1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [43.4 kB]
Get:49 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-container1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [41.7 kB]
Get:50 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-container-dev amd64 1.65.1.0ubuntu1 [3,400 B]
Get:51 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-context1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [8,336 B]
Get:52 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-context1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [6,364 B]
Get:53 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-context-dev amd64 1.65.1.0ubuntu1 [3,120 B]
Get:54 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-coroutine1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [22.6 kB]
Get:55 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-coroutine1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [24.2 kB]
Get:56 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-coroutine-dev amd64 1.65.1.0ubuntu1 [3,196 B]
Get:57 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-serialization1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [99.3 kB]
Get:58 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-serialization1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [137 kB]
Get:59 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-date-time1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [26.7 kB]
Get:60 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-date-time-dev amd64 1.65.1.0ubuntu1 [2,924 B]
Get:61 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-exception1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [4,580 B]
Get:62 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-exception-dev amd64 1.65.1.0ubuntu1 [2,916 B]
Get:63 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-fiber1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [108 kB]
Get:64 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-fiber1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [121 kB]
Get:65 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-fiber-dev amd64 1.65.1.0ubuntu1 [3,348 B]
Get:66 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-system1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [11.8 kB]
Get:67 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-filesystem1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [52.1 kB]
Get:68 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-filesystem-dev amd64 1.65.1.0ubuntu1 [2,960 B]
Get:69 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-graph1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [93.4 kB]
Get:70 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-test1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [240 kB]
Get:71 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-test1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [289 kB]
Get:72 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-graph1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [102 kB]
Get:73 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-graph-dev amd64 1.65.1.0ubuntu1 [3,024 B]
Get:74 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libpsm-infinipath1 amd64 3.3+20.604758e7-5 [174 kB]
Get:75 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 librdmacm1 amd64 17.1-1ubuntu0.1 [56.0 kB]
Get:76 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libfabric1 amd64 1.5.3-1 [302 kB]
Get:77 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libhwloc5 amd64 1.11.9-1 [105 kB]
Get:78 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 ocl-icd-libopencl1 amd64 2.2.11-1ubuntu1 [30.3 kB]
Get:79 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libhwloc-plugins amd64 1.11.9-1 [12.5 kB]
Get:80 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libopenmpi2 amd64 2.1.1-8 [2,056 kB]
Get:81 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-mpi1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [47.0 kB]
Get:82 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-graph-parallel1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [62.3 kB]
Get:83 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-graph-parallel1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [64.5 kB]
Get:84 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-graph-parallel-dev amd64 1.65.1.0ubuntu1 [3,056 B]
Get:85 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-regex1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [312 kB]
Get:86 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-iostreams1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [37.0 kB]
Get:87 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-iostreams-dev amd64 1.65.1.0ubuntu1 [2,916 B]
Get:88 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-locale1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [329 kB]
Get:89 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-locale-dev amd64 1.65.1.0ubuntu1 [3,248 B]
Get:90 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-log1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [384 kB]
Get:91 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-thread1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [49.0 kB]
Get:92 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-log1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [553 kB]
Get:93 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-log-dev amd64 1.65.1.0ubuntu1 [3,124 B]
Get:94 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-math1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [311 kB]
Get:95 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-math1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [560 kB]
Get:96 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-math-dev amd64 1.65.1.0ubuntu1 [3,112 B]
Get:97 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 openmpi-common all 2.1.1-8 [140 kB]
Get:98 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libibverbs-dev amd64 17.1-1ubuntu0.1 [103 kB]
Get:99 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libnuma-dev amd64 2.0.11-2.1 [32.2 kB]
Get:100 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libhwloc-dev amd64 1.11.9-1 [167 kB]
Get:101 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libopenmpi-dev amd64 2.1.1-8 [925 kB]
Get:102 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 mpi-default-dev amd64 1.10 [3,888 B]
Get:103 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-mpi1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [137 kB]
Get:104 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-mpi-dev amd64 1.65.1.0ubuntu1 [3,004 B]
Get:105 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-python1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [101 kB]
Get:106 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 openmpi-bin amd64 2.1.1-8 [88.2 kB]
Get:107 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 mpi-default-bin amd64 1.10 [3,108 B]
Get:108 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-mpi-python1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [214 kB]
Get:109 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-mpi-python1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [24.7 kB]
Get:110 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-mpi-python-dev amd64 1.65.1.0ubuntu1 [3,040 B]
Get:111 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-numpy1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [17.4 kB]
Get:112 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-numpy1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [17.4 kB]
Get:113 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-numpy-dev amd64 1.65.1.0ubuntu1 [2,960 B]
Get:114 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-program-options1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [137 kB]
Get:115 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-program-options1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [163 kB]
Get:116 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-program-options-dev amd64 1.65.1.0ubuntu1 [2,940 B]
Get:117 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7-dev amd64 2.7.15~rc1-1ubuntu0.1 [28.3 MB]
Get:118 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libpython-dev amd64 2.7.15~rc1-1 [7,684 B]
Get:119 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python2.7-dev amd64 2.7.15~rc1-1ubuntu0.1 [286 kB]
Get:120 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 python-dev amd64 2.7.15~rc1-1 [1,256 B]
Get:121 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.7-1~18.04 [44.8 MB]
Get:122 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3-dev amd64 3.6.7-1~18.04 [7,328 B]
Get:123 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-dev amd64 3.6.7-1~18.04 [508 kB]
Get:124 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-dev amd64 3.6.7-1~18.04 [1,288 B]
Get:125 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-python1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [103 kB]
Get:126 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-python-dev amd64 1.65.1.0ubuntu1 [3,216 B]
Get:127 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-random1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [12.8 kB]
Get:128 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-random1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [12.4 kB]
Get:129 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-random-dev amd64 1.65.1.0ubuntu1 [2,924 B]
Get:130 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-regex-dev amd64 1.65.1.0ubuntu1 [3,184 B]
Get:131 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-serialization-dev amd64 1.65.1.0ubuntu1 [3,144 B]
Get:132 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-signals1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [30.6 kB]
Get:133 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-signals1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [33.1 kB]
Get:134 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-signals-dev amd64 1.65.1.0ubuntu1 [2,996 B]
Get:135 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-stacktrace1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [49.1 kB]
Get:136 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-stacktrace1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [25.9 kB]
Get:137 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-stacktrace-dev amd64 1.65.1.0ubuntu1 [2,924 B]
Get:138 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-system-dev amd64 1.65.1.0ubuntu1 [3,060 B]
Get:139 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-test-dev amd64 1.65.1.0ubuntu1 [2,960 B]
Get:140 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libboost-thread-dev amd64 1.65.1.0ubuntu1 [2,948 B]
Get:141 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-timer1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [11.9 kB]
Get:142 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-timer1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [11.8 kB]
Get:143 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-timer-dev amd64 1.65.1.0ubuntu1 [3,044 B]
Get:144 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-type-erasure1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [20.7 kB]
Get:145 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-type-erasure1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [20.1 kB]
Get:146 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-type-erasure-dev amd64 1.65.1.0ubuntu1 [3,024 B]
Get:147 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-wave1.65.1 amd64 1.65.1+dfsg-0ubuntu5 [178 kB]
Get:148 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-wave1.65-dev amd64 1.65.1+dfsg-0ubuntu5 [234 kB]
Get:149 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-wave-dev amd64 1.65.1.0ubuntu1 [2,952 B]
Get:150 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libboost-all-dev amd64 1.65.1.0ubuntu1 [2,340 B]
Get:151 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libbz2-dev amd64 1.0.6-8.1 [29.5 kB]
Get:152 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4-openssl-dev amd64 7.58.0-2ubuntu3.6 [295 kB]
Get:153 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libgl2ps-dev amd64 1.4.0+dfsg1-1 [240 kB]
Get:154 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libglew-dev amd64 2.0.0-5 [120 kB]
Get:155 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libosp5 amd64 1.5.2-13ubuntu2 [584 kB]
Get:156 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libsgmls-perl all 1.03ii-36 [23.1 kB]
Get:157 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libsource-highlight-common all 3.1.8-1.2 [51.0 kB]
Get:158 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libsource-highlight4v5 amd64 3.1.8-1.2 [230 kB]
Get:159 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl-dev amd64 1.1.0g-2ubuntu4.3 [1,374 kB]
Get:160 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 wx3.0-headers all 3.0.4+dfsg-3 [1,021 kB]
Get:161 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libwxbase3.0-dev amd64 3.0.4+dfsg-3 [29.5 kB]
Get:162 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 wx-common amd64 3.0.4+dfsg-3 [67.5 kB]
Get:163 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libwxgtk3.0-gtk3-dev amd64 3.0.4+dfsg-3 [29.6 kB]
Get:164 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libxt-dev amd64 1:1.1.5-1 [395 kB]
Get:165 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libxmu-headers all 2:1.1.2-2 [54.3 kB]
Get:166 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libxmu-dev amd64 2:1.1.2-2 [49.0 kB]
Get:167 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 opensp amd64 1.5.2-13ubuntu2 [143 kB]
Get:168 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 po4a all 0.52-1 [1,445 kB]
Get:169 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 source-highlight amd64 3.1.8-1.2 [279 kB]
Get:170 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 swig3.0 amd64 3.0.12-1 [1,094 kB]
Get:171 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libfreeimage-dev amd64 3.17.0+ds1-5build2 [18.6 kB]
Get:172 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 libglm-dev all 0.9.9~a2-2 [163 kB]
Get:173 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 liboce-foundation-dev amd64 0.18.2-2build1 [774 kB]
Get:174 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 liboce-modeling-dev amd64 0.18.2-2build1 [1,771 kB]
Get:175 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 liboce-ocaf-lite-dev amd64 0.18.2-2build1 [252 kB]
Get:176 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 liboce-visualization-dev amd64 0.18.2-2build1 [546 kB]
Get:177 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 liboce-ocaf-dev amd64 0.18.2-2build1 [102 kB]

And on and on.

iI cant post any more. I will try to compile again later.

Thanks.

David.

See also

Use apt build-dep to install dependencies for the KiCad version which apt finds from some repository. Try to find the closest matching ppa repository by js-reynaud for the KiCad version you want to compile. That way all the relevant dependencies for the wanted version are installed.

The first error you get is because your cmake command is wrong.
Once you run cd build/release it is important to pass the root of the source directory to cmake:
you ran: cmake -DCMAKE_BUILD_TYPE=Release
you should run: cmake -DCMAKE_BUILD_TYPE=Release ../../

(the documentation admittedly makes this a bit unclear by introducing a line break with the \ character

By the way, I saw in the logs you running cd ..., the correct command to go up a directory is cd .. (two dots)

It looks like you were able to succeed at getting apt to install the build deps after installing the ppa.

For long listings I suggest you use text snippet sharing site like https://pastebin.com/

If you choose to post directly encompass it with triple backticks like this

```
your text here

```

Edit: I meant this as response to OP.

Thanks.
I’m using this as my source.

sudo add-apt-repository ppa:js-reynaud/ppa-kicad
sudo apt-get update

I used the above source code repository for the sudo apt-get build-dep kicad command

Is it the best way of keeping the source bang up to date? I’m relying on Ubuntu software update.

Initially I downloaded all of my source code into a single directory (kicad) from launchpad using git. So I have used 2 different sources. Not sure if that is the best way. This directory is where the cmake list is. If I run the build command from this directory will everything be put into the correct directories. Does the build script expect and make use of the build/release directory that I have made or does it create its own. If I run
-DCMAKE_BUILD_TYPE=Release ../../
from build/release now will that be OK or do I have to clean anything up (delete any files) created from my previous attempt?

Thanks.

Because you want to compile 5.1.x use this instead: https://launchpad.net/~js-reynaud/+archive/ubuntu/kicad-5.1. (It may have the same effect now, but sometimes the dependencies may change in the main development branch compared to older stable releases.)

Hi,
So if I use this repository can I avoid using git to download the source code from the master repository on launchpad? Where does the ppa normally place the source code on my machine or do I have to specifically download it myself. All I did yesterday was click a box on Ubuntu’s repository app (it was next to the main repository link)? Thanks.

Try some Debian or Ubuntu instructions, like this: https://raphaelhertzog.com/2010/12/15/howto-to-rebuild-debian-packages/

Also https://wiki.debian.org/BuildingTutorial

David,

If you do manage to succeed I hope that you will summarize everything that you had to do into a script that will compile kicad on a virgin Ubuntu 18.04 install.

John Eaton

You should probably clean up the previous build attempt but I don’t think it would cause problems.
The CMake build is designed to be run out-of-tree (i.e. from a build directory). Creating build/release and/or build/debug is optional, but it’s not a good idea to just run cmake in the root of the source tree as it will make it very hard to work with Git.

The script does not create any build directory for you, which is why the build instructions include a step for you to run mkdir build/release and change to that directory before running cmake

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.