KiCad / KicadOSXBuilder

Kicad OSX Builder, which I plan to use as my boxed development environment on Mac OSX
87 stars 27 forks source link

Included Boost version appears to be incompatible with included wxWidgets #12

Open richard-sim opened 11 years ago

richard-sim commented 11 years ago

The include path for type_traits seems to not be in the list of include directories being passed to the compiler.

The file exists in several places:

KicadOSXBuilder rsim$ find . -name type_traits
./src/cern-kicad/.downloads-by-cmake/boost_1_54_0/src/boost/boost/icl/type_traits
./src/cern-kicad/.downloads-by-cmake/boost_1_54_0/src/boost/boost/tr1/tr1/type_traits
./src/cern-kicad/.downloads-by-cmake/boost_1_54_0/src/boost/boost/type_traits
./src/cern-kicad/.downloads-by-cmake/boost_1_54_0/src/boost/libs/ratio/example/type_traits
./src/cern-kicad/.downloads-by-cmake/boost_1_54_0/src/boost/libs/tr1/test/type_traits
./src/cern-kicad/.downloads-by-cmake/boost_1_54_0/src/boost/libs/type_traits
./src/cern-kicad/boost_root/include/boost/icl/type_traits
./src/cern-kicad/boost_root/include/boost/tr1/tr1/type_traits
./src/cern-kicad/boost_root/include/boost/type_traits

The choice of or <tr1/type_traits> is controlled by HAS_TYPE_TRAITS and HAS_TR1_TYPE_TRAITS that are defined in:

./build/wxPython-src-2.9.4.0/lib/wx/include/osx_cocoa-unicode-2.9/wx/setup.h

But swapping between the two defines does not fix the issue (but does change the file that is attempted to be included, so it is being used).

KicadOSXBuilder rsim$ ./build.sh -a x86_64 -c 4 -C -s 5
BUILDING RELEASE BINARIES

****************************************************************************
Starting step: BUILD KICAD
****************************************************************************

-- Check for installed OpenGL -- found
-- Found Glew: /usr/local/lib/libGLEW.dylib
-- Check for installed GLEW -- found
-- Check for installed Cairo -- found
-- Check for installed wxWidgets -- found
-- Check for installed Python Interpreter -- found
-- Python module install path: /Users/rsim/dev/KicadOSXBuilder/output/python/site-packages
-- Bazaar version control system version  found.
-- Kicad Bazaar build version: (2013-10-29 BZR 4389)
-- Configuring done
CMake Error: Target pl_editor Info.plist template "/Users/rsim/dev/KicadOSXBuilder/src/cern-kicad/pagelayout_editor/Info.plist" could not be found.
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    PYTHON_PACKAGES_PATH

-- Build files have been written to: /Users/rsim/dev/KicadOSXBuilder/build/cern-kicad
[  0%] [  0%] [  1%] Built target lib_dxf
Built target boost
[  2%] Generating headers containing GLSL source code
Built target potrace
Headers are up-to-date
[  2%] Built target shader_headers
[  2%] Building CXX object polygon/CMakeFiles/polygon.dir/math_for_graphics.cpp.o
[ 34%] Built target bitmaps
[ 34%] Building CXX object polygon/CMakeFiles/polygon.dir/PolyLine.cpp.o
[ 34%] [ 34%] Building CXX object common/CMakeFiles/gal.dir/drawpanel_gal.cpp.o
Building CXX object pcbnew/router/CMakeFiles/pnsrouter.dir/pns_shove.cpp.o
[ 34%] Building CXX object 3d-viewer/CMakeFiles/3d-viewer.dir/dialogs/dialog_3D_view_option_base.cpp.o
In file included from /Users/rsim/dev/KicadOSXBuilder/src/cern-kicad/polygon/math_for_graphics.cpp:8:
In file included from /Users/rsim/dev/KicadOSXBuilder/src/cern-kicad/include/common.h:37:
In file included from /Users/rsim/dev/KicadOSXBuilder/output/include/wx-2.9/wx/wx.h:16:
In file included from /Users/rsim/dev/KicadOSXBuilder/output/include/wx-2.9/wx/object.h:20:
In file included from /Users/rsim/dev/KicadOSXBuilder/output/include/wx-2.9/wx/memory.h:16:
In file included from /Users/rsim/dev/KicadOSXBuilder/output/include/wx-2.9/wx/string.h:51:
/Users/rsim/dev/KicadOSXBuilder/output/include/wx-2.9/wx/strvararg.h:31:18: fatal error: 'tr1/type_traits' file not found
        #include <tr1/type_traits>
                 ^
<snip>
mangelajo commented 10 years ago

What's your OSX version? Are you using brew or macports?, I've never seen that problem.

joerocklin commented 10 years ago

I am also having this problem with 10.9 (13A603) and homebrew.

richard-sim commented 10 years ago

OS X 10.9 (13A3017) and homebrew here also.

bstegmaier75 commented 10 years ago

I don't think that this is a boost issue - even if boost is also providing the tr1 stuff. It seems as if starting with 10.9 the default behaviour of the compiler has changed with respect to C++ standard and/or using libstdc++. See also http://stackoverflow.com/questions/19774778/when-is-it-necessary-to-use-use-the-flag-stdlib-libstdc or various other posts describing similar problems with MacPort/Homebrew and other applications.

It can be fixed adding -stdlib=libstdc++ to CMAKE_CXX_FLAGS. With that, it compiles fine for me again.

For a complete patch including a fix for this issue see #14.