← Back to team overview

kicad-developers team mailing list archive

Python scripting builds broken

 

I'm seeing the following build error when building with python scripting
enabled on Linux:

/home/wayne/src/kicad-trunk/pcbnew/swig/pcbnew_scripting_helpers.cpp: In
function ‘BOARD* LoadBoard(wxString&, IO_MGR::PCB_FILE_T)’:
/home/wayne/src/kicad-trunk/pcbnew/swig/pcbnew_scripting_helpers.cpp:145:38:
error: invalid use of incomplete type ‘class PROJECT_LOCAL_SETTINGS’
  145 |             project->GetLocalSettings().m_VisibleLayers =
loadedBoard->m_LegacyVisibleLayers;
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from
/home/wayne/src/kicad-trunk/include/lib_table_base.h:33,
                 from /home/wayne/src/kicad-trunk/include/fp_lib_table.h:29,
                 from
/home/wayne/src/kicad-trunk/pcbnew/swig/pcbnew_scripting_helpers.cpp:38:
/home/wayne/src/kicad-trunk/include/project.h:51:7: note: forward
declaration of ‘class PROJECT_LOCAL_SETTINGS’
   51 | class PROJECT_LOCAL_SETTINGS;
      |       ^~~~~~~~~~~~~~~~~~~~~~
/home/wayne/src/kicad-trunk/pcbnew/swig/pcbnew_scripting_helpers.cpp:145:59:
error: ‘loadedBoard’ was not declared in this scope; did you mean
‘LoadBoard’?
  145 |             project->GetLocalSettings().m_VisibleLayers =
loadedBoard->m_LegacyVisibleLayers;
      |
^~~~~~~~~~~
      |                                                           LoadBoard
/home/wayne/src/kicad-trunk/pcbnew/swig/pcbnew_scripting_helpers.cpp:148:38:
error: invalid use of incomplete type ‘class PROJECT_LOCAL_SETTINGS’
  148 |             project->GetLocalSettings().m_VisibleItems =
loadedBoard->m_LegacyVisibleItems;
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from
/home/wayne/src/kicad-trunk/include/lib_table_base.h:33,
                 from /home/wayne/src/kicad-trunk/include/fp_lib_table.h:29,
                 from
/home/wayne/src/kicad-trunk/pcbnew/swig/pcbnew_scripting_helpers.cpp:38:
/home/wayne/src/kicad-trunk/include/project.h:51:7: note: forward
declaration of ‘class PROJECT_LOCAL_SETTINGS’
   51 | class PROJECT_LOCAL_SETTINGS;
      |       ^~~~~~~~~~~~~~~~~~~~~~
/home/wayne/src/kicad-trunk/pcbnew/swig/pcbnew_scripting_helpers.cpp:148:58:
error: ‘loadedBoard’ was not declared in this scope; did you mean
‘LoadBoard’?
  148 |             project->GetLocalSettings().m_VisibleItems =
loadedBoard->m_LegacyVisibleItems;
      |                                                          ^~~~~~~~~~~
      |                                                          LoadBoard
/home/wayne/src/kicad-trunk/pcbnew/swig/pcbnew_scripting_helpers.cpp:154:23:
error: cannot convert ‘MARKER_PCB*’ to ‘BOARD_ITEM*’
  154 |             brd->Add( marker );
      |                       ^~~~~~
      |                       |
      |                       MARKER_PCB*
In file included from
/home/wayne/src/kicad-trunk/include/pcb_base_frame.h:36,
                 from
/home/wayne/src/kicad-trunk/pcbnew/./pcb_base_edit_frame.h:29,
                 from
/home/wayne/src/kicad-trunk/pcbnew/./pcb_edit_frame.h:26,
                 from
/home/wayne/src/kicad-trunk/pcbnew/./action_plugin.h:33,
                 from
/home/wayne/src/kicad-trunk/pcbnew/swig/pcbnew_scripting_helpers.cpp:33:
/home/wayne/src/kicad-trunk/pcbnew/./class_board.h:301:27: note:
initializing argument 1 of ‘virtual void BOARD::Add(BOARD_ITEM*, ADD_MODE)’
  301 |     void Add( BOARD_ITEM* aItem, ADD_MODE aMode =
ADD_MODE::INSERT ) override;
      |               ~~~~~~~~~~~~^~~~~
make[2]: ***
[pcbnew/CMakeFiles/pcbnew_kiface_objects.dir/build.make:3795:
pcbnew/CMakeFiles/pcbnew_kiface_objects.dir/swig/pcbnew_scripting_helpers.cpp.o]
Error 1
make[1]: *** [CMakeFiles/Makefile2:3364:
pcbnew/CMakeFiles/pcbnew_kiface_objects.dir/all] Error 2
make: *** [Makefile:182: all] Error 2