must first configure the library table to include all footprint libraries not included with KiCad [OS X]

Asked by Joe

I just finished a non-trivial build from source on OS X Mavericks
(see: http://www.sarfata.org/2014/11/Building-KiCad-from-source-on-Mac-OS-X/ )

BUT when I started up, I got the following dialog:

"You have run Pcbnew for the first time using the "
                "new footprint library table method for finding "
                "footprints. Pcbnew has either copied the default "
                "table or created an empty table in the kicad configuration "
                "folder. You must first configure the library "
                "table to include all footprint libraries not "
                "included with KiCad. See the \"Footprint Library "
                "Table\" section of the CvPcb or Pcbnew documentation for "
                "more information."

Then, following above advice referring to Pcbnew docs, I discovered the help docs are not here:

Message
Html or pdf help file
‘getting_started_in_kicad’
or
‘Getting_Started_in_KiCad’ could not be found

Likewise:

Message
Help file ‘pcbnew’ could not be found.

Basic question is: where should these be put, and what is the easiest/best way to get them there?

Having never read the docs, I found the dialog hard to comprehend and the pcb library table wizard unhelpful.

Question information

Language:
English Edit question
Status:
Expired
For:
KiCad Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Joe (j-b-shirk) said :
#1
Revision history for this message
Wayne Stambaugh (stambaughw) said :
#2

The documentation and libraries are not included in the kicad source. They are separate projects in and of themselves. The documentation repo is at https://code.launchpad.net/~kicad-developers/kicad/doc. The library repo can be found at https://github.com/KiCad/kicad-library. You should build and install both of these for a complete kicad installation. As of right now, you only have the application, python scripting, and demos installed.

Make sure you carefully read the Pcbnew documentation section "2.4 - Managing Footprint Libraries". This will give you critical information in setting up your footprint libraries.

Revision history for this message
Joe (j-b-shirk) said :
#3

I have the following directories:

/Applications/KiCad/
+--bin
+--build
+--kicad/
---+--Documentation/
---+--pcbnew/
...

and

~/Library/Application \Support/kicad/

Where should I build docs and where should I build footprints?

Revision history for this message
Wayne Stambaugh (stambaughw) said :
#4

I believe using the default CMake configuration and running `make install` will get you what you need. One of our OSX devs should be able to shed some light on this better than I can.

If you want to avoid the hassle of building everything from source, check out Adam Wolf's OSX nightly builds at: https://www.dropbox.com/s/9l3d3m8xbvlrq91/kicad-r5404.20150502-102027.dmg?dl=0. At some point Adam will push these to the download section on the kicad website.

Revision history for this message
Joe (j-b-shirk) said :
#5

The nightly build contains exactly what I already have.

The default cmake did not work. Attempts to correct it are documented above, and my final working version is here:
https://greenaxle.hackpad.com/KiCAD-AkOecqt1ShZ

However, none of these address documentation or footprints or even where KiCad looks for them.

When I go from Footprint Editor: Preferences > Library Tables

I see http://i.imgur.com/5wsi3Vq.png

a couple of things strike me as odd:

nickname footprints is based off the default footprints at
~/Library/Application \Support/kicad/modules/packages3d (which is populated)
but the path backs up two parents to kicad/footprints, which I think is erroneous because I found two modules I attempted to download from GitHub, but they are duplicates of ones already in ../modules/
namely, Air_Coils_SML_NEOSID.pretty
and Buttons_Switches_SMD.pretty

Also the environment path

KISYSMOD points to a path that looks bogus and does not actually exist.

We have a chicken and egg problem; there is no documentation on how to install the documentation, and presumably that documentation should explain how to build the footprints. Even following the tutorial in Getting_Started..., Ch.3 breaks down at step 5 (the add components icon is not in the toolbar) and 6 (the device library is not found).

There is a clue in PCBnew.pdf, 2.4, second figure shows only one environment variable (KISYSMOD = ~\share\modules\ ) but that is for Windows. Global libraries are already populated. This page is no help for installations on OS X. Without knowing what these environment variable paths are supposed to be, the GitHub plugin does not work either.

Revision history for this message
Joe (j-b-shirk) said :
#6

in PCBnew.pdf 2.4.4 - Adding Table Entries:

"Each library entry must have a valid path and/or file name depending on the type of library. Paths can be defined as absolute, relative, or by environment variable substitution (see section 4.5.3 below)."

There is no section 4.53.

It must refer to 2.4.5 - Environment Variable Substitution:

"Environment variable substitution is supported by using the syntax ${ENV_VAR_NAME} in the footprint library path. By default, at run time Pcbnew defines the $KISYSMOD environment variable. This points to where the default footprint libraries that were installed with KiCad are located. You can override $KISYSMOD by defining it yourself which allows you to substitute your own libraries in place of the default KiCad footprint libraries. "

How do you defining $KISYSMOD?

Revision history for this message
Joe (j-b-shirk) said :
#7

I found this related thread, which I quote:

https://lists.launchpad.net/kicad-developers/msg16285.html
"
As you may know, it's harder than it seems to set an environment variable
on a bundle in OS X as a user.

I have a patch here for the OS X bundle that sets KISYSMOD to
/Library/Application Support/kicad/modules
"

Because:
https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/20001431-106825
"
the environment set in the Info-plist is only valid when launching via an icon, but not via command-line:
These environment variables are set only for apps launched through Launch Services. If you run your executable directly from the command line, these environment variables are not set.
"

Why it matters:
"
I think something has to be done before the stable release so we're not swamped with support questions about this.
"
"
On OS X, setting the environment variables so that Kicad will actually recognize them requires a bit of plist-fu that the Average User won't be able to do. The ability to set the library paths from the GUI in a standard way, and have those paths be "sticky," makes for a much better user experience.
"
"
I remember the search path discussions and the issues where it was impossible to tell which footprint got picked. I don't want to bring that back. Right now, KISYS3DMOD has a default value defined in code if the environment variable isn't set. What about if there is a default value for all of the standard environment variables?
"

It would be great if the patch referenced in the thread solved this problem, but I don't know how to use it. This is my workaround, which is not elegant but I hope at least my three day standstill will come to an end and I can move forward with figuring out where KiCad Help expects the docs to be.
https://greenaxle.hackpad.com/KiCAD-AkOecqt1ShZ

------
I didn't find any [documented] way to alter environment variable KISYSMOD, which erroneously points to a non-existent path that has duplicated the /Applications/KiCad/bin/ path:

/Applications/KiCad/bin/Applications/KiCad/bin/kicad.app/Contents/SharedSupport/modules

(note: /modules/ wasn't created by the build)
as a result of the cmake process as defined, footprints are actually at:

~/Library/Application\ Support/kicad/modules

workaround:

let's create a dummy path matching the above in which to put the symlink to modules:

cd /Applications/KiCad/bin/
mkdir -p Applications/Applications/KiCad/bin/kicad.app/Contents/SharedSupport
cd $_
pwd
> /Applications/KiCad/bin/Applications/KiCad/bin/kicad.app/Contents/SharedSupport

create the symlink
Note: ~/Library/ not /Library/

cd ~
ln -s ~/Library/Application\ Support/kicad/modules/ /Applications/KiCad/bin/Applications/KiCad/bin/kicad.app/Contents/SharedSupport/modules

Revision history for this message
Launchpad Janitor (janitor) said :
#8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.