Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Glib] Upgrade to 2.74.0 #5539

Merged
merged 13 commits into from
Sep 28, 2022
Merged

[Glib] Upgrade to 2.74.0 #5539

merged 13 commits into from
Sep 28, 2022

Conversation

lucifer1004
Copy link
Contributor

No description provided.

@lucifer1004
Copy link
Contributor Author

Glib >= 2.69.1 is required by the latest libsoup (3.2.0).

@giordano
Copy link
Member

giordano commented Sep 27, 2022

The error on macOS is quite weird:

[22:30:34] [321/657] /opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11/aarch64-apple-darwin20-cc  -o glib/libglib-2.0.0.dylib glib/libglib-2.0.0.dylib.p/deprecated_gallocator.c.o glib/libglib-2.0.0.dylib.p/deprecated_gcache.c.o glib/libglib-2.0.0.dylib.p/deprecated_gcompletion.c.o glib/libglib-2.0.0.dylib.p/deprecated_grel.c.o glib/libglib-2.0.0.dylib.p/deprecated_gthread-deprecated.c.o glib/libglib-2.0.0.dylib.p/garcbox.c.o glib/libglib-2.0.0.dylib.p/garray.c.o glib/libglib-2.0.0.dylib.p/gasyncqueue.c.o glib/libglib-2.0.0.dylib.p/gatomic.c.o glib/libglib-2.0.0.dylib.p/gbacktrace.c.o glib/libglib-2.0.0.dylib.p/gbase64.c.o glib/libglib-2.0.0.dylib.p/gbitlock.c.o glib/libglib-2.0.0.dylib.p/gbookmarkfile.c.o glib/libglib-2.0.0.dylib.p/gbytes.c.o glib/libglib-2.0.0.dylib.p/gcharset.c.o glib/libglib-2.0.0.dylib.p/gchecksum.c.o glib/libglib-2.0.0.dylib.p/gconvert.c.o glib/libglib-2.0.0.dylib.p/gdataset.c.o glib/libglib-2.0.0.dylib.p/gdate.c.o glib/libglib-2.0.0.dylib.p/gdatetime.c.o glib/libglib-2.0.0.dylib.p/gdir.c.o glib/libglib-2.0.0.dylib.p/genviron.c.o glib/libglib-2.0.0.dylib.p/gerror.c.o glib/libglib-2.0.0.dylib.p/gfileutils.c.o glib/libglib-2.0.0.dylib.p/ggettext.c.o glib/libglib-2.0.0.dylib.p/ghash.c.o glib/libglib-2.0.0.dylib.p/ghmac.c.o glib/libglib-2.0.0.dylib.p/ghook.c.o glib/libglib-2.0.0.dylib.p/ghostutils.c.o glib/libglib-2.0.0.dylib.p/giochannel.c.o glib/libglib-2.0.0.dylib.p/gkeyfile.c.o glib/libglib-2.0.0.dylib.p/glib-init.c.o glib/libglib-2.0.0.dylib.p/glib-private.c.o glib/libglib-2.0.0.dylib.p/glist.c.o glib/libglib-2.0.0.dylib.p/gmain.c.o glib/libglib-2.0.0.dylib.p/gmappedfile.c.o glib/libglib-2.0.0.dylib.p/gmarkup.c.o glib/libglib-2.0.0.dylib.p/gmem.c.o glib/libglib-2.0.0.dylib.p/gmessages.c.o glib/libglib-2.0.0.dylib.p/gnode.c.o glib/libglib-2.0.0.dylib.p/goption.c.o glib/libglib-2.0.0.dylib.p/gpattern.c.o glib/libglib-2.0.0.dylib.p/gpoll.c.o glib/libglib-2.0.0.dylib.p/gprimes.c.o glib/libglib-2.0.0.dylib.p/gqsort.c.o glib/libglib-2.0.0.dylib.p/gquark.c.o glib/libglib-2.0.0.dylib.p/gqueue.c.o glib/libglib-2.0.0.dylib.p/grand.c.o glib/libglib-2.0.0.dylib.p/grcbox.c.o glib/libglib-2.0.0.dylib.p/grefcount.c.o glib/libglib-2.0.0.dylib.p/grefstring.c.o glib/libglib-2.0.0.dylib.p/gregex.c.o glib/libglib-2.0.0.dylib.p/gscanner.c.o glib/libglib-2.0.0.dylib.p/gsequence.c.o glib/libglib-2.0.0.dylib.p/gshell.c.o glib/libglib-2.0.0.dylib.p/gslice.c.o glib/libglib-2.0.0.dylib.p/gslist.c.o glib/libglib-2.0.0.dylib.p/gstdio.c.o glib/libglib-2.0.0.dylib.p/gstrfuncs.c.o glib/libglib-2.0.0.dylib.p/gstring.c.o glib/libglib-2.0.0.dylib.p/gstringchunk.c.o glib/libglib-2.0.0.dylib.p/gstrvbuilder.c.o glib/libglib-2.0.0.dylib.p/gtestutils.c.o glib/libglib-2.0.0.dylib.p/gthread.c.o glib/libglib-2.0.0.dylib.p/gthreadpool.c.o glib/libglib-2.0.0.dylib.p/gtimer.c.o glib/libglib-2.0.0.dylib.p/gtimezone.c.o glib/libglib-2.0.0.dylib.p/gtrace.c.o glib/libglib-2.0.0.dylib.p/gtranslit.c.o glib/libglib-2.0.0.dylib.p/gtrashstack.c.o glib/libglib-2.0.0.dylib.p/gtree.c.o glib/libglib-2.0.0.dylib.p/guniprop.c.o glib/libglib-2.0.0.dylib.p/gutf8.c.o glib/libglib-2.0.0.dylib.p/gunibreak.c.o glib/libglib-2.0.0.dylib.p/gunicollate.c.o glib/libglib-2.0.0.dylib.p/gunidecomp.c.o glib/libglib-2.0.0.dylib.p/guri.c.o glib/libglib-2.0.0.dylib.p/gutils.c.o glib/libglib-2.0.0.dylib.p/guuid.c.o glib/libglib-2.0.0.dylib.p/gvariant.c.o glib/libglib-2.0.0.dylib.p/gvariant-core.c.o glib/libglib-2.0.0.dylib.p/gvariant-parser.c.o glib/libglib-2.0.0.dylib.p/gvariant-serialiser.c.o glib/libglib-2.0.0.dylib.p/gvarianttypeinfo.c.o glib/libglib-2.0.0.dylib.p/gvarianttype.c.o glib/libglib-2.0.0.dylib.p/gversion.c.o glib/libglib-2.0.0.dylib.p/gwakeup.c.o glib/libglib-2.0.0.dylib.p/gprintf.c.o glib/libglib-2.0.0.dylib.p/glib-unix.c.o glib/libglib-2.0.0.dylib.p/gspawn.c.o glib/libglib-2.0.0.dylib.p/giounix.c.o glib/libglib-2.0.0.dylib.p/gosxutils.m.o glib/libglib-2.0.0.dylib.p/gthread-posix.c.o -L/workspace/destdir/lib -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -shared -install_name @rpath/libglib-2.0.0.dylib -compatibility_version 7401 -current_version 7401.0 -Wl,-rpath,@loader_path/../subprojects/pcre2-10.40 glib/libcharset/libcharset.a subprojects/pcre2-10.40/libpcre2-8.dylib -lintl -liconv -framework Foundation -framework CoreFoundation -framework AppKit -framework Carbon -lm
[22:30:34] [322/657] /opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11/aarch64-apple-darwin20-clang  -o subprojects/pcre2-10.40/pcre2grep subprojects/pcre2-10.40/pcre2grep.p/src_pcre2grep.c.o -L/workspace/destdir/lib -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -Wl,-rpath,@loader_path/ subprojects/pcre2-10.40/libpcre2-8.dylib
[22:30:34] [323/657] /opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11/aarch64-apple-darwin20-clang  -o subprojects/pcre2-10.40/libpcre2-posix.dylib subprojects/pcre2-10.40/libpcre2-posix.dylib.p/src_pcre2posix.c.o -L/workspace/destdir/lib -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -shared -install_name @rpath/libpcre2-posix.dylib -Wl,-rpath,@loader_path/ subprojects/pcre2-10.40/libpcre2-8.dylib
[22:30:34] ninja: job failed: /opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11/aarch64-apple-darwin20-cc  -o glib/libglib-2.0.0.dylib glib/libglib-2.0.0.dylib.p/deprecated_gallocator.c.o glib/libglib-2.0.0.dylib.p/deprecated_gcache.c.o glib/libglib-2.0.0.dylib.p/deprecated_gcompletion.c.o glib/libglib-2.0.0.dylib.p/deprecated_grel.c.o glib/libglib-2.0.0.dylib.p/deprecated_gthread-deprecated.c.o glib/libglib-2.0.0.dylib.p/garcbox.c.o glib/libglib-2.0.0.dylib.p/garray.c.o glib/libglib-2.0.0.dylib.p/gasyncqueue.c.o glib/libglib-2.0.0.dylib.p/gatomic.c.o glib/libglib-2.0.0.dylib.p/gbacktrace.c.o glib/libglib-2.0.0.dylib.p/gbase64.c.o glib/libglib-2.0.0.dylib.p/gbitlock.c.o glib/libglib-2.0.0.dylib.p/gbookmarkfile.c.o glib/libglib-2.0.0.dylib.p/gbytes.c.o glib/libglib-2.0.0.dylib.p/gcharset.c.o glib/libglib-2.0.0.dylib.p/gchecksum.c.o glib/libglib-2.0.0.dylib.p/gconvert.c.o glib/libglib-2.0.0.dylib.p/gdataset.c.o glib/libglib-2.0.0.dylib.p/gdate.c.o glib/libglib-2.0.0.dylib.p/gdatetime.c.o glib/libglib-2.0.0.dylib.p/gdir.c.o glib/libglib-2.0.0.dylib.p/genviron.c.o glib/libglib-2.0.0.dylib.p/gerror.c.o glib/libglib-2.0.0.dylib.p/gfileutils.c.o glib/libglib-2.0.0.dylib.p/ggettext.c.o glib/libglib-2.0.0.dylib.p/ghash.c.o glib/libglib-2.0.0.dylib.p/ghmac.c.o glib/libglib-2.0.0.dylib.p/ghook.c.o glib/libglib-2.0.0.dylib.p/ghostutils.c.o glib/libglib-2.0.0.dylib.p/giochannel.c.o glib/libglib-2.0.0.dylib.p/gkeyfile.c.o glib/libglib-2.0.0.dylib.p/glib-init.c.o glib/libglib-2.0.0.dylib.p/glib-private.c.o glib/libglib-2.0.0.dylib.p/glist.c.o glib/libglib-2.0.0.dylib.p/gmain.c.o glib/libglib-2.0.0.dylib.p/gmappedfile.c.o glib/libglib-2.0.0.dylib.p/gmarkup.c.o glib/libglib-2.0.0.dylib.p/gmem.c.o glib/libglib-2.0.0.dylib.p/gmessages.c.o glib/libglib-2.0.0.dylib.p/gnode.c.o glib/libglib-2.0.0.dylib.p/goption.c.o glib/libglib-2.0.0.dylib.p/gpattern.c.o glib/libglib-2.0.0.dylib.p/gpoll.c.o glib/libglib-2.0.0.dylib.p/gprimes.c.o glib/libglib-2.0.0.dylib.p/gqsort.c.o glib/libglib-2.0.0.dylib.p/gquark.c.o glib/libglib-2.0.0.dylib.p/gqueue.c.o glib/libglib-2.0.0.dylib.p/grand.c.o glib/libglib-2.0.0.dylib.p/grcbox.c.o glib/libglib-2.0.0.dylib.p/grefcount.c.o glib/libglib-2.0.0.dylib.p/grefstring.c.o glib/libglib-2.0.0.dylib.p/gregex.c.o glib/libglib-2.0.0.dylib.p/gscanner.c.o glib/libglib-2.0.0.dylib.p/gsequence.c.o glib/libglib-2.0.0.dylib.p/gshell.c.o glib/libglib-2.0.0.dylib.p/gslice.c.o glib/libglib-2.0.0.dylib.p/gslist.c.o glib/libglib-2.0.0.dylib.p/gstdio.c.o glib/libglib-2.0.0.dylib.p/gstrfuncs.c.o glib/libglib-2.0.0.dylib.p/gstring.c.o glib/libglib-2.0.0.dylib.p/gstringchunk.c.o glib/libglib-2.0.0.dylib.p/gstrvbuilder.c.o glib/libglib-2.0.0.dylib.p/gtestutils.c.o glib/libglib-2.0.0.dylib.p/gthread.c.o glib/libglib-2.0.0.dylib.p/gthreadpool.c.o glib/libglib-2.0.0.dylib.p/gtimer.c.o glib/libglib-2.0.0.dylib.p/gtimezone.c.o glib/libglib-2.0.0.dylib.p/gtrace.c.o glib/libglib-2.0.0.dylib.p/gtranslit.c.o glib/libglib-2.0.0.dylib.p/gtrashstack.c.o glib/libglib-2.0.0.dylib.p/gtree.c.o glib/libglib-2.0.0.dylib.p/guniprop.c.o glib/libglib-2.0.0.dylib.p/gutf8.c.o glib/libglib-2.0.0.dylib.p/gunibreak.c.o glib/libglib-2.0.0.dylib.p/gunicollate.c.o glib/libglib-2.0.0.dylib.p/gunidecomp.c.o glib/libglib-2.0.0.dylib.p/guri.c.o glib/libglib-2.0.0.dylib.p/gutils.c.o glib/libglib-2.0.0.dylib.p/guuid.c.o glib/libglib-2.0.0.dylib.p/gvariant.c.o glib/libglib-2.0.0.dylib.p/gvariant-core.c.o glib/libglib-2.0.0.dylib.p/gvariant-parser.c.o glib/libglib-2.0.0.dylib.p/gvariant-serialiser.c.o glib/libglib-2.0.0.dylib.p/gvarianttypeinfo.c.o glib/libglib-2.0.0.dylib.p/gvarianttype.c.o glib/libglib-2.0.0.dylib.p/gversion.c.o glib/libglib-2.0.0.dylib.p/gwakeup.c.o glib/libglib-2.0.0.dylib.p/gprintf.c.o glib/libglib-2.0.0.dylib.p/glib-unix.c.o glib/libglib-2.0.0.dylib.p/gspawn.c.o glib/libglib-2.0.0.dylib.p/giounix.c.o glib/libglib-2.0.0.dylib.p/gosxutils.m.o glib/libglib-2.0.0.dylib.p/gthread-posix.c.o -L/workspace/destdir/lib -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -shared -install_name @rpath/libglib-2.0.0.dylib -compatibility_version 7401 -current_version 7401.0 -Wl,-rpath,@loader_path/../subprojects/pcre2-10.40 glib/libcharset/libcharset.a subprojects/pcre2-10.40/libpcre2-8.dylib -lintl -liconv -framework Foundation -framework CoreFoundation -framework AppKit -framework Carbon -lm
[22:30:34] ld: warning: ignoring file glib/libcharset/libcharset.a, building for macOS-arm64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x74 0x68 0x69 0x6E 0x3E 0x0A 0x2F 0x20 0x20 0x20 0x20 0x20 0x20 0x20 )
[22:30:34] Undefined symbols for architecture arm64:
[22:30:34]   "__g_locale_charset_raw", referenced from:
[22:30:34]       _g_get_charset in gcharset.c.o
[22:30:34]       __g_get_time_charset in gcharset.c.o
[22:30:34]   "__g_locale_charset_unalias", referenced from:
[22:30:34]       _g_get_charset in gcharset.c.o
[22:30:34]       __g_get_time_charset in gcharset.c.o
[22:30:34]       __g_get_ctype_charset in gcharset.c.o
[22:30:34]   "__g_locale_get_charset_aliases", referenced from:
[22:30:34]       __g_charset_get_aliases in gcharset.c.o
[22:30:34] ld: symbol(s) not found for architecture arm64
[22:30:34] clang-13: error: linker command failed with exit code 1 (use -v to see invocation)

I'm not quite sure what's wrong with the glib/libcharset/libcharset.a file.

@giordano
Copy link
Member

Even more interesting, on my system I get a different error:

[23:37:04] [200/657] /opt/bin/x86_64-apple-darwin14-libgfortran5-cxx11/x86_64-apple-darwin14-clang -Igio/libgio-2.0.0.dylib.p -Igio -I../gio -I. -I.. -Iglib -I../glib -Igobject -I../gobject -Igmodule -I../gmodule -Isubprojects/gvdb -I../subprojects/gvdb -I/workspace/destdir/include -fcolor-diagnostics -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O3 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -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 -Werror=unused-result -Wstrict-prototypes -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign '-DG_LOG_DOMAIN="GLib-GIO"' -DGIO_COMPILATION '-DGIO_LAUNCH_DESKTOP="/workspace/destdir/libexec/gio-launch-desktop"' '-DGIO_MODULE_DIR="/workspace/destdir/lib/gio/modules"' '-DLOCALSTATEDIR="/workspace/destdir/var"' -fvisibility=hidden -MD -MQ gio/libgio-2.0.0.dylib.p/glocalfile.c.o -MF gio/libgio-2.0.0.dylib.p/glocalfile.c.o.d -o gio/libgio-2.0.0.dylib.p/glocalfile.c.o -c ../gio/glocalfile.c
[23:37:04] ninja: job failed: /opt/bin/x86_64-apple-darwin14-libgfortran5-cxx11/x86_64-apple-darwin14-clang -Igio/libgio-2.0.0.dylib.p -Igio -I../gio -I. -I.. -Iglib -I../glib -Igobject -I../gobject -Igmodule -I../gmodule -Isubprojects/gvdb -I../subprojects/gvdb -I/workspace/destdir/include -fcolor-diagnostics -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O3 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -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 -Werror=unused-result -Wstrict-prototypes -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign '-DG_LOG_DOMAIN="GLib-GIO"' -DGIO_COMPILATION '-DGIO_LAUNCH_DESKTOP="/workspace/destdir/libexec/gio-launch-desktop"' '-DGIO_MODULE_DIR="/workspace/destdir/lib/gio/modules"' '-DLOCALSTATEDIR="/workspace/destdir/var"' -fvisibility=hidden -MD -MQ gio/libgio-2.0.0.dylib.p/glocalfileinfo.c.o -MF gio/libgio-2.0.0.dylib.p/glocalfileinfo.c.o.d -o gio/libgio-2.0.0.dylib.p/glocalfileinfo.c.o -c ../gio/glocalfileinfo.c
[23:37:04] ../gio/glocalfileinfo.c:2803:9: error: implicit declaration of function 'utimensat' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
[23:37:04]   res = utimensat (AT_FDCWD, filename, times_n, 0);
[23:37:04]         ^
[23:37:04] ../gio/glocalfileinfo.c:2803:9: note: did you mean 'utimes'?
[23:37:04] /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/usr/include/sys/time.h:202:5: note: 'utimes' declared here
[23:37:04] int     utimes(const char *, const struct timeval *);
[23:37:04]         ^
[23:37:04] ../gio/glocalfileinfo.c:2803:40: error: use of undeclared identifier 'times_n'; did you mean 'times'?
[23:37:04]   res = utimensat (AT_FDCWD, filename, times_n, 0);
[23:37:04]                                        ^~~~~~~
[23:37:04]                                        times
[23:37:04] ../gio/glocalfileinfo.c:2698:18: note: 'times' declared here
[23:37:04]   struct timeval times[2] = { {0, 0}, {0, 0} };
[23:37:04]                  ^
[23:37:04] 2 errors generated.

@lucifer1004
Copy link
Contributor Author

Even more interesting, on my system I get a different error:

[23:37:04] [200/657] /opt/bin/x86_64-apple-darwin14-libgfortran5-cxx11/x86_64-apple-darwin14-clang -Igio/libgio-2.0.0.dylib.p -Igio -I../gio -I. -I.. -Iglib -I../glib -Igobject -I../gobject -Igmodule -I../gmodule -Isubprojects/gvdb -I../subprojects/gvdb -I/workspace/destdir/include -fcolor-diagnostics -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O3 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -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 -Werror=unused-result -Wstrict-prototypes -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign '-DG_LOG_DOMAIN="GLib-GIO"' -DGIO_COMPILATION '-DGIO_LAUNCH_DESKTOP="/workspace/destdir/libexec/gio-launch-desktop"' '-DGIO_MODULE_DIR="/workspace/destdir/lib/gio/modules"' '-DLOCALSTATEDIR="/workspace/destdir/var"' -fvisibility=hidden -MD -MQ gio/libgio-2.0.0.dylib.p/glocalfile.c.o -MF gio/libgio-2.0.0.dylib.p/glocalfile.c.o.d -o gio/libgio-2.0.0.dylib.p/glocalfile.c.o -c ../gio/glocalfile.c
[23:37:04] ninja: job failed: /opt/bin/x86_64-apple-darwin14-libgfortran5-cxx11/x86_64-apple-darwin14-clang -Igio/libgio-2.0.0.dylib.p -Igio -I../gio -I. -I.. -Iglib -I../glib -Igobject -I../gobject -Igmodule -I../gmodule -Isubprojects/gvdb -I../subprojects/gvdb -I/workspace/destdir/include -fcolor-diagnostics -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O3 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -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 -Werror=unused-result -Wstrict-prototypes -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign '-DG_LOG_DOMAIN="GLib-GIO"' -DGIO_COMPILATION '-DGIO_LAUNCH_DESKTOP="/workspace/destdir/libexec/gio-launch-desktop"' '-DGIO_MODULE_DIR="/workspace/destdir/lib/gio/modules"' '-DLOCALSTATEDIR="/workspace/destdir/var"' -fvisibility=hidden -MD -MQ gio/libgio-2.0.0.dylib.p/glocalfileinfo.c.o -MF gio/libgio-2.0.0.dylib.p/glocalfileinfo.c.o.d -o gio/libgio-2.0.0.dylib.p/glocalfileinfo.c.o -c ../gio/glocalfileinfo.c
[23:37:04] ../gio/glocalfileinfo.c:2803:9: error: implicit declaration of function 'utimensat' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
[23:37:04]   res = utimensat (AT_FDCWD, filename, times_n, 0);
[23:37:04]         ^
[23:37:04] ../gio/glocalfileinfo.c:2803:9: note: did you mean 'utimes'?
[23:37:04] /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/usr/include/sys/time.h:202:5: note: 'utimes' declared here
[23:37:04] int     utimes(const char *, const struct timeval *);
[23:37:04]         ^
[23:37:04] ../gio/glocalfileinfo.c:2803:40: error: use of undeclared identifier 'times_n'; did you mean 'times'?
[23:37:04]   res = utimensat (AT_FDCWD, filename, times_n, 0);
[23:37:04]                                        ^~~~~~~
[23:37:04]                                        times
[23:37:04] ../gio/glocalfileinfo.c:2698:18: note: 'times' declared here
[23:37:04]   struct timeval times[2] = { {0, 0}, {0, 0} };
[23:37:04]                  ^
[23:37:04] 2 errors generated.

I have also encountered this error, too.

@giordano
Copy link
Member

giordano commented Sep 27, 2022

The fun part is https://dev.azure.com/JuliaPackaging/Yggdrasil/_build/results?buildId=22651&view=logs&j=a3369a57-9e06-5de6-9b1e-d73561d89620&t=b24b196c-0a7e-51ab-830a-233ab8132a42&l=2558

[22:30:26] Checking for function "utimensat" : NO 

It'd appear they check is the function utimensat is available, find that it isn't, and still use it.

Going back to the archive issue, the problem seems to be that

sandbox:${WORKSPACE}/srcdir/glib-2.74.0/build_glib # file glib/libcharset/libcharset.a
glib/libcharset/libcharset.a: thin archive with 3 symbol entries

and the linker can't deal with thin archives. Manually turning this, and all other, thin archives to regular archives with this code

for lib in `find -name '*.a'`;
    do ar -t $lib | xargs ar rvs $lib.new && mv -v $lib.new $lib;
done

suggested at https://stackoverflow.com/a/25555282, I'm able to compile the code successfully (at least on aarch64-apple-darwin where I don't run into the utimensat problem). I don't know why these thin archives are generated in the first place.

@giordano
Copy link
Member

I don't know why these thin archives are generated in the first place.

That seems to be done pretty much on purpose: https://dev.azure.com/JuliaPackaging/Yggdrasil/_build/results?buildId=22651&view=logs&j=a3369a57-9e06-5de6-9b1e-d73561d89620&t=b24b196c-0a7e-51ab-830a-233ab8132a42&l=3042

[22:30:33] [225/657] rm -f glib/libcharset/libcharset.a && /opt/bin/x86_64-apple-darwin14-libgfortran5-cxx11/x86_64-apple-darwin14-ar csrDT glib/libcharset/libcharset.a glib/libcharset/libcharset.a.p/localcharset.c.o

T is the (deprecated) alias for --thin which produces a thin archive. Gotta figure out where this set of ar flags is coming from...

@@ -66,4 +67,4 @@ dependencies = [
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version = v"8")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is GCC 8 really necessary? Anything older that would work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not remember exactly, only sure that 4 could not work.

@jwahlstrand
Copy link
Contributor

Starting with 2.74 GLib can depend on libpcre2. Could also disable building tests using -Dtests=false.

@giordano
Copy link
Member

giordano commented Sep 28, 2022

Ok, Glib build system is definitely cursed. Now lots of platforms which were successful before are now randomly failing.

i686-linux-gnu, aarch64-linux-gnu, armv7l-linux-gnueabihf:

[00:09:00] Looking for a fallback subproject for the dependency libpcre2-8
[00:09:00] Downloading pcre2 source from https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.40/pcre2-10.40.tar.bz2
[00:09:00] 
[00:09:00] ../meson.build:2062:2: ERROR: Unhandled python exception
[00:09:00] 
[00:09:00]     This is a Meson bug and should be reported!

I have the feeling that just restarting these jobs may work Edit: indeed that's what happened. Sigh.

x86_64-apple-darwin

[00:10:35] ninja: job failed: /opt/bin/x86_64-apple-darwin14-libgfortran5-cxx11/x86_64-apple-darwin14-clang -Igio/libgio-2.0.0.dylib.p -Igio -I../gio -I. -I.. -Iglib -I../glib -Igobject -I../gobject -Igmodule -I../gmodule -Isubprojects/gvdb -I../subprojects/gvdb -I/workspace/destdir/include -fcolor-diagnostics -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O3 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -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 -Werror=unused-result -Wstrict-prototypes -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign '-DG_LOG_DOMAIN="GLib-GIO"' -DGIO_COMPILATION '-DGIO_LAUNCH_DESKTOP="/workspace/destdir/libexec/gio-launch-desktop"' '-DGIO_MODULE_DIR="/workspace/destdir/lib/gio/modules"' '-DLOCALSTATEDIR="/workspace/destdir/var"' -fvisibility=hidden -MD -MQ gio/libgio-2.0.0.dylib.p/glocalfileinfo.c.o -MF gio/libgio-2.0.0.dylib.p/glocalfileinfo.c.o.d -o gio/libgio-2.0.0.dylib.p/glocalfileinfo.c.o -c ../gio/glocalfileinfo.c
[00:10:35] ../gio/glocalfileinfo.c:2803:9: error: implicit declaration of function 'utimensat' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
[00:10:35]   res = utimensat (AT_FDCWD, filename, times_n, 0);
[00:10:35]         ^
[00:10:35] ../gio/glocalfileinfo.c:2803:9: note: did you mean 'utimes'?
[00:10:35] /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/usr/include/sys/time.h:202:5: note: 'utimes' declared here
[00:10:35] int     utimes(const char *, const struct timeval *);
[00:10:35]         ^
[00:10:35] ../gio/glocalfileinfo.c:2803:40: error: use of undeclared identifier 'times_n'; did you mean 'times'?
[00:10:35]   res = utimensat (AT_FDCWD, filename, times_n, 0);
[00:10:35]                                        ^~~~~~~
[00:10:35]                                        times
[00:10:35] ../gio/glocalfileinfo.c:2698:18: note: 'times' declared here
[00:10:35]   struct timeval times[2] = { {0, 0}, {0, 0} };
[00:10:35]                  ^
[00:10:35] 2 errors generated.

Same error as what I was getting before locally (and not anymore).

@jwahlstrand
Copy link
Contributor

The utimensat problem could be patched away: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2914

@giordano
Copy link
Member

It'd appear they check is the function utimensat is available, find that it isn't, and still use it.

I hadn't looked at the code, but it looks like I was right: https://gitlab.gnome.org/GNOME/glib/-/issues/2766. Sigh.

@giordano giordano merged commit 7f533b9 into JuliaPackaging:master Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants