The same (similar output) happens if switching OFF most of the flags inside \kicad\CMakeLists.txt, LD returns the same an errors.
I have attached console output inside txt file. Output log 2020-09-02.txt (996.2 KB)
D:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: DWARF error: could not find variable specification at offset 33bc7e
D:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: DWARF error: could not find variable specification at offset 33bce4
CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj):pcbnew_wrap.cxx:(.text+0x23cd): undefined reference to `.refptr.PyObject_GenericGetAttr'
D:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj): in function `std::invalid_argument::invalid_argument(std::invalid_argument const&)':
D:/Apps/msys64/mingw64/include/c++/10.2.0/stdexcept:174: undefined reference to `.refptr._ZTVSt16invalid_argument'
D:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj):pcbnew_wrap.cxx:(.rdata$_ZTVN4swig20SwigPyIteratorOpen_TISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPP14ZONE_CONTAINERSt6vectorIS5_SaIS5_EEEEES5_NS_9from_operIS5_EEEE[_ZTVN4swig20SwigPyIteratorOpen_TISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPP14ZONE_CONTAINERSt6vectorIS5_SaIS5_EEEEES5_NS_9from_operIS5_EEEE]+0x30): undefined reference to `swig::SwigPyIteratorOpen_T<std::reverse_iterator<__gnu_cxx::__normal_iterator<ZONE_CONTAINER**, std::vector<ZONE_CONTAINER*, std::allocator<ZONE_CONTAINER*> > > >, ZONE_CONTAINER*, swig::from_oper<ZONE_CONTAINER*> >::decr(unsigned long long)'
Linker is failing because it fails to lookup some symbols.
Here’s a few things to try
Do a release build instead of debug
Disable python (KICAD_SCRIPTING and KICAD_SCRIPTING_WXPYTHON cmake flags)
If you need python and debug build, you may get more help on dev mailing list.
One more semi-related question: What is the correct way to get debug messages from inside kicad at runtime (release build)?
Here is an example: I add this “debug” line somewhere inside the source: printf("Hello world\n");
I recompile release build, call pcbnew.exe from the command line. I expect to see this Hello world in the console when this line is executed. But I get this output only after pcbnew.exe is closed, or at random timeslots, depending of the source code i put this line (probably because of multithreading / thread switching).
Is there a some kind of dedicated debug_printf("Value of interst = %f", var_of_interst); function, which outputs debug messages from within the kicad at runtime?
I have found wxLogWarning( "Hello world" ); function, but it is a GUI warning message, intrusive GUI locking…