← Back to team overview

kicad-developers team mailing list archive

Re: Profligacy of messages/ link errors building 5.99 on Windows 10/Msys

 

I'll try it now but but the makefile generator script I used worked fine for over a year until now.

On 2020-07-22 2:39 a.m., Nick Østergaard wrote:
Did you try to use the normal makefile generator rather than the eclipse one?

ons. 22. jul. 2020 01.37 skrev Brian Piccioni <brian@xxxxxxxxxxxxxxxxxxxxx <mailto:brian@xxxxxxxxxxxxxxxxxxxxx>>:

    FWIW, I re-cloned Kicad master into an empty directory, created a
    new build directory, ran the standard build script

    cmake -DCMAKE_BUILD_TYPE=Debug \
    -G "Eclipse CDT4 - Unix Makefiles" \
    -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE \
    -DCMAKE_PREFIX_PATH=C:/msys64/mingw64 \
    -DCMAKE_INSTALL_PREFIX=C:/msys64/mingw64 \
    -DDEFAULT_INSTALL_PATH=C:/msys64/mingw64 \
    -DMSYS=TRUE \
    ../kicad

    and got the same errors

     Built target qa_eeschema
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
    CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj):pcbnew_wrap.cxx:(.text+0x23cd):
    undefined reference to `.refptr.PyObject_GenericGetAttr'
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.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&)':
    C:/msys64/mingw64/include/c++/10.1.0/stdexcept:174: undefined
    reference to `.refptr._ZTVSt16invalid_argument'
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
    CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj): in
    function `std::_Sp_counted_deleter<NETCLASS*, SWIG_null_deleter,
    std::allocator<void>,
    (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    C:/msys64/mingw64/include/c++/10.1.0/bits/shared_ptr_base.h:490:
    undefined reference to `typeinfo for SWIG_null_deleter'
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
    CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj): in
    function `swig::traits_from<KIID>::from(KIID const&)':
    C:/Users/bjpic/KicadWork/FixedFormatting/clean/debug/pcbnew/pcbnew_wrap.cxx:3929:
    undefined reference to `swig::traits_from_ptr<KIID>::from(KIID*, int)'
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
    CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj):pcbnew_wrap.cxx:(.rdata$_ZTI17SWIG_null_deleter+0x8):
    undefined reference to `typeinfo name for SWIG_null_deleter'
    collect2.exe: error: ld returned 1 exit status
    make[2]: *** [pcbnew/CMakeFiles/pcbnew_kiface.dir/build.make:635:
    pcbnew/_pcbnew.kiface] Error 1
    make[1]: *** [CMakeFiles/Makefile2:3284:
    pcbnew/CMakeFiles/pcbnew_kiface.dir/all] Error 2
    make: *** [Makefile:161: all] Error 2

    bjpic@LAPTOP-70Q5CT1Q MINGW64 ~/FixedFormatting/clean/debug
    $



    On 2020-07-21 2:54 p.m., Ian McInerney wrote:
    Ignore all of those notes being printed by the compiler about
    mismatched struct/class definition. There is a bug in GCC 10.1
    that isn't silencing those properly, but that is fixed in GCC
    10.2/GCC 11 (I think they are hoping to release 10.2 this week).

    The linker errors appear to be Python related. Did you update
    your Python installation that KiCad uses recently? Can you
    confirm that SWIG and Python are being detected correctly bby CMake?

    -Ian

    On Tue, Jul 21, 2020 at 6:58 PM Brian Piccioni
    <brian@xxxxxxxxxxxxxxxxxxxxx
    <mailto:brian@xxxxxxxxxxxxxxxxxxxxx>> wrote:

        Before updating master I had successfuIly build a c late June
        version.

        After failing to build yesterday's master I deleted my build
        directory, pulled master, same problem. I then updated msys
        in order to make sure it wasn't a tool issue. Same problem. I
        deleted the build directory and same result.

        When I get home I'll try a new download of master and try
        that but I expect the same result

        Note the earlier reply claiming to have had a similar problem.

        On Tue, Jul 21, 2020, 13:47 Nick Østergaard
        <oe.nick@xxxxxxxxx <mailto:oe.nick@xxxxxxxxx>> wrote:

            That looks quite strange. Did you try a clean build
            directort? Maybe
            there is some caching that is broken after a toolchain
            update?  Pure
            speculation.


            On Tue, 21 Jul 2020 at 16:47, Brian Piccioni
            <brian@xxxxxxxxxxxxxxxxxxxxx
            <mailto:brian@xxxxxxxxxxxxxxxxxxxxx>> wrote:
            >
            > It is a non-release tag, but as a developer I sort of
            need it to compile ...
            >
            > On 2020-07-21 10:45 a.m., Alex wrote:
            >
            > I too, also had the same errors, but assumed that 5.99
            was some weird non-release tag, and switched to a
            different branch, as this is my first day building the
            application.
            >
            > On Tue, Jul 21, 2020, 4:42 PM Brian Piccioni
            <brian@xxxxxxxxxxxxxxxxxxxxx
            <mailto:brian@xxxxxxxxxxxxxxxxxxxxx>> wrote:
            >>
            >> When building I get a slew of errors or information
            messages of the type
            >> (see below). During linking I then get a pile of
            "undefined" errors.
            >> There are so many I can't reproduce them all.
            >>
            >> When I link I get a fatal error.
            >>
            >> This is the Master branch downloaded a few minutes
            before compiling. I
            >> tried updating Msys and get the same result.
            >>
            >>
            >>     42 |   struct ctype_base
            >>        |          ^~~~~~~~~~
            >> In file included from
            C:/msys64/mingw64/include/c++/10.1.0/string:43,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/stringimpl.h:66,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/unichar.h:15,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/strvararg.h:22,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/string.h:46,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/memory.h:15,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/object.h:19,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/wx.h:15,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/include/fctsys.h:28,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/dialogs/panel_modedit_defaults.cpp:24:
            >>
            C:/msys64/mingw64/include/c++/10.1.0/bits/localefwd.h:125:9:
            note:
            >> replace the class-key with 'struct'
            >>    125 |   class ctype_base;
            >>        |         ^~~~~~~~~~
            >> In file included from
            >>
            C:/msys64/mingw64/include/c++/10.1.0/bits/locale_facets.h:41,
            >>                   from
            >> C:/msys64/mingw64/include/c++/10.1.0/bits/basic_ios.h:37,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/ios:44,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/ostream:38,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/iostream:39,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/ioswrap.h:18,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/textctrl.h:33,
            >>                   from
            C:/msys64/mingw64/include/wx-3.0/wx/wx.h:81,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/include/fctsys.h:28,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/dialogs/panel_modedit_defaults.cpp:24:
            >>
            C:/msys64/mingw64/include/c++/10.1.0/x86_64-w64-mingw32/bits/ctype_base.h:42:10:
            >> note: 'std::ctype_base' defined as 'struct' here
            >>     42 |   struct ctype_base
            >>        |          ^~~~~~~~~~
            >> [ 93%] Building CXX object
            >>
            pcbnew/CMakeFiles/pcbnew_kiface_objects.dir/initpcb.cpp.obj
            >> In file included from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/thirdparty/nlohmann_json/nlohmann/json.hpp:70,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/include/settings/json_settings.h:24,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/include/settings/app_settings.h:25,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/pcbnew_settings.h:24,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/dialogs/dialog_update_pcb.cpp:29:
            >> C:/msys64/mingw64/include/c++/10.1.0/valarray:574:20:
            note: replace the
            >> class-key with 'struct'
            >>    574 |       friend class _Array<_Tp>;
            >>        |                    ^~~~~~~~~~~
            >> In file included from
            C:/msys64/mingw64/include/c++/10.1.0/valarray:100,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/thirdparty/nlohmann_json/nlohmann/json.hpp:70,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/include/settings/json_settings.h:24,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/include/settings/app_settings.h:25,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/pcbnew_settings.h:24,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/dialogs/dialog_update_pcb.cpp:29:
            >>
            C:/msys64/mingw64/include/c++/10.1.0/bits/valarray_array.h:396:12:
            note:
            >> 'std::_Array<_Tp>' defined as 'struct' here
            >>    396 |     struct _Array
            >>        |            ^~~~~~
            >> In file included from
            >> C:/msys64/mingw64/include/c++/10.1.0/bits/ios_base.h:46,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/streambuf:41,
            >>                   from
            >>
            C:/msys64/mingw64/include/c++/10.1.0/bits/streambuf_iterator.h:35,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/iterator:66,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/regex:43,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/dialogs/panel_pcbnew_color_settings.cpp:21:
            >>
            C:/msys64/mingw64/include/c++/10.1.0/system_error:54:9:
            note: replace
            >> the class-key with 'struct'
            >>     54 |   class error_code;
            >>        |         ^~~~~~~~~~
            >>
            C:/msys64/mingw64/include/c++/10.1.0/system_error:180:10:
            note:
            >> 'std::error_code' defined as 'struct' here
            >>    180 |   struct error_code
            >>        |          ^~~~~~~~~~
            >>
            C:/msys64/mingw64/include/c++/10.1.0/system_error:55:9:
            note: replace
            >> the class-key with 'struct'
            >>     55 |   class error_condition;
            >>        |         ^~~~~~~~~~~~~~~
            >>
            C:/msys64/mingw64/include/c++/10.1.0/system_error:278:10:
            note:
            >> 'std::error_condition' defined as 'struct' here
            >>    278 |   struct error_condition
            >>        |          ^~~~~~~~~~~~~~~
            >> In file included from
            C:/msys64/mingw64/include/c++/10.1.0/string:43,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/bitset:47,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/regex:39,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/dialogs/panel_pcbnew_color_settings.cpp:21:
            >>
            C:/msys64/mingw64/include/c++/10.1.0/bits/localefwd.h:125:9:
            note:
            >> replace the class-key with 'struct'
            >>    125 |   class ctype_base;
            >>        |         ^~~~~~~~~~
            >> In file included from
            >>
            C:/msys64/mingw64/include/c++/10.1.0/bits/locale_facets.h:41,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/locale:40,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/regex:44,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/dialogs/panel_pcbnew_color_settings.cpp:21:
            >>
            C:/msys64/mingw64/include/c++/10.1.0/x86_64-w64-mingw32/bits/ctype_base.h:42:10:
            >> note: 'std::ctype_base' defined as 'struct' here
            >>     42 |   struct ctype_base
            >>        |          ^~~~~~~~~~
            >> In file included from
            C:/msys64/mingw64/include/c++/10.1.0/string:43,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/bitset:47,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/regex:39,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/dialogs/panel_pcbnew_color_settings.cpp:21:
            >>
            C:/msys64/mingw64/include/c++/10.1.0/bits/localefwd.h:203:9:
            note:
            >> replace the class-key with 'struct'
            >>    203 |   class messages_base;
            >>        |         ^~~~~~~~~~~~~
            >> In file included from
            C:/msys64/mingw64/include/c++/10.1.0/locale:41,
            >>                   from
            C:/msys64/mingw64/include/c++/10.1.0/regex:44,
            >>                   from
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/kicad/pcbnew/dialogs/panel_pcbnew_color_settings.cpp:21:
            >>
            C:/msys64/mingw64/include/c++/10.1.0/bits/locale_facets_nonio.h:1770:10:
            >> note: 'std::messages_base' defined as 'struct' here
            >>   1770 |   struct messages_base
            >>
            >>
            >> Link Errors
            >>
            >> [ 98%] Built target qa_eeschema
            >>
            C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
            >>
            CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj):pcbnew_wrap.cxx:(.text+0x23cd):
            >> undefined reference to `.refptr.PyObject_GenericGetAttr'
            >>
            C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.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&)':
            >> C:/msys64/mingw64/include/c++/10.1.0/stdexcept:174:
            undefined reference
            >> to `.refptr._ZTVSt16invalid_argument'
            >>
            C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
            >>
            CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj):
            in function
            >> `std::_Sp_counted_deleter<NETCLASS*, SWIG_null_deleter,
            >> std::allocator<void>,
            >>
            (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info
            const&)':
            >>
            C:/msys64/mingw64/include/c++/10.1.0/bits/shared_ptr_base.h:490:
            >> undefined reference to `typeinfo for SWIG_null_deleter'
            >>
            C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
            >>
            CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj):
            in function
            >> `swig::traits_from<KIID>::from(KIID const&)':
            >>
            C:/Users/bjpic/KicadWork/FixedFormatting/debug/pcbnew/pcbnew_wrap.cxx:3929:
            >> undefined reference to
            `swig::traits_from_ptr<KIID>::from(KIID*, int)'
            >>
            C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
            >>
            CMakeFiles/pcbnew_kiface.dir/objects.a(pcbnew_wrap.cxx.obj):pcbnew_wrap.cxx:(.rdata$_ZTI17SWIG_null_deleter+0x8):
            >> undefined reference to `typeinfo name for
            SWIG_null_deleter'
            >> collect2.exe: error: ld returned 1 exit status
            >> make[2]: ***
            [pcbnew/CMakeFiles/pcbnew_kiface.dir/build.make:635:
            >> pcbnew/_pcbnew.kiface] Error 1
            >> make[1]: *** [CMakeFiles/Makefile2:3284:
            >> pcbnew/CMakeFiles/pcbnew_kiface.dir/all] Error 2
            >>
            >>
            >>
            >> _______________________________________________
            >> Mailing list: https://launchpad.net/~kicad-developers
            >> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
            <mailto: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
            <mailto: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
        <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
        Unsubscribe : https://launchpad.net/~kicad-developers
        More help   : https://help.launchpad.net/ListHelp


References