New OS X Builder

Awesome, rebuilt everything and it’s working well!

The only big problem I’ve seen is a weird Eeschema canvas bug, in which the top left corner is being drawn different, as if it were a magnifying glass. I’d love to attach a picture, but apparently as a new user I am unable to do so :/. Instead, here’s a couple of links to my Google Drive, though this obviously might not last forever.

https://drive.google.com/file/d/0B9m0baPxbs_vN1B6TXB4UFF5MkU/edit?usp=sharing

https://drive.google.com/file/d/0B9m0baPxbs_veTFHTzl0dDZUN0E/edit?usp=sharing

Somewhat interesting, Eeschema seems to not properly redraw moving items on most of the canvas, littering random junk around until you manually Redraw (Cmd+R) the canvas. The weird magnified section seems to refresh properly though, which makes me think that the weird bit of canvas is the proper part, and the rest is an older construct that wasn’t properly removed?

Anyways, I can mostly work around this issue for now, so I will try to start using this as my default KiCad install (versus a KiCad Winbuilder build in a VM). If I need to file a bug against the main project that’s fine, but I wanted to check here first in case it’s some sort of stupid WxWidgets problem.

Just double checked some older KiCad builds from MDX4 (www.mdx4.org/index.php?/archives/55-Kicad-for-OSX-Scripting-Enabled-2014-02-26.html) and it doesn’t seem to have the same issues regarding Eeschema.

Thanks, I will look into it. The version Marco builds uses old libraries and I suspect something has changed.

Michael

So for a quick test, overnight I set up a fresh 10.9 VM, without installing Homebrew. I had to install the following applications, but it is important to note that there were obvious and clear prompts on what needed to be installed. No guessing required, nice work!

  • XCode & Command Line Tools
  • Bazaar (had to patch to specifically use python2.6)
  • CMake

After that, things seemed to go pretty smoothly, though much slower inside the VM. One interesting thing to note, the weirdness with the Eeschema canvas is still present, but it’s more mild. The origin seems to be slightly further away from the border of the sheet (maybe different paper sizes/margins?) but also the effect itself is subdued, and moves from a major issue to a minor annoyance.

The same build, installed to my “real” 10.9 install, produces the same large canvas glitches that make it at least partially unusable. There’s far too many variables to easily compare/contrast, but I can definitely provide some feedback regarding installed libraries and other information. It seems like there might be a environment issue, perhaps something like KiCad is not using a patched WxWidgets, but instead using one that was downloaded via Homebrew for another application?

Thanks for trying it out. The builder uses the latest wxWidget libraries, and I suspect there is something in the KiCad source that is not setting up the EEschema window correctly with the latest. There also may be some OpenGL interactions. There are a fair number of #ifdefs in the KiCad source regarding the wxWindows version.

Did you actually have to install Bazaar outside of the script? The script should have built Bazaar, since it isn’t installed by default on OS X…

I agree KiCad on OS X isn’t usable, yet.

In the last few weeks, the KiCad devs have been fighting bugs with wxWindows. 2.8 is going to be deprecated any day for KiCad, and I think they’re moving to 3.1, except for some Linuxes where 3.1 has other issues (of course!)

The root cause of these OS X issues is that KiCad recently changed the way the applications work together, in something called Kiway. I am not convinced it is really ready on OS X at this point. It might be more stable to take the last revno from before the Kiway work was merged in.

You are sort of correct regarding Bazaar :). The script does not appear to need Bazaar to run, but the easiest way to grab the script is to just run a bzr branch command, so I installed Bazaar for that. I believe KiCad WinBuilder gets around this problem by posting periodic releases, similar to how you have the tarball posted. I’ll have to try that first next time.

Other than the Eeschema issue I haven’t seen any other major problems. Some weirdness in how windows are handled, but nothing too surprising for a cross platform project. There’s also a lot of WxWidgets debug messages, though I’ve been ignoring those without any obvious ill effects.

Quick additional update.

I had trouble in PCBNew getting footprints to work until I added a variable to launchd.conf:

~ $ cat /etc/launchd.conf
setenv KIGITHUB https://github.com/kicad

This does require a reboot, or at least logging out and logging back in, to ensure the variable is properly set.

Wayne,

What specifically about the KiWay work isn’t ready for OS X? Granted, I’m looking at a very user-oriented view, but it seems like things are working reasonably well, though definitely not as reliably or nicely as on Windows. If you’d like me to test anything out specifically I’m happy to try things out.

Thanks iwoloschin - I have an update that sets the environment variable. I can now download footprints from github.

Thanks bronson - I have seen where I don’t get a KiCad.app packaged in the installer. The way I have it set up the KiCad.app has all of the libraries and data in its resource folder. The installer postinstall script copies all that data out and puts it in /Library/Application Support/org.kicad-pcb.eda. Without the support information the programs don’t run. I think this is the problem you are seeing. I am trying to track it down.

I have the pretty install package working. I want to track down bronson’s bug and also get the ancillary programs starting from the KiCad buttons (they don’t work now.)

I will then post a notice on the KiCad user’s mailing list and get more use/feedback.

Thanks, Michael

Michael,

One more minor bug.

It looks like the directory ~/Library/Preferences/org.kicad-pcb is being created/owned by root, which doesn’t allow some configuration settings to be saved when running as a user. I changed ownership to my regular user and this seems to work correctly now. One example is on starting KiCad having it automatically open the last project you had opened, or being able to populate the “Recently Opened” menu option in the project manager. It seems a bunch of other preferences live here as well, so this might actually be more than a “minor” bug… :smile:

Otherwise I’ve been using PCBNew to edit an existing board (with appropriate saved files elsewhere!) and things seem to be working well. Eeschema still has bugs, but that’s ok, I can use my VM for that until we can get Eeschema working better!

I updated launchpad with a new version. I also put a note on the kicad-users Yahoo forum.

Finally, I found the kicad-osx branch on launchpad. Bernhard has been patching KiCad for OS X so I am going to look at his patches and figure out how to apply. It appears he loosely follows upstream development.

Thanks for your notes!

Michael

Hi,

I tried this on MBP2009 with 10.9.5:

bzr branch lp:~mnarigon/+junk/kicad-dev
cd kicad-dev/kicad-dev
./build.sh

And got:

Version: 0.2.1
Host/target is: OS X
Using up to 2 make jobs
Building Release build.
----------------------------------------------------------------------
Step 1: Check/create build directories...
----------------------------------------------------------------------
...done.
----------------------------------------------------------------------
Step 2: Check/configure the environment...
----------------------------------------------------------------------
Adding environment variables.
Please log out and log back in after this script completes to reset the environment.
...stopping.
elapsed time: 00:00:00 sec.

Tried to open new terminal window to reload env, also tried to logout/login, but it still tells me the same.

Andres

EDIT:
It does not work with zsh.
It worked if I changed to bash and then reopened new terminal window:

chsh -s /bin/bash

andresv,
Thanks for the note! I have a fix in. I am trying to upload a new version tonight.

Michael

Michael, thanks for your hard work on this!

I just ran the script (MBP2009, OS X 10.9.5) and I’m stuck on this error:

-- downloading...
    src='http://sourceforge.net/projects/libpng/files/libpng16/1.6.13/libpng-1.6.13.tar.gz'
    dst='/Users/chaz/dev/install/kicad-dev/kicad-dev/download/libpng-1.6.13.tar.gz'
    timeout='none'
CMake Error at /Users/chaz/dev/install/kicad-dev/kicad-dev/libraries-build/lib-png/stamp/download-lib-png.cmake:13 (file):
  file DOWNLOAD HASH mismatch

for file: [/Users/chaz/dev/install/kicad-dev/kicad-dev/download/libpng-1.6.13.tar.gz]
  expected hash: [1b446065d2c2e48f79ad98f7bde57286]
    actual hash: [d41d8cd98f00b204e9800998ecf8427e]
         status: [22;"HTTP response code said error"]

I tried replacing the hash in download-dev.sh, however this does not fix the issue. download-lib-png.cmake is rebuilt every time I run the script, using the “expected” hash. Any idea how to fix this?

Hi zkarcher,
The libpng folks released a new version and moved the older one. The current version is 1.6.15. I uploaded a change. Thanks for letting me know. Michael

Hi Michael,

Thanks for the builder. Your repository no longer exists, have you moved it somewhere else? Would be great if you could share the new location of the builder repository.

Sri Prasanna

Hi Sri,
I took down the builder I developed since the KiCad developers are close to getting a builder for OS X running. The developers decided they didn’t want to use anything I had worked on. I will put the builder back up in twelve hours or so at the same link so you can grab a copy, however, it probably won’t work with the latest KiCad repository.

Michael

Hi Sri,
I reloaded the last version. The download links still work. It uses BZR5304 of the KiCad repository. The repository is currently at BZR5341. I briefly looked at what it would take to update and there were more changes than I could fix in what time I could spare.

Thanks Michael, appreciate it!

Hi folks,

Just wanted to make sure everyone knew about the official OS X nightlies.

http://www.kicad-pcb.org/display/KICAD/Installing+KiCad#InstallingKiCad-MacOSX