← Back to team overview

kicad-developers team mailing list archive

Re: Illegal instruction 4 when running eeschema after executing kicad-mac-builder

 

Whoa, that worked! Thanks Jonatan.

I did have to change the last line from `open kicad/kicad.app` to `kicad/kicad.app/Contents/MacOS/kicad`. The .app launches without complaint, but no windows appear. Running the executable directly works perfectly, despite the kicad.app package not containing the usual Applications directory.

My hunch is that the kicker was:

	-DKICAD_USE_OCE=OFF

To get kicad-mac-builder to work I had to find MacOSX10.12.sdk on the Internet and stuff it in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs because the oce plugin (I think) went looking for OpenGL.Framework there. That’s not so bad, but the oce plugin still wouldn’t compile until I did some shenanigans with system libraries to make it look like 10.12:

	• Reboot, turn off SIP
	• sudo ln -s /usr/lib/libcoretls.dylib /usr/lib/libsystem_coretls.dylib
	• sudo ln -s /usr/lib/libcoretls.dylib /usr/lib/system/libsystem_coretls.dylib
	• sudo ln -s /usr/lib/libnetwork.dylib /usr/lib/system/libsystem_network.dylib

I’d forgotten I’d done this, so maybe I’d left enough relics to cause issues. Perhaps this is why others don’t see this issue if they start with 10.12 and upgrade to 10.14?

For what it’s worth, prior to trying kicad-mac-builder I’d noticed that the oce homebrew bottle looked old, and managed to compile from source with:

	• git clone https://github.com/tpaviot/oce.git
	• cd oce
	• mkdir build
	• cd build
	• cmake ..
	• vi CMakeCache.txt
		• Make changes from https://github.com/brewsci/homebrew-science/blob/master/Formula/oce.rb
		• Delete HAVE_CLOCK_GETTIME:INTERNAL
		• Change OCE_COPY_HEADERS_BUILD:BOOL=ON
		• Change OCE_DRAW:BOOL=ON
		• Change OCE_MULTITHREAD_LIBRARY:STRING=TBB" if build.with? "tbb"
		• Change OCE_WITH_FREEIMAGE:BOOL=ON
		• Change OCE_WITH_GL2PS:BOOL=ON
		• Add OCE_WITH_OPENCL:BOOL=ON
		• Add OPENCL_LIBRARIES:PATH=/System/Library/Frameworks/OpenCL.framework
		• Add OPENCL_CPP_INCLUDE_DIRS:PATH=/System/Library/Frameworks/OpenCL.framework/Headers
	• cmake ..
	• make
	• sudo make install/strip

Later on I was able to just do:

	• brew remove oce
	• brew reinstall freetype
	• brew install --build-from-source brewsci/science/oce


So for now, given my kicad development interests don’t at the moment stretch to 3D or scripting or packaging, it looks like I have a way to get started.

Thank you very much Adam and Jonatan for your help. I suspect the trail this thread has left will help newbie mac developers in the future.

For the record, this is the version info I see using this method:

Application: Eeschema
Version: (5.99.0-622-gea218bc72), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    Build date: Jan 15 2020 06:23:09
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.72.0
    Curl: 7.64.1
    Compiler: Clang 11.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=OFF
    KICAD_SCRIPTING_MODULES=OFF
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=OFF
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON


Regards,
Heath

> On 15 Jan 2020, at 1:08 am, Jonatan Liljedahl <lijon@xxxxxxxxxxxx> wrote:
> 
> I'm also on mac. I also started with the kicad-mac-builder, but now I
> simply build kicad directly since it's much faster. I still use the
> built libs etc from kicad-mac-builder, like so:
> 
> mkdir -p build/master
> 
> cd build/master
> 
> cmake -DNGSPICE_INCLUDE_DIR=/Users/lijon/Coding/kicad-mac-builder/build/ngspice-dest/include/
> -DNGSPICE_LIBRARY=/Users/lijon/Coding/kicad-mac-builder/build/ngspice-dest/lib/libngspice.dylib
> -DKICAD_USE_OCE=OFF -DKICAD_SCRIPTING=OFF
> -DwxWidgets_CONFIG_EXECUTABLE=/Users/lijon/Coding/kicad-mac-builder/build/wxwidgets-dest/bin/wx-config
> -DKICAD_BUILD_QA_TESTS=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 ../..
> 
> make -j4
> 
> mkdir kicad/kicad.app/Contents/PlugIns/sim
> ln -s /Users/lijon/Coding/kicad-mac-builder/build/ngspice-dest/lib/libngspice.0.dylib
> kicad/kicad.app/Contents/PlugIns/sim/
> 
> open kicad/kicad.app



Follow ups

References