Tips for running KiCad on Mac OS X?

Does anyone have any good tips for getting things running on a Mac using OS X 10.9? I tried earlier in the year and went several routes including compiling from source and trying a few pre-compiled but not really up to date versions. There was lots of information scatted about but some was dated and some just didn’t work. I eventually gave up and got it at least running on a VM running Linux but that experience wasn’t very fun either and the performance was dubious at best.

I’d love to hear from anyone who has an up-to-date version running on 10.9 and how they got there.

-grantbob

I haven’t used it much because I’ve just got it working but here is what I did.

First, I followed the instructions here: http://discuss.wayneandlayne.com/t/experimental-mac-build-from-march-3-2014/17

When you create your first project you will get errors about kicad.pro template can’t be found. So I then set up my library files. Go to https://github.com/KiCad/kicad-library and checkout the repository in ~/Library/Application Support/kicad

$ cd ~/Library/Application\ Support/
$ git clone https://github.com/KiCad/kicad-library.git kicad
$ cd kicad && touch template/kicad.pro

I haven’t gone too far past this point other than setting up my grid so I would stop getting the grid error every time I opened eeschema. There are still some weird things going on. I think you will probably have to load the libraries by hand.

Hope this helps!

I will attempt again to make a working build on OSX 10.9 and report back here later this week. I built KiCAD from source at the beginning of CE 1A but I switched to running KiCAD inside a virtual machine for convenience (and because I didn’t want to track down the library errors). Also I’m interested in the total build time it takes others (for instance, compiling linear algebra libraries for other OSS programs can consume a couple of hours).

  • Update Aug 2: no dice with the KiCAD OSX build script. I think that I may need to patch wxPython 3.0.0.0. I’ll post detailed issues or remedies next week, after looking into my errors, comparing dependencies, and seeing what is out there for OSX nightly build.

@BobGrant , https://bugs.launchpad.net/kicad/+bug/1333378 does Kirill notes help you?

Hi,

Last week I spent couple of days while trying to build KiCad on my Mac OS 10.9 (Maverics).
Finally I did it (after upgrading some MacOS-related compiler flags), and now I can normally
build KiCad either as dynamic or statically-linked application.

Please, review the patch with my changes.

Regards,
Kirill

https://bugs.launchpad.net/kicad/+bug/1333378/+attachment/4137642/+files/cmake_scripts.patch

Wish you well, tell what you try to do and what works for you including links.
I see that you received other replies as well. Those might work out better for your needs.

Wb7odyFred

I’ve managed to build on OSX a couple of times, but I’ve found in Eeschema moving around the schematic, drawing are unusably slow. I’ve resorted to using a virtual machine to run Kicad under Linux.

Has anyone else using Kicad on OSX got it to run smoothly?

I run Windows kicad in a Parallels Desktop for Mac. I started with the Mac version of kicad and found it was unstable (at least for me). I also feel the Windows version has much more support, thus stable code. This has worked great for me. I realize Parallels (as well as needing a copy of Windows - I had a version I could use so it was only an issue of buying Parallels). I had another reason to run Parallels - which was my 2008 version of QuickBooks…which works great (I like to stay on this format/version because of the ease it is to get files to my accountant).

I have successfully used this version for a medium-complex design:

http://www.mdx4.org/index.php?archives/52-English.html&serendipity[lang_selected]=en

It has some annoyances, like sometimes the buttons in the UI disappear and you have to hover them for bringing them back, and when using dual monitors with Eeschema in one and Pcbnew in other, moving something in Eeschema leaves glitches and you have to reload, but otherwise it’s quite stable.

I had talked to Margaret about using Parallels, but ended up using VMware Fusion with Ubuntu and it seems to work great.

I also have a pre-built version from Adam Wolf (of Wayne and Layne) but that is not out yet officially (think it’s getting added to the kicad.org site soon). It just works ok right now. Whenever I launch the python scripting engine it crashes. I also have been using projects that are not optimized for the newest builds (not using the newest libraries), so that causes other issues.

I am using the version from http://mdx4.org. I had to make some corrections (putting a default project file in the appropriate folder and such) but since the it works fine for me.

Bevor I used a virtual Ubuntu on VirtualBox. I prefer my OSX version though, because working with two displays is a major improvement.

There is a fix committed on version 5130 to fix the slow OpenGL canvas on Mac. Appreciate if you guys could take a look and see if it improves the usage on Mac. It was tested on OS X 10.9 on a MacBook Pro Mid 2010.

I have made a recent build (5249) that seems to work fine on Mac OS 10.9 and 10.10.

I have posted compilation instructions on my blog, and also published the binary (.app).

Hope this helps!

Thanks for posting the Mac binary! I was able to successfully open my project, view my schematic, and print the schematic (which is a first, because I’ve never managed to get this to work with my 5054 Linux build).

For me, Pcbnew crashes on launch, though. Details on two errors below. Appears to be related to libraries that can’t be found, I think because the path seems to be looking in /Users/thomas. I’ll try following your compilation instructions tonight and see how that goes.

09:41:18: dlopen(/Applications/KiCad-r5247.app/Contents/PlugIns/_pcbnew.kiface, 10): Library not loaded: /usr/local/lib/libpixman-1.0.dylib
  Referenced from: /Applications/KiCad-r5247.app/Contents/Frameworks/libcairo.2.dylib
  Reason: image not found
09:41:18: IO_ERROR: Fatal Installation Bug
missing file:
'/Applications/KiCad-r5247.app/Contents/PlugIns/_pcbnew.kiface'

argv[0]:
'/Applications/KiCad-r5247.app/Contents/MacOS/kicad'
from /Users/thomas/work-perso/KiCad/kicad/common/kiway.cpp : KiFACE() : line 21

and

09:41:18: dlopen(/Applications/KiCad-r5247.app/Contents/PlugIns/_pcbnew.kiface, 10): Library not loaded: /usr/local/lib/libpixman-1.0.dylib
  Referenced from: /Applications/KiCad-r5247.app/Contents/Frameworks/libcairo.2.dylib

  Reason: image not found
09:41:18: IO_ERROR: Fatal Installation Bug

missing file:
'/Applications/KiCad-r5247.app/Contents/PlugIns/_pcbnew.kiface'

argv[0]:
'/Applications/KiCad-r5247.app/Contents/MacOS/kicad'
from /Users/thomas/work-perso/KiCad/kicad/common/kiway.cpp : KiFACE() : line 219

The /Users/thomas is just a reference to the source code. I do not think the binary depends on it.
However your crash clearly shows that it is missing the cairo library which I had installed via homebrew. So it seems you probably need to use homebrew to install them:

brew install cairo glew

Can you try this before you compile everything and let us know if it works for you?

That is annoying. I am not sure what would be the best way to package those inside the apps …

YES!

That worked. I had previously attempted to compile KiCad, and got stuck on the Cario dependency. This time, I was able to get past that by doing

brew update

and then trying again. Now its working. I’m on the latest Yosemite release, BTW. OS X 10.10 (14A389)

If others are reading this and wondering what’s up with all this brewing discussion, see: http://brew.sh/

Thanks again!

Another to add to the list is Oracle Virtual Vox. It is Open Source and also works very well - Windows or Ubuntu. The down side is that it does not integrate with the desk top like Parallels, but that suits me fine. I then jst use a shared folder to pass documents between the two file systems.

Just banged my head a lot on the walls to figure out how to get footprints to work …

You need to manually create the “library tables” (fp-lib-table) from one of the templates that are provided with the program:

cp ~/Library/Application\ Support/kicad/template/fp-lib-table.for-github ~/Library/Preferences/kicad/fp-lib-table

I have found this information here. This is incredibly complicated and hard to find. I am sure tons of people just abandon before they get there … I am very surprised to find problems like that … I thought KiCad was more mature than that. Is this an OS X problem only?

Good news at least is that the build I made supports Git so you do not need to download the footprints, you can just run that command and KiCad will automatically get all the footprints from GitHub. That is really cool.

Found a great resource for cv-pcb, it does explain the new “library table” mess very well: http://s100computers.com/Hardware%20Manuals/KiCad%20manuals/cvpcb.pdf

@sarfata

I think

cp ~/Library/Application\ Support/kicad/template/fp-lib-table.for-github ~/Library/Preferences/kicad/fp-lib-table

is wrong, at least it did not do anything for me. However copying the fp-lib-table like this got me further:

cp ~/Library/Application\ Support/kicad/template/fp-lib-table.for-github ~/Library/Preferences/fp-lib-table

After that I get a bunch of error message when I launch CvPcb, it complaints on every line of that file because the KIGITHUB variable/parameter is set. So I conclude that the file is there in the correct location (well I think it is the wrong location as no files should be stored there in Mac OS X, only directories, one per application).

But where do I set KIGITHUB? Bash login script, eh? Oh well, I’ll have a go.

I wonder if this will be enough though because of this bug:

Has anyone actually got the latest stable Mac OS X (2014-02-26 BZR 4721)) build to work?

So far the out-of-the-box KiCad experience on Mac OS X has been a major pain…

Ok, made some experiments:

I copied the ~/Library/Application\ Support/kicad/template/fp-lib-table.for-github to ~/Library/Preferences/fp-lib-tableas explained above.

I then went into the Terminal and set KIGITHUB with this:

export KIGITHUB=https://github.com/KiCad

I then started CvPcb from the same Terminal session/window (this is important) with:

/Applications/Kicad/cvpcb.app/Contents/MacOS/cvpcb

and behold, now when I load the netlist I get only a hand full of errors and more importantly I’m able to assign the components to the footprints!

Now I only need to figure out how to set that (those) variables in regular day to day use, I would prefer starting CvPcb in the proper way from within KiCad but then (I bet) the environment variables are not set. IIRC starting from this or that Mac OS X version setting them is was pain or next to impossible.

I can of course create a script to set the variables but still not a great solution.

BTW http://s100computers.com/Hardware%20Manuals/KiCad%20manuals/cvpcb.pdf does NOT explain the “library table” mess well, it leaves all these critical pieces of information out, like where in every OS the files are and the fact KIGITHUB and friends are environment variables and how to set them.

Really the KiCad out-of-the-box experience needs to be polished up a lot … loose a user to an other application they, like heavy weight champions, never come back, too much invested in learning the other software besides the money they shelled out.

I should have mentioned that it is (of course?!) necessary to set the environment variables for Pcbnew or the foot prints won’t be found … ie it maybe necessary to start Pcbnew from the command line too.