sdaau
sdaau

Reputation: 38651

Kicad build from source, running out of tree - buttons greyed out?

I have built KiCad 4.0.5 from source (git), on Ubuntu 14.04.5 (Linux kernel 4.4.0-53-generic), using the usual procedure:

kicad_git_src$ mkdir build
kicad_git_src$ cd build
build$ cmake ../
build$ bzr whoami "Your Name <[email protected]>"
build$ make

All passes here, kicad compiles. Then I install it "out of tree", meaning outside of the standard system locations (i.e. /usr/):

build$ make install DESTDIR=/path/to/kicad_32b_4.0.5

At this point, the tree of DESTDIR looks approx like this:

/path/to/kicad_32b_4.0.5/
└── usr
    └── local
        ├── bin
        │   ├── bitmap2component
        │   ├── _cvpcb.kiface
        │   ├── dxf2idf
        │   ├── eeschema
        │   ├── _eeschema.kiface
        │   ├── gerbview
        │   ├── _gerbview.kiface
        │   ├── idf2vrml
        │   ├── idfcyl
        │   ├── idfrect
        │   ├── kicad
        │   ├── pcb_calculator
        │   ├── _pcb_calculator.kiface
        │   ├── pcbnew
        │   ├── _pcbnew.kiface
        │   ├── pl_editor
        │   └── _pl_editor.kiface
        ├── lib
        │   └── kicad
        │       └── plugins ...
        └── share
            ├── applications
            ├── doc
            │   └── kicad
            │       └── scripts
            │           └── bom-in-python ...
            ├── icons
            │   └── hicolor
            │       ...
            ├── kicad
            │   ├── demos
            │   │   ...
            │   └── template
            ├── mime
            │   └── packages
            └── mimelnk
                └── application

All of the executables seem to be in usr/local/bin; then usr/local/lib seems it doesn't contain any .so libraries (only some plugins), and there are some files in the usr/local/share. So I've made this script:

#!/usr/bin/env bash

# trying to run kicad...

# the target DESTDIR of make install DESTDIR=...:
INSTD=/path/to/kicad_32b_4.0.5

cd $INSTD/usr/local/bin/
# there's only kicad/plugins in usr/local/lib, but still:
LD_LIBRARY_PATH=$INSTD/usr/local/lib:$LD_LIBRARY_PATH ./kicad

This runs, but I get something like this:

kicad-4.0.5

... that is, the EESchema button, the schematic library button, the pcbnew button, are all greyed out! In older versions of Kicad, I believe I could have ran any of these at any time, and have an "empty" file opened in them, and just work on that - if I do not have a project defined beforehand... Note that other other buttons, which are not greyed out (such as GerbView) work fine - I can just click them and the corresponding application runs.

So my questions are:

Upvotes: 1

Views: 442

Answers (1)

sdaau
sdaau

Reputation: 38651

OK, got somewhere: as noted in the comment, one has to open/create a new project, before the eeschema etc. buttons are un-greyed out, and start working.

However, after doing this and clicking the eeschema button, I got "The folowing libraries were not found: power, devices, ..." (as in this post [KiCad.info Forums]).

Turns out, there is another repo for the schematic and 3d symbols; after reading through kicad_git_src/scripts/kicad-install.sh and kicad_git_src/scripts/library-repos-install.sh, I ended up doing this:

git clone https://github.com/KiCad/kicad-library kicad-library_git
cd kicad-library_git
mkdir build
cd build
cmake ../
make # exits and doesn't do anything...
make install DESTDIR=/path/to/kicad_32b_4.0.5

This will copy all the library files to DESTDIR/usr/local/share/kicad, so:

# before state:
$ ls /path/to/kicad_32b_4.0.5/usr/local/share/kicad/
demos  template

# after state
$ ls /path/to/kicad_32b_4.0.5/usr/local/share/kicad/
demos  library  modules  template

And now, when I run the OP run script, my last project is opened automatically, I can click the eeschema button, and eeschema now starts without complaining about libraries...

Note that in this version, it seems that footprint symbols are also in separate .pretty repositories, but I haven't got to that point yet...

Upvotes: 2

Related Questions