BLog

ImprintImpressum
PrivacyDatenschutz
DisclaimerHaftung
Downloads 

In need of a recent KiCad for Mac OS X 10.9.5

I got macOS 10.14 installed on my work station, and actual KiCad releases are compatible with it. I got also an old MacBook Pro and this is stuck to Mac OS X 10.9, yet it works very well, and I want to open my KiCad projects on this as well. A few obstacles were to be overcome, however eventually, I managed to build a recent KiCad from source for OS X Mavericks and later, and here comes how.

Prerequesites

On the Mac OS X 10.9 host we need:

Using MacPorts we install the following software packages:

sudo -s

  • port install automake
  • port install clang-10
    port select --set clang mp-clang-10
  • port install bison
  • port install cmake +universal
  • port install doxygen +universal
  • port install git +universal
  • port install boost +universal
  • port install curl +universal
  • port install cairo +universal
  • port install glew +universal
  • port install glm +universal
  • port install oce +universal

exit

Installation of wxWidgets

mkdir -p ~/Installation/KiCad; cd ~/Installation/KiCad
git clone -b kicad/macos-wx-3.0 https://gitlab.com/kicad/code/wxWidgets.git

mkdir wx-build; cd wx-build
../wxWidgets/configure \
--prefix=`pwd`/../wx-bin \
--with-opengl \
--enable-aui \
--enable-html \
--enable-stl \
--enable-richtext \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-regex=builtin \
--with-libtiff=builtin \
--with-zlib=builtin \
--with-expat=builtin \
--without-liblzma \
--with-macosx-version-min=10.9 \
--enable-macosx_arch=i386 \
CC=/opt/local/bin/clang \
CXX=/opt/local/bin/clang++ \
CFLAGS=-std=gnu11 \
CXXFLAGS="-std=gnu++14 -stdlib=libc++"

make install
cd ..

Get, build and prepare ngspice

git clone https://git.code.sf.net/p/ngspice/ngspice
cd ngspice

./autogen.sh
./configure --with-ngshared --enable-xspice --enable-cider \
  CC=/opt/local/bin/clang CFLAGS="-arch i386 -std=gnu11" YACC=/opt/local/bin/yacc

sudo make install clean

sudo sed -e "s|typedef int bool;|//typedef int bool;|" -i "" \
     /usr/local/include/ngspice/bool.h

sudo ln -s /usr/local/include/ngspice /usr/include/ngspice

Get and build KiCad

git clone https://gitlab.com/kicad/code/kicad.git
sed -e "s|#include <Python.h>|#include <python/Python.h>|" \
    -i "" pcbnew/swig/python_scripting.h

sudo ln -s \
     /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 \
     /usr/include/python

mkdir kicad/build; cd kicad/build
cmake \
-DCMAKE_C_COMPILER=/opt/local/bin/clang \
-DCMAKE_CXX_COMPILER=/opt/local/bin/clang++ \
-DCMAKE_CXX_FLAGS="-Wno-ignored-optimization-argument -Wno-deprecated-declarations" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
-DCMAKE_OSX_ARCHITECTURES=i386 \
-DwxWidgets_CONFIG_EXECUTABLE=../../wx-bin/bin/wx-config \
-DKICAD_SCRIPTING=OFF \
-DKICAD_SCRIPTING_MODULES=OFF \
-DKICAD_SCRIPTING_WXPYTHON=OFF \
-DCMAKE_INSTALL_PREFIX=../bin \
-DCMAKE_BUILD_TYPE=Release \
-DNGSPICE_INCLUDE_DIR=/usr/local/include/ngspice \
-DNGSPICE_LIBRARY=/usr/local/lib/libngspice.dylib \
../

make install
cd ..

Place the readily built KiCad.app into the Applications folder

sudo ditto bin/kicad.app /Applications/KiCad.app

Diskussion on Twitter: 1292295939659567109

Copyright © Dr. Rolf Jansen - 2020-08-08 12:16:48

PROMOTION