I updated to the Developer's Beta for Yosemite and realized my build for KiCAD no longer works!!! I decided to build it again, using the Beta release of Xcode 6, and wanted to post my findings.
Some compilation errors are occurring on Mac OS X 10.10 Yosemite. If you can, add or modify your patches to support these modifications (in the future). All changes needed to build KiCAD have been noted below.
I'm not sure why these errors are occurring, since most of the changes shouldn't have been needed in the first place. It may just be because Yosemite is in beta, but these changes are needed at this time.
Error 1:
~/Downloads/KicadOSXBuilder-master/src/wxPython-src 2.9.4.0/src/osx/cocoa/utils.mm:250:28: error: cannot initialize a parameter of type 'id<NSFileManagerDelegate>' with an lvalue of type 'wxNSAppController *' [NSApp setDelegate:appcontroller];
Solution:
In file /src/wxPython-src 2.9.4.0/src/osx/cocoa/utils.mm
Line 250
~/Downloads/KicadOSXBuilder-master/src/wxPython-src 2.9.4.0/src/osx/webview_webkit.mm:927:25: error: cannot initialize a variable of type 'WebBackForwardList *' with an rvalue of type 'WKBackForwardList *' WebBackForwardList* history = [m_webView backForwardList];
Solution:
In file src/wxPython-src 2.9.4.0/src/osx/webview_webkit.mm
Line 927 & 945
Change:
WebBackForwardList* history = [m_webView backForwardList];
To:
WebBackForwardList* history = (WebBackForwardList *)[m_webView backForwardList];
Error 3:
CMake Error at pcbnew/CMakeLists.txt:713 (add_dependencies): Cannot add target-level dependencies to non-existent target "osx_fix_bundles".
Solution:
In file build.sh
Line 10
Change:
KICAD_BRANCH="lp:kicad"
To:
KICAD_BRANCH="lp:kicad/stable"
Line 393
Add:
-DKICAD_STABLE_VERSION=ON
To the parameters of:
cmake $SOURCE_DIRECTORY/$KICAD_DIRECTORY
Also, the patch for CMAKE may need to be updated if you are getting errors during the build stage of KiCAD. If so, create another patch file named "11_kicad_cmake-osx.patch" with the following code:
=== modified file 'CMakeLists.txt'
--- old/CMakeLists.txt 2014-07-08 01:37:45.000000000 -0400
+++ new/CMakeLists.txt 2014-07-08 01:42:04.000000000 -0400
@@ -180,7 +180,35 @@
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs" )
endif()
-endif( CMAKE_COMPILER_IS_GNUCXX )
+elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang" )
+
+ # Establish -Wall early, so specialized relaxations of this may come
+ # subsequently on the command line, such as in pcbnew/github/CMakeLists.txt
+ set( CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}" )
+ set( CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}" )
+
+ set( CMAKE_C_FLAGS_RELEASE "-O2" )
+ set( CMAKE_CXX_FLAGS_RELEASE "-O2" )
+
+ set( CMAKE_C_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG" )
+ set( CMAKE_CXX_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG" )
+
+ set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG" )
+ set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG" )
+
+ # We build DLL/DSOs from static libraries, so create position independent code
+ # for all cases, since we do not have DLL/DSO specific static libraries.
+ # Subdirectories via add_subdirectores() reference this variable, and it is either set or empty,
+ # empty for Windows.
+ set( PIC_FLAG -fPIC )
+
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PIC_FLAG}" )
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PIC_FLAG}" )
+
+ # enforce libstdc++ on 10.9
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++" )
+
+endif()
if(wxUSE_UNICODE)
add_definitions(-DwxUSE_UNICODE)
Another (possibly optional) dependency should be added to the Readme - Doxygen .
Run sudo port install doxygen.
:3: Error: Unable to find 'python.swg'
This happens at about 50% through the KiCAD build during PCBNew compilation.
Another -MANDATORY- dependency: swig-python.
Run sudo port install swig-python
I updated to the Developer's Beta for Yosemite and realized my build for KiCAD no longer works!!! I decided to build it again, using the Beta release of Xcode 6, and wanted to post my findings.
Some compilation errors are occurring on Mac OS X 10.10 Yosemite. If you can, add or modify your patches to support these modifications (in the future). All changes needed to build KiCAD have been noted below.
I'm not sure why these errors are occurring, since most of the changes shouldn't have been needed in the first place. It may just be because Yosemite is in beta, but these changes are needed at this time.
Error 1:
Error 2:
Error 3:
Also, the patch for CMAKE may need to be updated if you are getting errors during the build stage of KiCAD. If so, create another patch file named "11_kicad_cmake-osx.patch" with the following code:
Another (possibly optional) dependency should be added to the Readme - Doxygen . Run
sudo port install doxygen
.