So, EAGLE PCB has been the mainstay of PCB layout in the DIY community for a long time. But it’s free version has a few limitations that make creating some normal sized DIY projects a bit too frustrating. And there really seem to be no other viable options out there… for Mac at least.
KiCad is an open source EDA that (apparently) works okay on a Mac. But there are no binaries currently available and getting your hands on the source tree is a chore because the devs picked Bazaar as their VCS and I can’t find a where they are hosting the stable release tree as a tarball… if they are at all.
Luckily, someone is managing a github mirror of the source tree. And it looks like it’s pretty up to date. Hopefully it doesn’t go the way of the Mac binaries someone was building for KiCad and it keeps going for a while.
The mirror is here: https://github.com/blairbonnett-mirrors/kicad
Now to compi- Oh wait- the source tree is 311M. Let’s wait a few minutes for it to finish pulling from GitHub.
NOW to compiling!
Well, actually, not really. We still need to install bzr because it’s used in the build processes :facepalm: So, run brew install bazaar and then add the following location to your PATH. Also, bzr needs to know who you are so you’ll have to tell it (because apparently it running whoami itself isn’t enough):
/usr/local/share/python/
bzr whoami "Your Name <your_email@whatabitchthisis.com>"That’ll let you use bzr to get the sources from the real repo too… so either way, you’re gonna end up using bzr.
On to compiling. Finally. There are a few, horribly written readme’s on how to compile the source on a Mac. Hopefully someday someone (me?) will just fix the damn build system so Mac users feel a bit more apt to try compiling the damn thing. Hell, shoving it into Homebrew as an available Formula would be a pretty handy addition too…
Here’s the jist of it. This assumes that you already have a decent C/C++ dev environment installed… XCode and it’s command line tools specifically. And, wxWidgets takes a decade and a half to install… so keep that in mind. Also, make goes out to sourceforge and downloads boost. I don’t know if it tries to use boost if you install it from homebrew but maybe it would if you had it installed before you use cmake:
brew install bazaar cmake wxWidgets doxygen ccache
cmake .
make
sudo make installEDIT:
Well, that still doesn’t do it. Homebrew’s bzr doesn’t install bzrtools which is needed to run bzr patch. Here’s how to get bzrtools:
wget -O /tmp/bzrtools.tar.gz http://launchpad.net/bzrtools/stable/2.5/+download/bzrtools-2.5.tar.gz
mkdir -p ~/.bazaar/plugins/
tar zxf /tmp/bzrtools.tar.gz -C ~/.bazaar/plugins/Then you need to re-run make and make install once you have bzrtools installed:
make
sudo make installBut, alas, Boost fails to compile. What a surprise… :sigh:
I guess I’ll continue this another day…
EDIT:
One more crack at this lead me to do a git pull this time to make sure I had the latest code. That caused me to have to install Cairo… So:
brew install CairoWhich also took forever… This all reminds me that someone replied to my comments on how KiCad was a pain in the ass to install by saying “Which of these dependencies are ninch?” and then listed the most basic, incomplete list of dependencies ever…
EDIT:
So, as I continue trying to build this damn binary, I’ve realized that the only true way to do this is to dig into the code myself.
This means, I have to get the code from Launchpad myself. Which means I need to make a Launchpad account. Which means I need to figure out how launchpad works, before I can use bzr to get the code… and before I can figure out how bzr works so I can get the source tree… before I can figure out how the build system is broken.
So here it goes. Again. Go make a Launch pad account. Then verify your email. Then go to: https://launchpad.net/ and log in to your account. Add your id_rsa.pub public key to your Launchpad account…. then copy your REAL account id (not the same as you probably think it is) and tell your systems bzr to use that account name:
bzr launchpad-login <userid>Wonderful. Now you can get the actual source tree:
bzr branch lp:kicadBut, we still run into problems when we try to build it. For some reason KiCad goes out and downloads boost on it’s own and then tries to compile it. Which fails because boost is a bitch to compile and is almost always broken in one way or another. I have NO idea why KiCad doesn’t just use the version of boost already installed on the system and since the IRC chat for KiCad gets no response to questions asking about Boost, my next step is to drop in to their build scripts and rip out boost. (EDIT: Actually, this isn’t true. Later on I got replies… And they gave me some very good reasons as to why Boost is compiled by KiCad instead of using the systems version.)
At this point: Fuck KiCad’s build system.
A Renewed Approach!
So, I’ve tried a hell of a lot to get this damn thing working… And I finally started reaching out to the actual dev community behind KiCad over on Launchpad (instead of just through IRC). You can find my post over here: https://answers.launchpad.net/kicad/+question/239499
Before I go further, I’ve been keeping my eye on this project over on GitHub: https://github.com/mangelajo/KicadOSXBuilder
It’s got most of what it needs… but it can’t compile quite right yet without modifications. Some of these issues are caused by a new version of Xcode/gcc. Another is related to how GLEW is not a Universal library… and only supports one arch at a time unless you download it yourself, modify it, and compile it yourself for both i386 and x86_64. Which I was able to do… by adding:
-arch x86_64 -arch i386 to the config/Makefile.darwin and config/Makefile.darwin-x86_64 files as additions to the options named:
CFLAGS.EXTRA = -arch x86_64 -arch i386
LDFLAGS.EXTRA = -arch x86_64 -arch i386 I also had to set the install path correctly in the main Makefile:
GLEW_DEST ?= /usr/localThen I was then able to run make install and try that GitHub KiCad builder again…
HOWEVER
Bleh. Hopefully, I’ll have a useable version of KiCad to start building my projects in… I’ve been desperate for a larger board layout tool… and this KiCad stuff is STILL holding me back from working on the next project.
Sooon…
Stay tuned for a working build!
