← Back to team overview

kicad-developers team mailing list archive

Re: CMake KICAD_SCRIPTING Options Hierarchy

 

Just want to chime in with my own report, as I ran into this earlier
today as well.

I was trying to run a quick build for the first time, and in the
interest of decreasing compile time and avoiding installing too many
libraries, I figured disabling a few features would help - since I
didn't already have SWIG installed, I immediately looked to disable
KICAD_SCRIPTING. It was surprising to me that the build still didn't
work, especially since the warning that KICAD_SCRIPTING is turned back
on is far away from the actual Cmake error.

Once I found this, I disabled KICAD_SCRIPTING_MODULES. Cmake failed once
more, then I disabled KICAD_SCRIPTING_ACTION_MENU and was able to begin
a build - which failed at 68% with the following error:

/home/antonok/code/kicad/pcbnew/pcbnew.cpp: In member function ‘virtual void PCB::IFACE::OnKifaceEnd()’:
/home/antonok/code/kicad/pcbnew/pcbnew.cpp:372:9: error: ‘pcbnewFinishPythonScripting’ was not declared in this scope
         pcbnewFinishPythonScripting();
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~

At that point I had to dive into the source code to figure out to also
disable KICAD_SCRIPTING_WXPYTHON as well.

I definitely wouldn't consider that process challenging, but I can
imagine some users might encounter some variation of the same issue and
get discouraged from helping further.

- Anton

On Tue, Jun 11, 2019 at 04:28:17PM +0100, Ian McInerney wrote:
> Wayne,
> 
> Thanks for the clarification. It just seemed somewhat odd to me to have
> them override scripting to on when all were on by default. Also, thanks for
> updating the dev docs to represent the changes.
> 
> On a similar note, it appears that none of the other scripting defines have
> their dependency on KICAD_SCRIPTING in the cmake file, so you could
> potentially compile with wxpython on and scripting off and get a build
> error. I doubt that anyone will try this, but it might be nice to at least
> make those behave similarly to the action menu/module scripting defines (so
> they automatically turn on KICAD_SCRIPTING when they are enabled). I will
> put a patch for that together once I finish up some other work.
> 
> -Ian
> 
> On Thu, Jun 6, 2019 at 5:07 PM Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
> 
> > Hey Ian
> >
> > On 6/5/19 1:03 PM, Ian McInerney wrote:
> > > I was just noticing based on a post on the kicad forums that the CMake
> > > script will forcefully enable KICAD_SCRIPTING if either
> > > KICAD_SCRIPTING_ACTION_MENUS or KICAD_SCRIPTING_MODULES is turned on.
> > > This means to really disable scripting the user has to explicitly force
> > > all 3 to off (since they are all on by default). Is there are reason for
> > > making those two options take priority over the overall scripting
> > > support option instead of having KICAD_SCRIPTING take priority and
> > > disable those two when it is disabled? It seems more intuitive if
> > > KICAD_SCRIPTING has overall control of the scripting environment, and
> > > the others are dependent upon it.
> >
> > KICAD_SCRIPTIN_MODULES and KICAD_SCRIPTING_ACTION_MENUS depend on
> > KICAD_SCRIPTING being built so it has to be enabled.  However,
> > KICAD_SCRIPTING does not depend on the other two so it can be enabled by
> > itself.
> >
> > >
> > > This hierarchy is not actually mentioned in any of the build docs
> > > here
> > http://docs.kicad-pcb.org/doxygen/md_Documentation_development_compiling.html
> >  (and
> > > the docs seem to be slightly out of date also, since they say
> > > KICAD_SCRIPTING_ACTION_MENU defaults to off when it is actually on by
> > > default), so if nothing else it would be good to mention it in the build
> > > docs so people who really don't want scripting know to disable all 3.
> >
> > I will update the compiling doc to reflect this.
> >
> > Wayne
> >
> > >
> > > -Ian
> > >
> > > _______________________________________________
> > > 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
> >

> _______________________________________________
> 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



References