OS X homebrew KiCad tap! With library!

@Airic @morphogencc

Ok, big news! It turns out the crashes when using the push and shove/route around routing mode were entirely my fault and caused by how I was handling the boost dependency. I’ve fixed this issue with the tap, the router now works flawlessly!

Additionally, I believe I have fixed the issue that has been preventing compilation on OS X 10.7 and 10.8. I hope. Let me know!

Oh, since the formula updated, don’t forget to run brew update first. Then install kicad as normal, or for people who have already installed, you can run brew reinstall kicad --without-kicad-library to update to the latest revision and to build it such that there are no routing issues anymore.

Sadly, no love for the drop down menus quite yet :frowning:

I just updated and tried installing it again; the old error was resolved, but now there’s a new one (oh, the horrors of programming…)

==> /usr/bin/python setup.py build_ext WX_CONFIG=/private/tmp/kicad-vxSKt3/wx-bin/bin/wx-config UNICODE=1 WXPORT=osx_cocoa BUILD_BASE=/private/tmp/kicad-vxSKt3/wx/wx-build
creating /private/tmp/kicad-vxSKt3/wx/wx-build/temp.macosx-10.8-intel-2.7/src/osx_cocoa
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DSWIG_PYTHON_SILENT_MEMLEAK -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -Iinclude -Isrc -I/private/tmp/kicad-vxSKt3/wx-bin/lib/wx/include/osx_cocoa-unicode-3.0 -I/private/tmp/kicad-vxSKt3/wx-bin/include/wx-3.0 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/helpers.cpp -o /private/tmp/kicad-vxSKt3/wx/wx-build/temp.macosx-10.8-intel-2.7/src/helpers.o -O3

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command '/usr/bin/clang' failed with exit status 1

A quick google search suggested that this is a common issue with Xcode 5.1.* and python / ruby gems, and that modifying the ARCHFLAGS flag can fix it.

thanks for all of your hard work!

Seems like mine was not building correctly either :frowning:

33 warnings generated.
Linking CXX static library libidf3.a
[ 31%] Built target idf3
make: *** [all] Error 2

any ideas?

I added the needed ARCHFLAGs, please brew update and try again. And I apologize, I know its not fun waiting on a huge build just to get an error. I am pulling the patched wxpython out into it’s own formula, which should cut down on build times considerably.

@Airic: What version of OS X are you on again? Can you dump the verbose build output to a file and gist it or attach it or whatever you prefer?

brew install kicad --HEAD --without-library --verbose > buildlog.txt

No worries at all! I’m sure it isn’t fun to have a bunch of people complaining about your project not working either; I appreciate your hard work in making life easier for the rest of us :slight_smile:

That said, I just updated and tried it again but I get the same error :frowning:

@metacollin

I updated KiCAD and this time it compiled just fine - Thanks! Anyways - the routing crash is still there.
I compiled on this machine:

  • Macbook Pro 8,1 with a Intel Core i5
  • OS X Yosemite v10.10.1
  • Xcode Version 6.1.1 (6A2008a)

Thanks for your efforts!
Airic

unfortunately the routing error still exists. Also, when switching to OpenGL I loose all scroll bars and also the ability to right click, which makes this mode unusable. I built today (1. Feb) and I am on OS X 10.10. Anyone else having this problem?

Hmmm, this is odd, it builds fine and without scroll bar issues or the routing crashes on my system. I have none of those issues you’re having, Markus. There is something different between our Yosemite systems, but given I’m the only one not having issues, I suspect I’ve done something on my system that I’ve overlooked and forgotten to include in the formula, rather than something unusual causing breakage on your system

I’m installing 10.7 and 10.8 in a virtual machine to see what’s up, I’ll get to the bottom of this, sooh I hope.

Hmmmm. I do have all the dependencies built with the --universal flag set, and also Cairo --without-X11. And I pointedly do not have the homebrew version of Python installed, or have any $PYTHONPATH set. I’m not going to ask anyone to unset PYTHONPATH and reinstall all the dependencies with my flags… It probably won’t change anything but if anyone is desperate, who knows.

For now, if all the people experiencing experiencing compilation failures or issues besides non-working pull down menus (especially push and shove crashes) problems could post or send me via message the output of brew --config, it might help me resolve these issues sooner.

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 4ca85725a146312e7e38f23f3119d90f20c7810c
Last commit: 13 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.10.2-x86_64
Xcode: 6.1.1
CLT: 6.1.1.0.1.1416017670
Clang: 6.0 build 600
MacPorts/Fink: /opt/local/bin/port
X11: 2.7.7 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /opt/local/bin/perl => /opt/local/bin/perl5.16
Python: /usr/bin/python
Ruby: /usr/bin/ruby
Java: 1.7.0_11

don’t know how to send you a private message :frowning:

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 0e9a28fefb9237c190cdbb691b875ee340a7c8dd
Last commit: 2 days ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.8.5-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
LLVM-GCC: build 2336
Clang: 5.1 build 503
X11: 2.7.5 => /opt/X11
System Ruby: 1.8.7-p358
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.2.0/bin/ruby
Java: 1.6.0_65

just having installed the windows version, I see also the missing scroll bars when switching to OpenGL thus rendering the push and shove router unusable. I suspect this to be a kicad problem, not a install problem!

One more thing: where do I need to place the freeroute.jar file? The bin folder does not work…

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 46601a9f5be0c617e5c6cfee202c6cea5418ed5c
Last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.10.2-x86_64
Xcode: 6.1.1
CLT: 6.1.1.0.1.1416017670
Clang: 6.0 build 600
MacPorts/Fink: /opt/local/bin/port
X11: 2.7.7 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /opt/local/bin/perl => /opt/local/bin/perl5.12
Python: /usr/bin/python
Ruby: /usr/bin/ruby
Java: 1.6.0_65

Thanks a lot for your great work. You are really filling the gap for OS X users diving into KiCad!

I recently, about 3 months ago, successfully compiled myself the KiCad sources for OS X Yosemite (10.10.1). Not without much trouble. As I want to stay on the bleeding edge of the latest KiCad development versions, I am now trying your homebrew tap.

Is there anything you would like me to test? I’d love to lend you a hand on this.

All was working well with my build (listed in kicad as after 2015-jan-16 BZR unknown) until I tried routing today and I also ran into the ‘route around’ issue. You asked for others experiencing the problem to post info so here it is. Thanks for the great work by the way!
–Matthew

I tried to update by first running brew update and then I ran brew reinstall kicad --without-kicad-library and got the following errors:

make[2]: *** [../.downloads-by-cmake/boost_1_57_0/src/boost-stamp/boost-bzr_commit_boost] Error 3
make[1]: *** [CMakeFiles/boost.dir/all] Error 2
make: *** [all] Error 2

Here is my brew config:

Boo:~ sulley$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 3709ea829b910a9928e4a9b6791f85a1ac9856da
Last commit: 39 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.10.2-x86_64
Xcode: 6.1.1
CLT: 6.1.1.0.1.1416017670
Clang: 6.0 build 600
X11: 2.7.7 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby
Java: 1.6.0_65

Because I thought there is a newer build, I tried to rebuild and got an error
You must `brew link glib’ before kicad can be installed
I found out, that the user rights seemed to be the problem, I did a
sudo chown -R $USER /usr/local
afterwards, KiCad built fine, and I cannot duplicate the crash error anymore! You might want to try!

Still, can anybody tell me in which directory the freerouter.jar file needs to go to be recognised by Pcbnew???

Just wanted to tell everyone that I’m not dead. I’ve had a drought of spare time lately, so it’s taken quite some time to finish any update, as I’ve only been able to work on it in brief spurts over the past couple weeks+. The good news is everyone’s debug posts were extremely helpful and I believe I’ve located several problems that are causing all this seemingly different issues.

I’m hoping to post it any day now (I am shooting for today, but I am not too confident I will manage that, sorry. And thanks everyone for your patience.

On the plus, when I do finish it, it’s been completely reworked essentially from scratch. It also has cut out wx and wxpython into their own keg-only formula, meaning those will only need to be built the first time and will be reused after that. This makes kicad build in less than 1/3rd the time it currently takes, at least on my system. That should make things a bit less painful for everyone.

Markus: you can put freerouter.jar in the same folder as the Kicad.app (the actual .app, not the alias. Right click on the alias in your /Applications folder and select ‘Show Original’ and just drop freerouter.jar in the window that opens up).

Oh snap, while I was typing that, some problems I had been stuck on were fixed by my latest changes, and everything built successfully. :slight_smile: A release later today is looking a lot more likely! I still need to check to see if this resolved a problem on earlier versions of OS X, so gotta wait on a virtualized 10.7 build, but things are looking pretty promising.

Tried a to build but got an error during the install KiCad stage. I’m using 10.10.2. I have a previous version of KiCad installed (not using brew). I’ll update brew formulas and uninstall the previous version of KiCad. Below is the last part of the output from the build, in case it gives any pointers.

Cheers,
Paul

==> Installing kicad
==> Cloning https://code.launchpad.net/~kicad-product-committers/kicad/product
Not checking SSL certificate for code.launchpad.net.
==> Downloading https://gist.githubusercontent.com/metacollin/97b547034d144f483c0f/raw/8d7f4fc2b119b126bb76322e5c1461f61
######################################################################## 100.0%
==> Patching
patching file CMakeModules/download_boost.cmake
==> cmake …/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_INSTALL_PREFIX=/usr/local/
==> make -j6
==> make install
cvpcb/cmake_install.cmake:69 (fixup_bundle)
cmake_install.cmake:59 (include)

make: *** [install] Error 1
couldn’t understand kern.osversion `14.1.0’

OK, everyone, please run brew update to pull in the latest changes from the tap, then give it one more try. I’ve committed a ton of fixes and I am hoping I’ve finally got most, or hopefully all, of these issues sorted and it should finally begin working for the majority of users. Sorry for all the problems. For a while it seemed like fixing one issue would also cause 2 new ones, so it was a long and drawn out mess of commits.

I shouldn’t be nearly so busy now, so if there are remaining issues, I will try to fix them as quickly as possible.

Everyone, thanks for your patience!

Thanks for your efforts! I just compiled it but I still got the “route around crash”. It takes longer to make KiCAD crash but it still does. Everything else seems to work wonderfully and I certainly can live without the “route-around” feature! :slight_smile:

I have a compile log and a crash report - let me know if any of those would be of any value - I’d send them to you via post mail.

/Airic