linux-debian.txt 8.07 KB
Newer Older
1 2 3 4 5
Compiling KiCad on Debian & Ubuntu
==================================

First written: 10-Mar-2009

6
Updated: 01-Oct-2009
7

8 9 10
Lasted edited by: Jerry Jacobs <jerkejacobs@gmail.com>


11
Ubuntu 9.04
12
-----------
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
Special thanks to David J S Briscoe <david@djsbriscoe.vispa.com>

The first thing I did was follow this page up to the running kicad section

http://basicubuntu.blogspot.com/2009/02/installing-kicad-on-ubuntu.html

This resulted in the error message detailed in this post

http://tech.groups.yahoo.com/group/kicad-devel/message/3180

SNIPPET

The build fails with the following message

----------------------------------------------------------:

david@ubuntu:~/Desktop/KICAD_SVN$ fakeroot debian/rules binary
test -d debian/patched || install -d debian/patched
dpatch apply-all
dpatch cat-all >>patch-stampT
mv -f patch-stampT patch-stamp
mkdir -p /home/david/Desktop/KICAD_SVN/build/kicad
mkdir -p /home/david/Desktop/KICAD_SVN/build/bitmaps
cd /home/david/Desktop/KICAD_SVN/build/kicad && cmake -DKICAD_MINIZIP=0 \

-DKICAD_DEMOS=/home/david/Desktop/KICAD_SVN/debian/kicad-common/usr/share/doc/ki\
cad/demos ../../kicad \
-DXPM_CPP_PATH=/home/david/Desktop/KICAD_SVN/build/bitmaps
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - 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
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.so
-- Check for installed OpenGL -- found
-- Check for installed Boost -- not found
CMake Error at CMakeModules/CheckFindPackageResult.cmake:6 (message):
Boost was not found - it is required to build Kicad
Call Stack (most recent call first):
CMakeLists.txt:111 (check_find_package_result)


-- Configuring incomplete, errors occurred!
make: *** [configure-stamp] Error 1
david@ubuntu:~/Desktop/KICAD_SVN$

-----------------------------------------------------------------:


SNIPPET

The next step was to remove any libboost 1.34 libraries using the apt-get
remove command (can't remember the exact commands I used) as the Ubuntu 9.04
(Jaunty) repositories only had the 1.34 version available.

After this I installed the boost 1.37 libraries
using this command

---------------------------------------
sudo apt-get install libboost1.37-dev
---------------------------------------

This pulled down all the required files and dependencies (as far as I
know-how do I check this?)

I then entered the following command

---------------------------------------
fakeroot debian/rules binary
---------------------------------------

and everything was built properly (I saw a few warnings flash past-will
these be logged anywhere?)

I was left with a bunch of debian packaged files. I installed the main one,
the common one and an English language documentation one (I can supply more
details if needed later as I am not using Ubuntu at the moment).

The first link above describes moving the libraries and other files into the
same place as the compiled executables. I didn't do this, so I have a
duplicate installation.
The above method needs some fine tuning and improvements. If you can let me
know of a tidier way of compiling Kicad please let me know.
Maybe there is a way of automating things with scripts, my Linux knowledge
doesn't go that far, yet.


Ubuntu (8.04)
-------------
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
Original from:
http://basicubuntu.blogspot.com/2009/02/installing-kicad-on-ubuntu.html

Required software and dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We need to install the following packages: debhelper, dpatch, libx11-dev,
libglu1-mesa-dev, libgl1-mesa-dev, mesa-common-dev, libwxbase2.8-dev,
libwxgtk2.8-dev, libboost-dev, subversion, cmake (>= 2.6.0).

---------------------------------------
sudo apt-get install debhelper dpatch libx11-dev libglu1-mesa-dev
libgl1-mesa-dev mesa-common-dev libwxbase2.8-dev libwxgtk2.8-dev
libboost-dev fakeroot subversion libboost-serialization-dev
---------------------------------------

And finally, we need cmake, but we need atleast version 2.6, the one
from the repository is not the updated one (atleast for ubuntu 8.04).
You can download version 2.6 from newer ubuntu releases.
Just search for cmake on http://packages.ubuntu.com then get a newer
cmake .deb file and install the downloaded package on the console
with:

---------------------------------------
sudo dpkg -i <packagename.deb>
---------------------------------------

But if what the repository gives you is atleast version 2.6, then
simply

---------------------------------------
sudo apt-get install cmake
---------------------------------------

Get KiCad Sourcecode
~~~~~~~~~~~~~~~~~~~~
We will be getting the source codes through subversion. Create a directory
where you'll be downloading the source codes, and go to that
directory. type the following:

---------------------------------------
svn checkout https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad kicad
svn checkout https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad-doc kicad-doc
svn checkout https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad-library kicad-library
---------------------------------------

Also we need the following to get the debian specific stuff

---------------------------------------
svn checkout http://svn.flexserv.de/kicad/trunk/debian
---------------------------------------

Compiling
~~~~~~~~~
To compile simply do the following on your terminal (make sure you're still in
the same directory where you did the svn)

---------------------------------------
fakeroot debian/rules binary
---------------------------------------
hopefully, there will be no errors.
You'll find the compiled version of KiCad in the following directory:

---------------------------------------
debian/kicad/usr/bin/
---------------------------------------
to complete things up, you'll need to copy the following folders

---------------------------------------
debian/kicad-common/usr/share/kicad/library
debian/kicad-common/usr/share/kicad/modules
debian/kicad-common/usr/share/kicad/template
---------------------------------------
in here

---------------------------------------
debian/kicad/usr/share
---------------------------------------
again, to run KiCad go to

---------------------------------------
cd debian/kicad/usr/bin/
---------------------------------------
and double click KiCad


Debian squeeze (testing)
------------------------
206

jerryjacobs's avatar
jerryjacobs committed
207 208 209 210
Special Note
~~~~~~~~~~~~
After SVN trunk revision 1753 boost library 1.36 or higher is needed
to compile KiCad.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227

Installing Packages
~~~~~~~~~~~~~~~~~~~
The following packages should be installed with
synaptic, apt-get or aptitude:
- build-essential
- cmake
- libboost-dev
- libwxgtk2.8-dev
- libglut3-dev

The following packages will also be installed then
- cmake dependencies
- boost development dependencies
- wxwidgets development dependencies
- opengl3 (glut) development dependencies

228
Get KiCad sourcecode
229 230 231
~~~~~~~~~~~~~~~~~~~~
Checkout sourcecode using subversion or download latest release.

232 233 234 235
.*Subversion*
---------------------------------------
svn checkout https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad kicad
---------------------------------------
236

237 238 239 240 241
.*Release*
---------------------------------------
wget http://iut-tice.ujf-grenoble.fr/cao/kicad-sources-2009-02-16.tar.gz
tar -xvf kicad-sources-2009-02-16.tar.gz
---------------------------------------
242 243 244 245 246 247 248 249 250

Compiling
~~~~~~~~~
Run 'cmake .' in the root of the source directory then build the
binaries with 'make'.

Installing
~~~~~~~~~~
For installing you could use 'make install' or build a debian package.