← Back to team overview

kicad-developers team mailing list archive

Re: Problem building on MacOS or just boost?

 

Wow, thank you very much Fabio!, I'm going to try it, may be we should add that undef as a conditional for Mac compilation.

Fabio, did you build wx / wxpython for universal binary (ppc, x86, x86_64)? or just your platform?, I tried to do it universally, but it
seems that I miss some SDK files for that, not sure how to get them in the system or find the path… (I'm a newbie again!! ':D )



Miguel Angel Ajo
http://www.nbee.es
+34911407752
skype: ajoajoajo

On 22/09/2012, at 15:46, Fabio Utzig <fabio@xxxxxxxxx> wrote:

> Hi,
> 
> Coincidentally this week I also compiled Kicad (unstable) for the Mac and has to fix some bugs to make it work.
> 
> To fix this compilation bug you have to #undef check because Mac OS X already has a macro with that name. So edit:
> 
> include/boost/ptr_container/detail/static_move_ptr.hpp
> 
> And put an:
> 
> #undef check
> 
> I put it on line 35 which is just before the declaration of boost namespace.
> 
> If you get an link error at the end (happened to me) where components don't link to wxAui* you'll have to edit CMakeLists.txt and remove the APPLE test on line 241. Leave just a line like this:
> 
> find_package(wxWidgets COMPONENTS gl aui adv html core net base xml QUIET)
> 
> With the aui included. I don't know exactly why there's this Apple specific code but definitely I had to include "aui" in the line. Run cmake . again and build again. This should at least enable it to build.
> 
> By the way, I'm using homebrew (no Macports) to manage my packages. I guess people building for Mac usually use Macports which maybe explains these issues. 
> 
> -- 
> Fabio Utzig
> 
> On Saturday, September 22, 2012 at 10:14 AM, Miguel Angel Ajo Pelayo wrote:
> 
>> 
>> Hi everybody, I'm still struggling through my ton of work, but had some time to learn how to setup everything to build on MacOS (including wxpython),
>> anyway I didn't manage to get it working, compilation stops at here,
>> 
>> Not sure if it's a mac-os compiler problem (llvm-gcc-4.2) or just a boost issue:
>> 
>> 
>> 
>> Scanning dependencies of target polygon
>> [ 35%] Building CXX object 3d-viewer/CMakeFiles/3d-viewer.dir/3d_aux.cpp.o
>> [ 35%] Building CXX object polygon/CMakeFiles/polygon.dir/math_for_graphics.cpp.o
>> [ 35%] Building CXX object common/CMakeFiles/common.dir/dialogs/dialog_image_editor.cpp.o
>> [ 35%] Building CXX object common/CMakeFiles/pcbcommon.dir/base_screen.cpp.o
>> In file included from /Users/ajo/Documents/work/kicad/kicad/3d-viewer/3d_aux.cpp:34:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/wxBasePcbFrame.h:38:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/base_struct.h:38:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/ptr_vector.hpp:20:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/ptr_sequence_adapter.hpp:20:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/reversible_ptr_container.hpp:22:
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/static_move_ptr.hpp:154:42: error: too many arguments provided to function-like macro
>> invocation
>> void check(const static_move_ptr<TT, DD>& ptr)
>> ^
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/static_move_ptr.hpp:154:10: error: function definition does not declare parameters
>> void check(const static_move_ptr<TT, DD>& ptr)
>> ^
>> In file included from /Users/ajo/Documents/work/kicad/kicad/common/base_screen.cpp:34:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/base_struct.h:38:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/ptr_vector.hpp:20:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/ptr_sequence_adapter.hpp:20:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/reversible_ptr_container.hpp:22:
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/static_move_ptr.hpp:154:42: error: too many arguments provided to function-like macro
>> invocation
>> void check(const static_move_ptr<TT, DD>& ptr)
>> ^
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/static_move_ptr.hpp:154:10: error: function definition does not declare parameters
>> void check(const static_move_ptr<TT, DD>& ptr)
>> ^
>> In file included from /Users/ajo/Documents/work/kicad/kicad/common/dialogs/dialog_image_editor.cpp:32:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/class_bitmap_base.h:34:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/sch_item_struct.h:34:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/class_base_screen.h:34:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/base_struct.h:38:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/ptr_vector.hpp:20:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/ptr_sequence_adapter.hpp:20:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/reversible_ptr_container.hpp:22:
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/static_move_ptr.hpp:154:42: error: too many arguments provided to function-like macro
>> invocation
>> void check(const static_move_ptr<TT, DD>& ptr)
>> ^
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/static_move_ptr.hpp:154:10: error: function definition does not declare parameters
>> void check(const static_move_ptr<TT, DD>& ptr)
>> ^
>> 2 errors generated.
>> make[2]: *** [common/CMakeFiles/pcbcommon.dir/base_screen.cpp.o] Error 1
>> make[1]: *** [common/CMakeFiles/pcbcommon.dir/all] Error 2
>> make[1]: *** Waiting for unfinished jobs....
>> 2 errors generated.
>> [ 35%] make[2]: *** [common/CMakeFiles/common.dir/dialogs/dialog_image_editor.cpp.o] Error 1
>> make[1]: *** [common/CMakeFiles/common.dir/all] Error 2
>> Building CXX object 3d-viewer/CMakeFiles/3d-viewer.dir/3d_canvas.cpp.o
>> [ 36%] Building CXX object polygon/CMakeFiles/polygon.dir/PolyLine.cpp.o
>> [ 36%] Building CXX object polygon/CMakeFiles/polygon.dir/polygon_test_point_inside.cpp.o
>> 2 errors generated.
>> make[2]: *** [3d-viewer/CMakeFiles/3d-viewer.dir/3d_aux.cpp.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> [ 36%] Building CXX object polygon/CMakeFiles/polygon.dir/clipper.cpp.o
>> In file included from /Users/ajo/Documents/work/kicad/kicad/polygon/polygon_test_point_inside.cpp:7:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/polygon/./PolyLine.h:24:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/polygon/./polygons_defs.h:9:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/polygon/polygon.hpp:24:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/polygon/transform.hpp:499:
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/polygon/detail/transform_detail.hpp:471:46: warning: '&&' within '||' [-Wlogical-op-parentheses]
>> return atr_ < tr.atr_ || atr_ == tr.atr_ && p_ < tr.p_;
>> ~~ ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/polygon/detail/transform_detail.hpp:471:46: note: place parentheses around the '&&' expression to silence this
>> warning
>> return atr_ < tr.atr_ || atr_ == tr.atr_ && p_ < tr.p_;
>> ^
>> ( )
>> 1 warning generated.
>> In file included from /Users/ajo/Documents/work/kicad/kicad/3d-viewer/3d_canvas.cpp:19:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/3d-viewer/./3d_viewer.h:33:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/wxBasePcbFrame.h:38:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/base_struct.h:38:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/ptr_vector.hpp:20:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/ptr_sequence_adapter.hpp:20:
>> In file included from /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/reversible_ptr_container.hpp:22:
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/static_move_ptr.hpp:154:42: error: too many arguments provided to function-like macro
>> invocation
>> void check(const static_move_ptr<TT, DD>& ptr)
>> ^
>> /Users/ajo/Documents/work/kicad/kicad/include/boost/ptr_container/detail/static_move_ptr.hpp:154:10: error: function definition does not declare parameters
>> void check(const static_move_ptr<TT, DD>& ptr)
>> ^
>> 2 errors generated.
>> make[2]: *** [3d-viewer/CMakeFiles/3d-viewer.dir/3d_canvas.cpp.o] Error 1
>> make[1]: *** [3d-viewer/CMakeFiles/3d-viewer.dir/all] Error 2
>> Linking CXX static library libpolygon.a
>> [ 36%] Built target polygon
>> make: *** [all] Error 2
>> 
>> MacBook-Air-de-Miguel:build ajo$ gcc -version
>> i686-apple-darwin11-llvm-gcc-4.2: no input files
>> 
>> Greetings,
>> Mike
>> 
>> 
>> Miguel Angel Ajo
>> http://www.nbee.es
>> +34911407752
>> skype: ajoajoajo
>> 
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help : https://help.launchpad.net/ListHelp
> 


References