undefined reference to `__stack_chk_fail' in GCC 10.2 under debug and release mode
OS: Windows 7 x64(6.1.7601) + MSYS2 GCC: 10.2.0 Ver: 3.34.0
Failed to complile, the output error message in meson debug and release mode:
[1/4] Linking target src/libtemplate_glib-1.0-0.dll
FAILED: src/libtemplate_glib-1.0-0.dll
cc @src/libtemplate_glib-1.0-0.dll.rsp
C:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/25a6634@@template_glib-1.0@sha/meson-generated_.._tmpl-expr-parser.c.obj: in function `yysyntax_error':
D:\Codelabs\GitHub\template-glib\build/src/tmpl-expr-parser.c:1245: undefined reference to `__stack_chk_fail'
C:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/25a6634@@template_glib-1.0@sha/meson-generated_.._tmpl-expr-parser.c.obj: in function `tmpl_expr_parser_parse':
D:\Codelabs\GitHub\template-glib\build/src/tmpl-expr-parser.c:2065: undefined reference to `__stack_chk_fail'
C:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/25a6634@@template_glib-1.0@sha/meson-generated_.._tmpl-expr-parser.c.obj:tmpl-expr-parser.c:(.rdata$.refptr.__stack_chk_guard[.refptr.__stack_chk_guard]+0x0): undefined reference to `__stack_chk_guard'
C:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/25a6634@@template_glib-1.0@sha/meson-generated_.._tmpl-expr-scanner.c.obj: in function `printf':
C:/msys/mingw64/x86_64-w64-mingw32/include/stdio.h:361: undefined reference to `__stack_chk_fail'
C:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/25a6634@@template_glib-1.0@sha/meson-generated_.._tmpl-expr-scanner.c.obj: in function `fprintf':
C:/msys/mingw64/x86_64-w64-mingw32/include/stdio.h:350: undefined reference to `__stack_chk_fail'
C:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/25a6634@@template_glib-1.0@sha/tmpl-expr.c.obj: in function `tmpl_expr_from_string':
D:\Codelabs\GitHub\template-glib\build/../src/tmpl-expr.c:351: undefined reference to `__stack_chk_fail'
C:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/25a6634@@template_glib-1.0@sha/tmpl-scope.c.obj: in function `tmpl_scope_get_full':
D:\Codelabs\GitHub\template-glib\build/../src/tmpl-scope.c:152: undefined reference to `__stack_chk_fail'
C:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/25a6634@@template_glib-1.0@sha/tmpl-symbol.c.obj: in function `tmpl_symbol_assign_boolean':
D:\Codelabs\GitHub\template-glib\build/../src/tmpl-symbol.c:195: undefined reference to `__stack_chk_fail'
C:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/25a6634@@template_glib-1.0@sha/tmpl-symbol.c.obj:D:\Codelabs\GitHub\template-glib\build/../src/tmpl-symbol.c:209: more undefined references to `__stack_chk_fail' follow
collect2.exe: error: ld returned 1 exit status
Compile pass, the output error message in meson plain mode:
[29/32] Linking target src/libtemplate_glib-1.0-0.dll
[30/32] Generating Template-1.0.gir with a custom command
g-ir-scanner: link: gcc -o D:/Codelabs/GitHub/template-glib/build/tmp-introspectqz55chuo/Template-1.0.exe D:/Codelabs/GitHub/template-glib/build/tmp-introspectqz55chuo/Template-1.0.o -LD:/Codelabs/GitHub/template-glib/build/src -Wl,-rpath,D:/Codelabs/GitHub/template-glib/build/src -LD:/Codelabs/GitHub/template-glib/build/src -Wl,-rpath,D:/Codelabs/GitHub/template-glib/build/src -LC:/msys/mingw64/lib -Wl,-rpath,C:/msys/mingw64/lib -ltemplate_glib-1.0 -ltemplate_glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lgirepository-1.0 -lm -LC:/msys/mingw64/lib -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -pthread -lglib-2.0 -lintl
src/tmpl-version.h:27: Error: Template: identifier not found on the first line:
^
src/tmpl-version.h:30: Warning: Template: "@short_description" parameter unexpected at this location:
* @short_description: Dazzle version checking
^
src/tmpl-version.h:34: Error: Template: identifier not found on the first line:
^
src/tmpl-version.h:41: Error: Template: identifier not found on the first line:
^
src/tmpl-version.h:48: Error: Template: identifier not found on the first line:
^
src/tmpl-version.h:55: Error: Template: identifier not found on the first line:
^
src/tmpl-version.h:62: Error: Template: identifier not found on the first line:
^
src/tmpl-version.h:73: Error: Template: identifier not found on the first line:
^
src/tmpl-version.h:82: Error: Template: identifier not found on the first line:
^
src/tmpl-version.h:85: Warning: Template: "@major" parameter unexpected at this location:
* @major: required major version
^
src/tmpl-version.h:87: Warning: Template: "@minor" parameter unexpected at this location:
* @minor: required minor version
^
src/tmpl-version.h:89: Warning: Template: "@micro" parameter unexpected at this location:
* @micro: required micro version
^
../src/tmpl-version-macros.h:63: Error: Template: identifier not found on the first line:
^
../src/tmpl-version-macros.h:84: Error: Template: identifier not found on the first line:
^
[31/32] Generating template-glib-1.0.vapi with a custom command
[32/32] Generating Template-1.0.typelib with a custom command