← Back to team overview

kicad-developers team mailing list archive

Re: macos dev environment

 

I don’t know about ngspice or Python scripting, I don’t use them.
Maybe you just need to supply a suitable path to cmake when building?

When you do a "make install" the binaries in the build folder are not usable directly any more.
The bundling process of a “make install” rewrites the library paths in all binaries/libs so that it only fits the layout of the bundle, but not the layout of the build folders.
So, it is expected that it crashes or some other bad things happen, because it won’t find libs any more.


Regards,
Bernhard

> On 8. Nov 2019, at 13:17, Jonatan Liljedahl <lijon@xxxxxxxxxxxx> wrote:
> 
> First time, open the built kicad.app directly did work, except that it
> couldn't find ngspice (which I need, because it's the simulator UI I'm
> working on...). After make install, opening the kicad.app directly
> (not the installed one), it crashes when I click the eeschema button
> in the project window.
> 
> On Thu, Nov 7, 2019 at 11:05 PM Bernhard Stegmaier
> <stegmaier@xxxxxxxxxxxxx> wrote:
>> 
>> At least the last time I tried you don’t need to do a “make install” and build the bundle if you want to test something during development.
>> Just run needed KiCad binary directly from the build folder…
>> 
>> I don’t know about CLion, but that worked for me using Qt Creator without problems.
>> 
>> The only thing to remember is that if you do a “make install” once, it won’t run from build folder any more.
>> 
>> 
>> Regards,
>> Bernhard
>> 
>> On 7. Nov 2019, at 22:35, Jonatan Liljedahl <lijon@xxxxxxxxxxxx> wrote:
>> 
>> Ok, I got it working by changing CMAKE_INSTALL_PREFIX to an absolute
>> path. So using "../bin" as it says in
>> http://docs.kicad-pcb.org/doxygen/md_Documentation_development_compiling.html#build_osx
>> does not actually work.
>> 
>> Perhaps it would be a good idea to merge the kicad-mac-builder patches
>> instead of having to apply them each time? I know this was discussed
>> before, regarding the mismatch between KiCad version info string for
>> the macOS package, but I'm not sure what was decided.
>> 
>> Cheers
>> 
>> On Thu, Nov 7, 2019 at 10:07 PM Jonatan Liljedahl <lijon@xxxxxxxxxxxx> wrote:
>> 
>> 
>> Thanks. I managed to get it building directly in my kicad source dir
>> by pointing it to the custom wxWidgets etc that was built by
>> kicad-mac-builder. However, make install fails during fixup bundle
>> (see below). I have the patches from kicad-mac-builder applied. I've
>> attached my CMakeCache.txt.
>> 
>> Install the project...
>> -- Install configuration: "Debug"
>> -- Removing existing application bundles...
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/kicad.app/Contents/Frameworks/libkicad_3dsg.2.0.0.dylib
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/kicad.app/Contents/Frameworks/libkicad_3dsg.dylib
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/eeschema.app
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/eeschema.app/Contents
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/eeschema.app/Contents/MacOS
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/eeschema.app/Contents/MacOS/eeschema
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/eeschema.app/Contents/Resources
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/eeschema.app/Contents/Resources/eeschema_doc.icns
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/eeschema.app/Contents/Resources/eeschema.icns
>> -- Installing: /Users/lijon/Coding/kicad/build/debug/../bin/../bin/eeschema.app/Contents/Info.plist
>> -- fixup_bundle
>> --   app='../bin/eeschema.app/Contents/MacOS/eeschema'
>> --   libs=''
>> --   dirs=''
>> --   ignoreItems=''
>> -- fixup_bundle: preparing...
>> warning: target '../bin/eeschema.app/Contents/MacOS/eeschema' is not absolute...
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- warning: gp_resolved_file_type expects absolute full path for first
>> arg original_file
>> -- fixup_bundle: copying...
>> -- 1/24: *NOT* copying
>> '/Users/lijon/Coding/kicad/build/bin/eeschema.app/Contents/MacOS/eeschema'
>> -- 2/24: linking
>> '/Users/lijon/Coding/kicad/build/bin/eeschema.app/Contents/Frameworks/libwx_osx_cocoau-3.0.0.4.0.dylib'
>> -> '/Users/lijon/Coding/kicad/build/bin/eeschema.app/Contents/Frameworks/libwx_osx_cocoau-3.0.0.dylib'
>> -- 3/24: linking
>> '/Users/lijon/Coding/kicad/build/bin/eeschema.app/Contents/Frameworks/libwx_osx_cocoau_gl-3.0.0.4.0.dylib'
>> -> '/Users/lijon/Coding/kicad/build/bin/eeschema.app/Contents/Frameworks/libwx_osx_cocoau_gl-3.0.0.dylib'
>> -- 4/24: copying '/usr/local/opt/cairo/lib/libcairo.2.dylib'
>> -- 5/24: copying '/usr/local/opt/fontconfig/lib/libfontconfig.1.dylib'
>> -- 6/24: copying '/usr/local/opt/freetype/lib/libfreetype.6.dylib'
>> -- 7/24: linking
>> '/Users/lijon/Coding/kicad/build/bin/eeschema.app/Contents/Frameworks/libGLEW.2.1.0.dylib'
>> -> '/Users/lijon/Coding/kicad/build/bin/eeschema.app/Contents/Frameworks/libGLEW.2.1.dylib'
>> -- 8/24: copying '/usr/local/opt/libpng/lib/libpng16.16.dylib'
>> -- 9/24: copying '/usr/local/opt/pixman/lib/libpixman-1.0.dylib'
>> -- 10/24: copying
>> '/Users/lijon/Coding/kicad-mac-builder/build/wxwidgets-dest/lib/libwx_osx_cocoau-3.0.0.4.0.dylib'
>> -- 11/24: copying
>> '/Users/lijon/Coding/kicad-mac-builder/build/wxwidgets-dest/lib/libwx_osx_cocoau_gl-3.0.0.4.0.dylib'
>> -- 12/24: copying '/usr/local/Cellar/glew/2.1.0/lib/libGLEW.2.1.0.dylib'
>> -- fixup_bundle: fixing...
>> -- 13/24: fixing up
>> '/Users/lijon/Coding/kicad/build/bin/eeschema.app/Contents/MacOS/eeschema'
>> exe_dotapp_dir/='../bin/eeschema.app/'
>> item_substring='/Users/lijon/Coding/'
>> resolved_embedded_item='/Users/lijon/Coding/kicad/build/bin/eeschema.app/Contents/MacOS/eeschema'
>> 
>> Install or copy the item into the bundle before calling fixup_bundle.
>> Or maybe there's a typo or incorrect path in one of the args to fixup_bundle?
>> 
>> CMake Error at /Applications/CMake.app/Contents/share/cmake-3.15/Modules/BundleUtilities.cmake:861
>> (message):
>> cannot fixup an item that is not in the bundle...
>> Call Stack (most recent call first):
>> /Applications/CMake.app/Contents/share/cmake-3.15/Modules/BundleUtilities.cmake:989
>> (fixup_bundle_item)
>> eeschema/cmake_install.cmake:71 (fixup_bundle)
>> cmake_install.cmake:57 (include)
>> 
>> 
>> make: *** [install] Error 1
>> 
>> On Thu, Nov 7, 2019 at 6:02 PM Adam Wolf <adamwolf@xxxxxxxxxxxxxxxxxxxx> wrote:
>> 
>> 
>> We're going to do that in the simple way, which is to copy rather than
>> symlink.  It costs a few megs, but that should be fine.
>> 
>> On Thu, Nov 7, 2019 at 9:12 AM Jon Evans <jon@xxxxxxxxxxxxx> wrote:
>> 
>> 
>> I also use CLion.  It's okay but not perfect.  It's been a while since I've been compiling on my Mac but from what I recall, the most frustrating part is the need to re-generate all of the application packages whenever anything is touched (which is a slow and non-parallel process).
>> 
>> It's possible that implementing one of the possible fixes for https://bugs.launchpad.net/kicad/+bug/1826649 will also enable faster incremental builds on MacOS
>> 
>> -Jon
>> 
>> On Thu, Nov 7, 2019 at 10:07 AM Adam Wolf <adamwolf@xxxxxxxxxxxxxxxxxxxx> wrote:
>> 
>> 
>> I use CLion, but I also would love to see kicad-mac-builder improved
>> to the point where it could do the right things for dev, as well.
>> 
>> Adam
>> 
>> On Thu, Nov 7, 2019 at 7:45 AM Jonatan Liljedahl <lijon@xxxxxxxxxxxx> wrote:
>> 
>> 
>> Are there any developers on macOS that would like to give me some
>> hints on how to set up a good environment? Currently I'm using
>> kicad-mac-builder, but it's not well suited for the kind of iterative
>> rebuilding during development.
>> 
>> 1. It applies the patches each time.
>> 2. It resets the git repo each time.
>> 3. It re-downloads all docs etc each time.
>> 4. It does not rebuild the changed source files.
>> 
>> So for now, I've just commented out the docs dependency and commands
>> for applying the patches and resetting git, etc.
>> 
>> But it still does not rebuild when I change some source file, so I need to do:
>> 
>> make -f CMakeFiles/Makefile2 CMakeFiles/kicad.dir/clean
>> 
>> and rebuild, which probably takes more time than needed.
>> 
>> --
>> /Jonatan
>> http://kymatica.com
>> 
>> _______________________________________________
>> 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
>> 
>> 
>> _______________________________________________
>> 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
>> 
>> 
>> 
>> 
>> --
>> /Jonatan
>> http://kymatica.com
>> 
>> 
>> 
>> 
>> --
>> /Jonatan
>> http://kymatica.com
>> 
>> _______________________________________________
>> 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
>> 
>> 
> 
> 
> -- 
> /Jonatan
> http://kymatica.com



Follow ups

References