Wednesday, February 25, 2009

Kicad OSX nightlies fixed

I finally decided to investigate why kicad had stopped building back in Decemember. I had initially thought it was to do with large changes to the source being done at that time or with my trying to get a newer build of wxMac to work with it properly.
I turns out I updated the Boost library and that was what was causing my builds to fail.

Somewhere on the mac a "check" macro gets defined. Apparently this is if "DEBUG" is defined somewhere but I could not figure out where or why this was going on (see this post. I decided to simply modify the boost files concerned to work aroaund this problem. By renaming the "check" function and its called I was able to get kicad compiling again. Sadly it does not fix the serious flaws in wxmacs graphics implimentation ie. the fact that it does not do XOR draws properly.Anyway here are the diffs I made

fixing kicad again for th mac
/temp/kicad-sources/boost/ptr_container/detail/static_move_ptr.hpp:
line 155: check renamed to check_

4 changes in /temp/kicad-sources/boost/detail/is_incrementable.hppcheck "check(" replaced with "check_("

boost/ptr_container/detail/static_move_ptr.hpp

% diff /temp/boost_1_37_0/boost/ptr_container/detail/static_move_ptr.hpp
/temp/kicad-sources/boost/ptr_container/detail/static_move_ptr.hpp

154c155
< void check(const static_move_ptr& ptr)
---
> void check_(const static_move_ptr& ptr)


boost/detail/is_incrementable.hpp

% diff /temp/boost_1_37_0/boost/detail/is_incrementable.hpp
/temp/kicad-sources/boost/detail/is_incrementable.hpp

68c68
< char (& check(tag) )[2];
---
> char (& check_(tag) )[2];
71c71
< char check(T const&);
---
> char check_(T const&);
81c81
< , value = sizeof(is_incrementable_::check(BOOST_comma(++x,0))) == 1
---
> , value = sizeof(is_incrementable_::check_(BOOST_comma(++x,0))) == 1
92c92
< , value = sizeof(is_incrementable_::check(BOOST_comma(x++,0))) == 1
---
> , value = sizeof(is_incrementable_::check_(BOOST_comma(x++,0))) == 1


The error I was getting was the following
In file included from /temp/kicad-sources/boost_1_38_0/boost/ptr_container/detail/reversible_ptr_container.hpp:22In file included from /temp/kicad-sources/boost_1_38_0/boost/ptr_container/detail/reversible_ptr_container.hpp:22,
from /temp/kicad-sources/boost_1_38_0/boost/ptr_container/ptr_sequence_adapter.hpp:20,
from /temp/kicad-sources/boost_1_38_0/boost/ptr_container/ptr_vector.hpp:20,
from /temp/kicad-sources/kicad/include/board_item_struct.h:9,
from /temp/kicad-sources/kicad/include/pcbstruct.h:10,
from /temp/kicad-sources/kicad/3d-viewer/3d_viewer.h:29,
from /temp/kicad-sources/kicad/3d-viewer/3d_aux.cpp:23:
/temp/kicad-sources/boost_1_38_0/boost/ptr_container/detail/static_move_ptr.hpp:154:50: error: macro "check" passed 2 arguments, but takes just 1


I have now updated my automagic build script to upload the error log if It doesn't compile.

All of my builds are still found at http://www.brokentoaster.com/kicad/ and should be universal apps. If anyone has had any success with wxCocoa or other builds I'd be happy to add them to my build list.

10 Comments:

At 10:30 am, Blogger Unknown said...

Great! Thanks for working to fix this--I had been hoping the builds would come back. :-)

I'm guessing we need to wait for the cron job to run before a new binary is generated? No new builds seem to be uploaded yet.

Thanks again.

--Phil.

 
At 6:27 pm, Blogger Nick said...

Yeah looks like I was a little premature.
Managed to build okay on the laptop but the mini doing the automatic builds didn't work.
will post again when up and running.

 
At 7:28 am, Blogger Nick said...

Fingers crossed but I think things are working again.
will post a new post to confirm.

 
At 11:15 am, Blogger Unknown said...

Looks like build v1636 was successful.

Finally the crash-on-exit bug appears to be gone!

Unfortunately the displaying of "rubber banding" lines still doesn't work.

Thanks for fixing the builds. :-D

--Phil.

 
At 11:04 pm, Blogger Brian Durocher said...

I have been downloading these since the beginning of April. Thanks for doing this work.

Is there a forum where we can post any issues we come across, like crashes etc?

 
At 11:13 pm, Blogger Nick said...

Best place would be on the developers message board at http://tech.groups.yahoo.com/group/kicad-devel/

 
At 6:32 am, Blogger Brian Durocher said...

Nick it looks like you need to update your boost libraries dude to a change in the code in SVN. I was able to get the latest version to compile on OSX I'm sure you wont have any trouble.

 
At 7:06 am, Blogger Nick said...

Thanks, been away for the last week so its typical that something should break :)
Hopefully be backup tommorrow

 
At 7:23 pm, Blogger Armpit Studios said...

The Mac "check" is in AssertMacros.h. If you don't use anything in there, you can prevent it from being compiled in by putting "#define __ASSERTMACROS__" in your prefix header before including Carbon/Carbon.h.

If you *do* need AssertMacros.h, then maybe you can try including boost before Carbon.

 
At 6:54 pm, Anonymous Anonymous said...

Hello Nick,
I can't find your contact information.
But would you like to contribute all your OSX experiences,scripts notes et al. To the KiCad project. Im involved and we can work together because i also have a macbook for a few weeks now.

Contact me (see kicad about of course!)
Jerry Jacobs
- http://www.xor-gate.org

 

Post a Comment

<< Home