Compilation fails on MinGW64
I can not compile libhandy on MinGW64 due to an undefined reference to '__stack_chk_fail
error
Ninja ouput
Build targets in project: 23
Found ninja-1.8.2 at 'C:\msys64\mingw64\bin/ninja.EXE'
ninja: Entering directory `_build'
[1/14] Generating xmllint with a custom command.
[2/14] Linking target src/libhandy-0.0-0.dll.
FAILED: src/libhandy-0.0-0.dll
cc @src/libhandy-0.0-0.dll.rsp
src/25a6634@@handy-0.0@sha/hdy-arrows.c.obj: In function `get_thickness':
C:\msys64\home\user\libhandy\_build/../src/hdy-arrows.c:208: undefined reference to `__stack_chk_fail'
src/25a6634@@handy-0.0@sha/hdy-arrows.c.obj: In function `map_cb':
C:\msys64\home\user\libhandy\_build/../src/hdy-arrows.c:156: undefined reference to `__stack_chk_fail'
src/25a6634@@handy-0.0@sha/hdy-arrows.c.obj: In function `draw_cb':
C:\msys64\home\user\libhandy\_build/../src/hdy-arrows.c:289: undefined reference to `__stack_chk_fail'
src/25a6634@@handy-0.0@sha/hdy-column.c.obj: In function `get_child_width':
C:\msys64\home\user\libhandy\_build/../src/hdy-column.c:127: undefined reference to `__stack_chk_fail'
src/25a6634@@handy-0.0@sha/hdy-column.c.obj: In function `hdy_column_size_allocate':
C:\msys64\home\user\libhandy\_build/../src/hdy-column.c:232: undefined reference to `__stack_chk_fail'
src/25a6634@@handy-0.0@sha/hdy-dialer-button.c.obj:C:\msys64\home\user\libhandy\_build/../src/hdy-dialer-button.c:137: more undefined references to `__stack_chk_fail' follow
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Meson output
The Meson build system
Version: 0.49.0
Source dir: C:/msys64/home/user/libhandy
Build dir: C:/msys64/home/user/libhandy/_build
Build type: native build
Project name: libhandy
Project version: 0.0.5
Native C compiler: cc (gcc 8.2.1 "cc (Rev1, Built by MSYS2 project) 8.2.1 20181207")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Configuring config.h using configuration
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wdate-time: YES
Compiler for C supports arguments -Wdeclaration-after-statement: YES
Compiler for C supports arguments -Werror=format-security -Werror=format=2: YES
Compiler for C supports arguments -Wendif-labels: YES
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES
Compiler for C supports arguments -Werror=missing-declarations: YES
Compiler for C supports arguments -Werror=overflow: YES
Compiler for C supports arguments -Werror=return-type: YES
Compiler for C supports arguments -Werror=shift-count-overflow: YES
Compiler for C supports arguments -Werror=shift-overflow=2: YES
Compiler for C supports arguments -Werror=implicit-fallthrough=3: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wmaybe-uninitialized: YES
Compiler for C supports arguments -Wmissing-field-initializers: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wmissing-noreturn: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wno-missing-field-initializers -Wmissing-field-initializers: YES
Compiler for C supports arguments -Wno-sign-compare -Wsign-compare: YES
Compiler for C supports arguments -Wno-strict-aliasing -Wstrict-aliasing: YES
Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wswitch-default: YES
Compiler for C supports arguments -Wswitch-enum: YES
Compiler for C supports arguments -Wtype-limits: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wunused-function: YES
Compiler for C supports arguments -fstack-protector-strong: YES
Found pkg-config: C:\msys64\mingw64\bin/pkg-config.EXE (0.29.2)
Configuring hdy-version.h using configuration
Program sed found: YES (C:\msys64\usr\bin/sed.EXE)
Program gen-public-types.sh found: YES (sh C:/msys64/home/user/libhandy/src/gen-public-types.sh)
Dependency glib-2.0 found: YES (cached)
Dependency gio-2.0 found: YES (cached)
Dependency gmodule-2.0 found: YES (cached)
Dependency gtk+-3.0 found: YES (cached)
Library m found: YES
Library rt found: NO
Checking if "ld_supports_version_script" links: YES
WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to 'test-arrows'
WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to 'test-dialer'
WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to 'test-dialer-cycle-button'
WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to 'test-header-group'
WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to 'test-search-bar'
WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to 'test-string-utf8'
Dependency gladeui-2.0 found: YES (cached)
Program xmllint found: YES (C:\msys64\mingw64\bin/xmllint.EXE)
Configuring run using configuration
Message:
------
Handy 0 (0.0)
Tests: true
Examples: true
Documentation: false
Introspection: true
Vapi: true
Glade Catalog: true
------
How to reproduce?
Just try to compile libhandy on MinGW.