Try to build glib in Windows using MSYS2-MinGW64, but failed

How to correctly build glib in Windows? What I tried:

Building Environment

  • OS: Windows 10 20H2
  • Shell: MSYS2-MinGW64
  • Python v3.9.7
  • meson v0.60.3
  • ninja v1.10.2
  • git v2.34.1
  • glib release-v2.71.0 (download from Deployment)

Building Procedures

Just followed README.win32.md

$ cd /e/opensource/glib-2.71.0/
$ meson buildWin
$ cd buildWin/
$ meson compile

The outputs

From meson buildWin (long text warning :frowning: )

The Meson build system
Version: 0.60.3
Source dir: E:/opensource/glib-2.71.0
Build dir: E:/opensource/glib-2.71.0/buildWin
Build type: native build
Project name: glib
Project version: 2.71.0
C compiler for the host machine: cc (gcc 11.2.0 "cc (Rev5, Built by MSYS2 project) 11.2.0")
C linker for the host machine: cc ld.bfd 2.37
C++ compiler for the host machine: c++ (gcc 11.2.0 "c++ (Rev5, Built by MSYS2 project) 11.2.0")
C++ linker for the host machine: c++ ld.bfd 2.37
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -fno-strict-aliasing: YES
Checking if "GNU C visibility attributes test" : compiles: NO
Compiler for C supports arguments -fvisibility=hidden: YES
Message: Enabling various debug infrastructure
Has header "alloca.h" : NO
Has header "crt_externs.h" : NO
Has header "dirent.h" : YES
Has header "float.h" : YES
Has header "fstab.h" : NO
Has header "grp.h" : NO
Has header "inttypes.h" : YES
Has header "limits.h" : YES
Has header "linux/magic.h" : NO
Has header "locale.h" : YES
Has header "mach/mach_time.h" : NO
Has header "memory.h" : YES
Has header "mntent.h" : NO
Has header "poll.h" : NO
Has header "pwd.h" : NO
Has header "sched.h" : YES
Has header "spawn.h" : NO
Has header "stdatomic.h" : YES
Has header "stdint.h" : YES
Has header "stdlib.h" : YES
Has header "string.h" : YES
Has header "strings.h" : YES
Has header "sys/auxv.h" : NO
Has header "sys/event.h" : NO
Has header "sys/filio.h" : NO
Has header "sys/inotify.h" : NO
Has header "sys/mkdev.h" : NO
Has header "sys/mntctl.h" : NO
Has header "sys/mnttab.h" : NO
Has header "sys/mount.h" : NO
Has header "sys/param.h" : YES
Has header "sys/resource.h" : NO
Has header "sys/select.h" : NO
Has header "sys/statfs.h" : NO
Has header "sys/stat.h" : YES
Has header "sys/statvfs.h" : NO
Has header "sys/sysctl.h" : NO
Has header "sys/time.h" : YES
Has header "sys/times.h" : NO
Has header "sys/types.h" : YES
Has header "sys/uio.h" : NO
Has header "sys/vfs.h" : NO
Has header "sys/vfstab.h" : NO
Has header "sys/vmount.h" : NO
Has header "sys/wait.h" : NO
Has header "termios.h" : NO
Has header "unistd.h" : YES
Has header "values.h" : NO
Has header "wchar.h" : YES
Has header "xlocale.h" : NO
Checking if "malloc.h" : compiles: YES
Has header "linux/netlink.h" : NO
Checking if "statx() test" : compiles: NO
Header <locale.h> has symbol "LC_MESSAGES" : NO
Checking whether type "struct stat" has member "st_mtimensec" : NO
Checking whether type "struct stat" has member "st_mtim.tv_nsec" : NO
Checking whether type "struct stat" has member "st_atimensec" : NO
Checking whether type "struct stat" has member "st_atim.tv_nsec" : NO
Checking whether type "struct stat" has member "st_ctimensec" : NO
Checking whether type "struct stat" has member "st_ctim.tv_nsec" : NO
Checking whether type "struct stat" has member "st_birthtime" : NO
Checking whether type "struct stat" has member "st_birthtimensec" : NO
Checking whether type "struct stat" has member "st_birthtim" : NO
Checking whether type "struct stat" has member "st_birthtim.tv_nsec" : NO
Checking whether type "struct stat" has member "st_blksize" : NO
Checking whether type "struct stat" has member "st_blocks" : NO
Checking whether type "struct statfs" has member "f_fstypename" : NO
Checking whether type "struct statfs" has member "f_bavail" : NO
Checking whether type "struct dirent" has member "d_type" : NO
Checking whether type "struct statvfs" has member "f_basetype" : NO
Checking whether type "struct statvfs" has member "f_fstypename" : NO
Checking whether type "struct tm" has member "tm_gmtoff" : NO
Checking whether type "struct tm" has member "__tm_gmtoff" : NO
Compiler for C supports arguments -Wduplicated-branches: YES
Compiler for C supports arguments -Wimplicit-fallthrough: YES
Compiler for C supports arguments -Wmisleading-indentation: YES
Compiler for C supports arguments -Wunused: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Wno-cast-function-type: YES
Compiler for C supports arguments -Wno-pedantic: YES
Compiler for C supports arguments -Wno-format-zero-length: YES
Compiler for C supports arguments -Wno-variadic-macros: YES
Compiler for C supports arguments -Werror=format=2: YES
Compiler for C supports arguments -Werror=init-self: YES
Compiler for C supports arguments -Werror=missing-include-dirs: YES
Compiler for C supports arguments -Werror=pointer-arith: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wno-bad-function-cast: YES
Compiler for C supports arguments -Werror=declaration-after-statement: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C++ supports arguments -Wduplicated-branches: YES
Compiler for C++ supports arguments -Wimplicit-fallthrough: YES
Compiler for C++ supports arguments -Wmisleading-indentation: YES
Compiler for C++ supports arguments -Wunused: YES
Compiler for C++ supports arguments -Wno-unused-parameter: YES
Compiler for C++ supports arguments -Wno-cast-function-type: YES
Compiler for C++ supports arguments -Wno-pedantic: YES
Compiler for C++ supports arguments -Wno-format-zero-length: YES
Compiler for C++ supports arguments -Wno-variadic-macros: YES
Compiler for C++ supports arguments -Werror=format=2: YES
Compiler for C++ supports arguments -Werror=init-self: YES
Compiler for C++ supports arguments -Werror=missing-include-dirs: YES
Compiler for C++ supports arguments -Werror=pointer-arith: YES
Compiler for C supports link arguments -Wl,-z,nodelete: NO
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES
Checking if "building for UWP" : compiles: NO
Library iphlpapi found: YES
Checking for function "if_nametoindex" with dependency -liphlpapi: YES
Checking for function "if_indextoname" with dependency -liphlpapi: YES
Checking for function "close_range" : NO
Checking for function "endmntent" : NO
Checking for function "endservent" : NO
Checking for function "epoll_create" : NO
Checking for function "fallocate" : NO
Checking for function "fchmod" : NO
Checking for function "fchown" : NO
Checking for function "fdwalk" : NO
Checking for function "fsync" : NO
Checking for function "getauxval" : NO
Checking for function "getc_unlocked" : NO
Checking for function "getfsstat" : NO
Checking for function "getgrgid_r" : NO
Checking for function "getmntent_r" : NO
Checking for function "getpwuid_r" : NO
Checking for function "getresuid" : NO
Checking for function "getvfsstat" : NO
Checking for function "gmtime_r" : NO
Checking for function "hasmntopt" : NO
Checking for function "inotify_init1" : NO
Checking for function "issetugid" : NO
Checking for function "kevent" : NO
Checking for function "kqueue" : NO
Checking for function "lchmod" : NO
Checking for function "lchown" : NO
Checking for function "link" : NO
Checking for function "localtime_r" : NO
Checking for function "lstat" : NO
Checking for function "mbrtowc" : YES
Checking for function "memalign" : NO
Checking for function "mmap" : NO
Checking for function "newlocale" : NO
Checking for function "pipe2" : NO
Checking for function "poll" : NO
Checking for function "prlimit" : NO
Checking for function "readlink" : NO
Checking for function "recvmmsg" : NO
Checking for function "sendmmsg" : NO
Checking for function "setenv" : NO
Checking for function "setmntent" : NO
Checking for function "strerror_r" : NO
Checking for function "strnlen" : YES
Checking for function "strsignal" : NO
Checking for function "strtod_l" : NO
Checking for function "strtoll_l" : NO
Checking for function "strtoull_l" : NO
Checking for function "symlink" : NO
Checking for function "timegm" : NO
Checking for function "unsetenv" : NO
Checking for function "uselocale" : NO
Checking for function "utimes" : NO
Checking for function "valloc" : NO
Checking for function "vasprintf" : YES
Checking for function "vsnprintf" : YES
Checking for function "wcrtomb" : YES
Checking for function "wcslen" : YES
Checking for function "wcsnlen" : YES
Checking for function "sysctlbyname" : NO
Checking for function "splice" : NO
Checking for function "posix_spawn" : NO
Checking for function "snprintf" : YES
Checking for function "strcasecmp" : YES
Checking for function "strncasecmp" : YES
Header <sys/sysmacros.h> has symbol "major" : NO
Header <sys/mkdev.h> has symbol "major" : NO
Header <sys/types.h> has symbol "major" : NO
Header <dlfcn.h> has symbol "RTLD_LAZY" : NO
Header <dlfcn.h> has symbol "RTLD_NOW" : NO
Header <dlfcn.h> has symbol "RTLD_GLOBAL" : NO
Header <dlfcn.h> has symbol "RTLD_NEXT" : NO
Message: Checking whether to use statfs or statvfs .. neither
Checking if "futex(2) system call" : links: NO
Checking if "eventfd(2) system call" : links: NO
Checking if "__uint128_t available" : compiles: YES
Checking if "clock_gettime" : links: YES
Checking if "dlopen() and dlsym() in system libraries" : links: NO
Checking if "dlopen() and dlsym() in libdl" : links: NO
Checking if "open() option O_DIRECTORY" : compiles: NO
Checking if "fcntl() option F_FULLFSYNC" : compiles: NO
Checking if "C99 vsnprintf" runs: YES
Checking if "C99 snprintf" runs: YES
Checking if "Unix98 printf positional parameters" runs: NO (1)
Checking if "nl_langinfo and CODESET" : links: NO
Checking if "nl_langinfo (PM_STR)" : links: NO
Checking if "nl_langinfo (_NL_CTYPE_OUTDIGITn_MB)" : links: NO
Checking if "nl_langinfo (ALTMON_n)" : links: NO
Checking if "nl_langinfo (_NL_ABALTMON_n)" : links: NO
Checking if "nl_langinfo and _NL_TIME_CODESET" : links: NO
Checking if "signed" : compiles: YES
Header <stddef.h> has symbol "ptrdiff_t" : YES
Checking if "sig_atomic_t" : links: YES
Checking if "long long" : compiles: YES
Checking if "long double" : compiles: YES
Header <stddef.h> has symbol "wchar_t" : YES
Header <wchar.h> has symbol "wint_t" : YES
Checking if "uintmax_t in inttypes.h" : compiles: YES
Checking if "uintmax_t in stdint.h" : compiles: YES
Checking for size of "char" : 1
Checking for size of "short" : 2
Checking for size of "int" : 4
Checking for size of "void*" : 8
Checking for size of "long" : 4
Checking for size of "long long" : 8
Checking for size of "size_t" : 8
Checking for size of "ssize_t" : 8
Checking for alignment of "char" : 1
Checking for alignment of "short" : 2
Checking for alignment of "int" : 4
Checking for alignment of "void*" : 8
Checking for alignment of "long" : 4
Checking for alignment of "long long" : 8
Checking for alignment of "size_t" : 8
Checking for size of "wchar_t" : 2
Checking if "GCC size_t typedef is long long" : compiles: YES
Checking if "__va_copy check" : compiles: YES
Checking if "va_copy check" : compiles: YES
Checking if "va_lists can be copied as values" runs: YES
Checking if "ISO C99 varargs macros in C" : compiles: YES
Checking if "ISO C99 varargs macros in C++" : compiles: YES
Checking if "GNUC varargs macros" : compiles: YES
Has header "alloca.h" : NO (cached)
Has header "sys/poll.h" : NO
Has header "sys/types.h" : YES (cached)
Has header "winsock2.h" : YES
Computing int of "AF_UNIX" : 1
Computing int of "AF_INET" : 2
Computing int of "AF_INET6" : 23
Computing int of "MSG_OOB" : 1
Computing int of "MSG_PEEK" : 2
Computing int of "MSG_DONTROUTE" : 4
Checking if "atomic ops" : links: YES
Checking if "atomic ops define" : compiles: YES
Checking if "stack grows check" runs: NO (1)
Found pkg-config: D:\msys64\mingw64\bin/pkg-config.EXE (1.8.0)
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libpcre found: NO (tried pkgconfig and cmake)
Run-time dependency libpcre found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency libpcre
Downloading pcre source from https://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.bz2
Download size: 1557603
Downloading: ..........
Downloading pcre patch from https://wrapdb.mesonbuild.com/v2/pcre_8.37-2/get_patch
Download size: 7617
Downloading: ..........

Executing subproject pcre

pcre| Project name: pcre
pcre| Project version: undefined
pcre| C compiler for the host machine: cc (gcc 11.2.0 "cc (Rev5, Built by MSYS2 project) 11.2.0")
pcre| C linker for the host machine: cc ld.bfd 2.37
pcre| Has header "bits/type/traits.h" : NO
pcre| Has header "bzlib.h" : YES
pcre| Has header "dirent.h" : YES (cached)
pcre| Has header "dlfcn.h" : NO
pcre| Has header "editline/readline.h" : NO
pcre| Has header "edit/readline/readline.h" : NO
pcre| Has header "inttypes.h" : YES (cached)
pcre| Has header "limits.h" : YES (cached)
pcre| Has header "memory.h" : YES (cached)
pcre| Has header "readline/history.h" : YES
pcre| Has header "readline/readline.h" : YES
pcre| Has header "stdint.h" : YES (cached)
pcre| Has header "stdlib.h" : YES (cached)
pcre| Has header "strings.h" : YES (cached)
pcre| Has header "string.h" : YES (cached)
pcre| Has header "sys/stat.h" : YES (cached)
pcre| Has header "sys/types.h" : YES (cached)
pcre| Has header "type/traits.h" : NO
pcre| Has header "unistd.h" : YES (cached)
pcre| Has header "windows.h" : YES
pcre| Has header "zlib.h" : YES
pcre| Checking for function "bcopy" : NO
pcre| Checking for function "memmove" : YES
pcre| Checking for function "strerror" : YES
pcre| Checking for function "strtoimax" : YES
pcre| Checking for function "strtoll" : YES
pcre| Checking for function "strtoq" : NO
pcre| Configuring config.h using configuration
pcre| Configuring pcre.h using configuration
pcre| Build targets in project: 5
pcre| Subproject pcre finished.

Dependency libpcre from subproject subprojects/pcre-8.37 found: YES undefined
Library m found: YES
Run-time dependency libffi found: YES 3.3
Run-time dependency zlib found: YES 1.2.11
Checking for function "ngettext" : NO
Library intl found: YES
Checking for function "ngettext" with dependency -lintl: YES
Checking for function "bind_textdomain_codeset" with dependency -lintl: YES
Library ws2_32 found: YES
Checking for function "strlcpy" : NO
Checking if "/proc/self/cmdline" runs: NO (1)
Program python3 found: YES (D:\msys64\mingw64\bin/python3.EXE)
Program bash found: YES (D:\msys64\usr\bin/bash.EXE)
Run-time dependency bash-completion found: NO (tried pkgconfig and cmake)
Program sh found: YES (D:\msys64\usr\bin/sh.EXE)
Program env found: YES (D:\msys64\usr\bin/env.EXE)
Configuring glibconfig.h using configuration
Dependency sysprof-capture-4 skipped: feature sysprof disabled
Checking if "where to find the exponent in a 'double'" runs: YES
Checking if "printf supports large precisions" runs: YES
Checking if "printf survives out-of-memory conditions" runs: DID NOT COMPILE
Checking if "printf supports the zero flag correctly" runs: YES
Checking if "printf supports the left-adjust flag correctly" runs: YES
Checking if "printf supports the grouping flag" runs: YES
Checking if "printf supports the 'a' and 'A' directives" runs: YES
Checking if "printf supports the 'F' directive" runs: YES
Checking if "printf supports the 'ls' directive" runs: YES
Checking if "printf supports 'long double' arguments" runs: YES
Checking if "printf supports infinite 'double' arguments" runs: YES
Checking if "printf supports infinite 'long double' arguments" runs: DID NOT COMPILE
Compiler for C supports arguments -Wno-format-nonliteral: YES
Compiler for C supports arguments -Wno-duplicated-branches: YES
Checking if "frexp works" with dependency -lm runs: YES
Checking if "frexpl works" with dependency -lm runs: YES
Checking if "frexpl prototype can be re-listed" : compiles: YES
Checking if "ldexpl works" with dependency -lm runs: YES
Checking if "ldexpl prototype can be re-listed" : compiles: YES
Configuring gnulib_math.h using configuration
Configuring glib.rc using configuration
Windows resource compiler: GNU windres (GNU Binutils) 2.37
Library winmm found: YES
Configuring gtester-report using configuration
Configuring libglib-2.0.so.0.7100.0-gdb.py using configuration
Configuring gobject.rc using configuration
Configuring glib-genmarshal using configuration
Program glib-genmarshal found: YES (D:/msys64/mingw64/bin/python.exe E:/opensource/glib-2.71.0/buildWin/gobject/glib-genmarshal)
Configuring glib-mkenums using configuration
Program glib-mkenums found: YES (D:/msys64/mingw64/bin/python.exe E:/opensource/glib-2.71.0/buildWin/gobject/glib-mkenums)
Configuring libgobject-2.0.so.0.7100.0-gdb.py using configuration
Configuring gthread.rc using configuration
Configuring gmoduleconf.h using configuration
Configuring gmodule.rc using configuration
Configuring gnetworking.h using configuration
Configuring gdbus-codegen using configuration
Program gdbus-codegen found: YES (D:/msys64/mingw64/bin/python.exe E:/opensource/glib-2.71.0/buildWin/gio/gdbus-2.0/codegen/gdbus-codegen)
Configuring config.py using configuration
Library shlwapi found: YES
Library dnsapi found: YES
Configuring gio.rc using configuration
Message: Found bash-completion but the .pc file did not set 'completionsdir', fallback to a predefined path
Run-time dependency libelf found: NO (tried pkgconfig and cmake)
Library elf found: NO
Library secur32 found: YES
Program gengiotypefuncs.py found: YES (D:/msys64/mingw64/bin/python.exe E:/opensource/glib-2.71.0/gio/tests/gengiotypefuncs.py)
Run-time dependency dbus-1 found: NO (tried pkgconfig and cmake)
Configuring appinfo-test-gnome.desktop using configuration
Configuring appinfo-test-notgnome.desktop using configuration
Configuring appinfo-test.desktop using configuration
Configuring appinfo-test2.desktop using configuration
Program objcopy found: YES (D:\msys64\mingw64\bin/objcopy.EXE)
Program ld found: YES (D:\msys64\mingw64\bin/ld.EXE)
Configuring org.freedesktop.portal.Documents.service using configuration
Configuring org.gtk.GDBus.FakeService.service using configuration
Compiler for C supports arguments -Werror=unused-function: YES
Library FuzzingEngine skipped: feature oss_fuzz disabled
Program xgettext found: YES (D:\msys64\mingw64\bin/xgettext.EXE)
Configuring glib-gettextize using configuration
Configuring config.h using configuration
Build targets in project: 438

glib 2.71.0

  Subprojects
    pcre: YES

Found ninja-1.10.2 at D:\msys64\mingw64\bin/ninja.EXE

From meson compile:

[17/1152] Compiling C object subprojects/pcre-8.37/libpcre.a.p/pcre_study.c.obj
../subprojects/pcre-8.37/pcre_study.c: In function 'set_start_bits':
../subprojects/pcre-8.37/pcre_study.c:1368:35: warning: '<<' in boolean context, did you mean '<'? [-Wint-in-bool-context]
 1368 |               if ((map[c/8] && (1 << (c&7))) != 0)
      |                                ~~~^~~~~~~~~
../subprojects/pcre-8.37/pcre_study.c: In function 'find_minlength':
../subprojects/pcre-8.37/pcre_study.c:115:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
  115 |     if (*cs != OP_ALT)
      |        ^
../subprojects/pcre-8.37/pcre_study.c:124:5: note: here
  124 |     case OP_CBRA:
      |     ^~~~
[31/1152] Compiling C object subprojects/pcre-8.37/libpcre.a.p/pcre_dfa_exec.c.obj
../subprojects/pcre-8.37/pcre_dfa_exec.c: In function 'internal_dfa_exec':
../subprojects/pcre-8.37/pcre_dfa_exec.c:2200:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2200 |         if ((md->moptions & PCRE_BSR_ANYCRLF) != 0) break;
      |            ^
../subprojects/pcre-8.37/pcre_dfa_exec.c:2202:9: note: here
 2202 |         case CHAR_LF:
      |         ^~~~
[38/1152] Compiling C object subprojects/pcre-8.37/libpcre.a.p/pcre_compile.c.obj
../subprojects/pcre-8.37/pcre_compile.c: In function 'compile_branch':
../subprojects/pcre-8.37/pcre_compile.c:7004:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
 7004 |         else if (*ptr != CHAR_LESS_THAN_SIGN)  /* Test for Python-style defn */
      |                 ^
../subprojects/pcre-8.37/pcre_compile.c:7013:9: note: here
 7013 |         DEFINE_NAME:    /* Come here from (?< handling */
      |         ^~~~~~~~~~~
../subprojects/pcre-8.37/pcre_compile.c: In function 'check_escape':
../subprojects/pcre-8.37/pcre_compile.c:1239:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1239 |     if ((c = *ptr) >= CHAR_8) break;
      |        ^
../subprojects/pcre-8.37/pcre_compile.c:1249:5: note: here
 1249 |     case CHAR_0:
      |     ^~~~
../subprojects/pcre-8.37/pcre_compile.c: In function 'compile_regex':
../subprojects/pcre-8.37/pcre_compile.c:4814:29: warning: array subscript -1 is outside array bounds of 'const pcre_uchar[10]' {aka 'const unsigned char[10]'} [-Warray-bounds]
 4814 |       ptr = sub_end_of_word - 1;
      |             ~~~~~~~~~~~~~~~~^~~
../subprojects/pcre-8.37/pcre_compile.c:270:25: note: while referencing 'sub_end_of_word'
  270 | static const pcre_uchar sub_end_of_word[] = {
      |                         ^~~~~~~~~~~~~~~
../subprojects/pcre-8.37/pcre_compile.c:4807:31: warning: array subscript -1 is outside array bounds of 'const pcre_uchar[9]' {aka 'const unsigned char[9]'} [-Warray-bounds]
 4807 |       ptr = sub_start_of_word - 1;
      |             ~~~~~~~~~~~~~~~~~~^~~
../subprojects/pcre-8.37/pcre_compile.c:266:25: note: while referencing 'sub_start_of_word'
  266 | static const pcre_uchar sub_start_of_word[] = {
      |                         ^~~~~~~~~~~~~~~~~
[60/1152] Compiling C object glib/libglib-2.0-0.dll.p/gerror.c.obj
In file included from ../glib/gvalgrind.h:28,
                 from ../glib/gerror.c:502:
../glib/gerror.c: In function 'g_error_allocate':
../glib/valgrind.h:417:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  417 |     _zzq_args[1] = (unsigned long int)(_zzq_arg1);                \
      |                    ^
../glib/valgrind.h:203:15: note: in expansion of macro 'VALGRIND_DO_CLIENT_REQUEST_EXPR'
  203 |   do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                        \
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../glib/valgrind.h:6479:5: note: in expansion of macro 'VALGRIND_DO_CLIENT_REQUEST_STMT'
 6479 |     VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK,       \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../glib/gerror.c:703:7: note: in expansion of macro 'VALGRIND_MALLOCLIKE_BLOCK'
  703 |       VALGRIND_MALLOCLIKE_BLOCK (allocated + private_size, sizeof (GError) + sizeof (gpointer), 0, TRUE);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
../glib/valgrind.h:417:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  417 |     _zzq_args[1] = (unsigned long int)(_zzq_arg1);                \
      |                    ^
../glib/valgrind.h:203:15: note: in expansion of macro 'VALGRIND_DO_CLIENT_REQUEST_EXPR'
  203 |   do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                        \
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../glib/valgrind.h:6479:5: note: in expansion of macro 'VALGRIND_DO_CLIENT_REQUEST_STMT'
 6479 |     VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK,       \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../glib/gerror.c:704:7: note: in expansion of macro 'VALGRIND_MALLOCLIKE_BLOCK'
  704 |       VALGRIND_MALLOCLIKE_BLOCK (allocated + ALIGN_STRUCT (1), private_size - ALIGN_STRUCT (1), 0, TRUE);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
../glib/gerror.c: In function 'g_error_free':
../glib/valgrind.h:417:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  417 |     _zzq_args[1] = (unsigned long int)(_zzq_arg1);                \
      |                    ^
../glib/valgrind.h:203:15: note: in expansion of macro 'VALGRIND_DO_CLIENT_REQUEST_EXPR'
  203 |   do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                        \
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../glib/valgrind.h:6493:5: note: in expansion of macro 'VALGRIND_DO_CLIENT_REQUEST_STMT'
 6493 |     VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__FREELIKE_BLOCK,         \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../glib/gerror.c:865:7: note: in expansion of macro 'VALGRIND_FREELIKE_BLOCK'
  865 |       VALGRIND_FREELIKE_BLOCK (allocated + ALIGN_STRUCT (1), 0);
      |       ^~~~~~~~~~~~~~~~~~~~~~~
../glib/valgrind.h:417:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  417 |     _zzq_args[1] = (unsigned long int)(_zzq_arg1);                \
      |                    ^
../glib/valgrind.h:203:15: note: in expansion of macro 'VALGRIND_DO_CLIENT_REQUEST_EXPR'
  203 |   do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                        \
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../glib/valgrind.h:6493:5: note: in expansion of macro 'VALGRIND_DO_CLIENT_REQUEST_STMT'
 6493 |     VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__FREELIKE_BLOCK,         \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../glib/gerror.c:866:7: note: in expansion of macro 'VALGRIND_FREELIKE_BLOCK'
  866 |       VALGRIND_FREELIKE_BLOCK (error, 0);
      |       ^~~~~~~~~~~~~~~~~~~~~~~
[71/1152] Compiling C object subprojects/pcre-8.37/libpcre.a.p/pcre_exec.c.obj
../subprojects/pcre-8.37/pcre_exec.c: In function 'match':
../subprojects/pcre-8.37/pcre_exec.c:1629:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1629 |         if (md->start_match_ptr < next &&
      |            ^
../subprojects/pcre-8.37/pcre_exec.c:1642:9: note: here
 1642 |         case MATCH_COMMIT:
      |         ^~~~
../subprojects/pcre-8.37/pcre_exec.c:968:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
  968 |     if (offset < md->offset_max)
      |        ^
../subprojects/pcre-8.37/pcre_exec.c:1056:5: note: here
 1056 |     case OP_ONCE:
      |     ^~~~
../subprojects/pcre-8.37/pcre_exec.c:2079:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2079 |     if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH);
      |        ^
../subprojects/pcre-8.37/pcre_exec.c:2083:5: note: here
 2083 |     case OP_SOD:
      |     ^~~~
../subprojects/pcre-8.37/pcre_exec.c:2145:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2145 |     if (!md->endonly) goto ASSERT_NL_OR_EOS;
      |        ^
../subprojects/pcre-8.37/pcre_exec.c:2151:5: note: here
 2151 |     case OP_EOD:
      |     ^~~~
[128/1152] Compiling C object glib/tests/array-test.exe.p/array-test.c.obj
FAILED: glib/tests/array-test.exe.p/array-test.c.obj
"cc" "-Iglib/tests/array-test.exe.p" "-Iglib/tests" "-I../glib/tests" "-I." "-I.." "-Iglib" "-I../glib" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-Wextra" "-Wpedantic" "-std=gnu99" "-O2" "-g" "-D_GNU_SOURCE" "-fno-strict-aliasing" "-DG_ENABLE_DEBUG" "-Wduplicated-branches" "-Wimplicit-fallthrough" "-Wmisleading-indentation" "-Wunused" "-Wno-unused-parameter" "-Wno-cast-function-type" "-Wno-pedantic" "-Wno-format-zero-length" "-Wno-variadic-macros" "-Werror=format=2" "-Werror=init-self" "-Werror=missing-include-dirs" "-Werror=pointer-arith" "-Wstrict-prototypes" "-Wno-bad-function-cast" "-Werror=declaration-after-statement" "-Werror=implicit-function-declaration" "-Werror=missing-prototypes" "-mms-bitfields" "-DG_LOG_DOMAIN=\"GLib\"" "-UG_DISABLE_ASSERT" -MD -MQ glib/tests/array-test.exe.p/array-test.c.obj -MF "glib/tests/array-test.exe.p/array-test.c.obj.d" -o glib/tests/array-test.exe.p/array-test.c.obj "-c" ../glib/tests/array-test.c
In file included from ../glib/gtypes.h:32,
                 from ../glib/galloca.h:32,
                 from ../glib/glib.h:30,
                 from ../glib/tests/array-test.c:30:
../glib/tests/array-test.c: In function 'byte_array_new_take_overflow':
glib/glibconfig.h:65:51: error: missing binary operator before token "("
   65 | #define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))
      |                                                   ^
../glib/gtypes.h:101:25: note: in expansion of macro 'G_GUINT64_CONSTANT'
  101 | #define G_MAXUINT64     G_GUINT64_CONSTANT(0xffffffffffffffff)
      |                         ^~~~~~~~~~~~~~~~~~
glib/glibconfig.h:84:25: note: in expansion of macro 'G_MAXUINT64'
   84 | #define G_MAXSIZE       G_MAXUINT64
      |                         ^~~~~~~~~~~
../glib/tests/array-test.c:1688:5: note: in expansion of macro 'G_MAXSIZE'
 1688 | #if G_MAXSIZE <= G_MAXUINT
      |     ^~~~~~~~~
[145/1152] Compiling C object glib/tests/fileutils.exe.p/fileutils.c.obj
ninja: build stopped: subcommand failed.

Would you compile it with GCC version 10.X?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.