I am trying to build glib with meson. The reason meson is used is simply because this is what glib supports, but I do not have much experience with it yet. The glib project is also using ninja for the build. So I downloaded https://download.gnome.org/sources/glib/ and tried to build the project (was also forced to download pcre and build separately, due to firewall issues). The latest version 2.78.0 was missing some files, so the meson setup step failed. Thus I downloaded 2.77.3 (and later 2.76.5) and ran
meson setup _build
meson compile -v -C _build
but this fails on
...
[127/1441] cc -o glib/libglib-2.0.so.0.7600.5 glib/libglib-2.0.so.0.7600.5.p/deprecated_gallocator.c.o glib/libglib-2.0.so.0.7600.5.p/deprecated_gcache.c.o glib/libglib-2.0.so.0.7600.5.p/deprecated_gcompletion.c.o glib/libglib-2.0.so.0.7600.5.p/deprecated_grel.c.o glib/libglib-2.0.so.0.7600.5.p/deprecated_gthread-deprecated.c.o glib/libglib-2.0.so.0.7600.5.p/garcbox.c.o glib/libglib-2.0.so.0.7600.5.p/garray.c.o glib/libglib-2.0.so.0.7600.5.p/gasyncqueue.c.o glib/libglib-2.0.so.0.7600.5.p/gatomic.c.o glib/libglib-2.0.so.0.7600.5.p/gbacktrace.c.o glib/libglib-2.0.so.0.7600.5.p/gbase64.c.o glib/libglib-2.0.so.0.7600.5.p/gbitlock.c.o glib/libglib-2.0.so.0.7600.5.p/gbookmarkfile.c.o glib/libglib-2.0.so.0.7600.5.p/gbytes.c.o glib/libglib-2.0.so.0.7600.5.p/gcharset.c.o glib/libglib-2.0.so.0.7600.5.p/gchecksum.c.o glib/libglib-2.0.so.0.7600.5.p/gconvert.c.o glib/libglib-2.0.so.0.7600.5.p/gdataset.c.o glib/libglib-2.0.so.0.7600.5.p/gdate.c.o glib/libglib-2.0.so.0.7600.5.p/gdatetime.c.o glib/libglib-2.0.so.0.7600.5.p/gdir.c.o glib/libglib-2.0.so.0.7600.5.p/genviron.c.o glib/libglib-2.0.so.0.7600.5.p/gerror.c.o glib/libglib-2.0.so.0.7600.5.p/gfileutils.c.o glib/libglib-2.0.so.0.7600.5.p/ggettext.c.o glib/libglib-2.0.so.0.7600.5.p/ghash.c.o glib/libglib-2.0.so.0.7600.5.p/ghmac.c.o glib/libglib-2.0.so.0.7600.5.p/ghook.c.o glib/libglib-2.0.so.0.7600.5.p/ghostutils.c.o glib/libglib-2.0.so.0.7600.5.p/giochannel.c.o glib/libglib-2.0.so.0.7600.5.p/gkeyfile.c.o glib/libglib-2.0.so.0.7600.5.p/glib-init.c.o glib/libglib-2.0.so.0.7600.5.p/glib-private.c.o glib/libglib-2.0.so.0.7600.5.p/glist.c.o glib/libglib-2.0.so.0.7600.5.p/gmain.c.o glib/libglib-2.0.so.0.7600.5.p/gmappedfile.c.o glib/libglib-2.0.so.0.7600.5.p/gmarkup.c.o glib/libglib-2.0.so.0.7600.5.p/gmem.c.o glib/libglib-2.0.so.0.7600.5.p/gmessages.c.o glib/libglib-2.0.so.0.7600.5.p/gnode.c.o glib/libglib-2.0.so.0.7600.5.p/goption.c.o glib/libglib-2.0.so.0.7600.5.p/gpathbuf.c.o glib/libglib-2.0.so.0.7600.5.p/gpattern.c.o glib/libglib-2.0.so.0.7600.5.p/gpoll.c.o glib/libglib-2.0.so.0.7600.5.p/gprimes.c.o glib/libglib-2.0.so.0.7600.5.p/gqsort.c.o glib/libglib-2.0.so.0.7600.5.p/gquark.c.o glib/libglib-2.0.so.0.7600.5.p/gqueue.c.o glib/libglib-2.0.so.0.7600.5.p/grand.c.o glib/libglib-2.0.so.0.7600.5.p/grcbox.c.o glib/libglib-2.0.so.0.7600.5.p/grefcount.c.o glib/libglib-2.0.so.0.7600.5.p/grefstring.c.o glib/libglib-2.0.so.0.7600.5.p/gregex.c.o glib/libglib-2.0.so.0.7600.5.p/gscanner.c.o glib/libglib-2.0.so.0.7600.5.p/gsequence.c.o glib/libglib-2.0.so.0.7600.5.p/gshell.c.o glib/libglib-2.0.so.0.7600.5.p/gslice.c.o glib/libglib-2.0.so.0.7600.5.p/gslist.c.o glib/libglib-2.0.so.0.7600.5.p/gstdio.c.o glib/libglib-2.0.so.0.7600.5.p/gstrfuncs.c.o glib/libglib-2.0.so.0.7600.5.p/gstring.c.o glib/libglib-2.0.so.0.7600.5.p/gstringchunk.c.o glib/libglib-2.0.so.0.7600.5.p/gstrvbuilder.c.o glib/libglib-2.0.so.0.7600.5.p/gtestutils.c.o glib/libglib-2.0.so.0.7600.5.p/gthread.c.o glib/libglib-2.0.so.0.7600.5.p/gthreadpool.c.o glib/libglib-2.0.so.0.7600.5.p/gtimer.c.o glib/libglib-2.0.so.0.7600.5.p/gtimezone.c.o glib/libglib-2.0.so.0.7600.5.p/gtrace.c.o glib/libglib-2.0.so.0.7600.5.p/gtranslit.c.o glib/libglib-2.0.so.0.7600.5.p/gtrashstack.c.o glib/libglib-2.0.so.0.7600.5.p/gtree.c.o glib/libglib-2.0.so.0.7600.5.p/guniprop.c.o glib/libglib-2.0.so.0.7600.5.p/gutf8.c.o glib/libglib-2.0.so.0.7600.5.p/gunibreak.c.o glib/libglib-2.0.so.0.7600.5.p/gunicollate.c.o glib/libglib-2.0.so.0.7600.5.p/gunidecomp.c.o glib/libglib-2.0.so.0.7600.5.p/guri.c.o glib/libglib-2.0.so.0.7600.5.p/gutils.c.o glib/libglib-2.0.so.0.7600.5.p/guuid.c.o glib/libglib-2.0.so.0.7600.5.p/gvariant.c.o glib/libglib-2.0.so.0.7600.5.p/gvariant-core.c.o glib/libglib-2.0.so.0.7600.5.p/gvariant-parser.c.o glib/libglib-2.0.so.0.7600.5.p/gvariant-serialiser.c.o glib/libglib-2.0.so.0.7600.5.p/gvarianttypeinfo.c.o glib/libglib-2.0.so.0.7600.5.p/gvarianttype.c.o glib/libglib-2.0.so.0.7600.5.p/gversion.c.o glib/libglib-2.0.so.0.7600.5.p/gwakeup.c.o glib/libglib-2.0.so.0.7600.5.p/gprintf.c.o glib/libglib-2.0.so.0.7600.5.p/glib-unix.c.o glib/libglib-2.0.so.0.7600.5.p/gspawn.c.o glib/libglib-2.0.so.0.7600.5.p/giounix.c.o glib/libglib-2.0.so.0.7600.5.p/gjournal-private.c.o glib/libglib-2.0.so.0.7600.5.p/gthread-posix.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libglib-2.0.so.0 -Wl,-rpath,/proj/wcdmaiov/epatrek/babeltrace/glib/pcre2-10.42-bin/lib -Wl,-rpath-link,/proj/wcdmaiov/epatrek/babeltrace/glib/pcre2-10.42-bin/lib glib/libcharset/libcharset.a -Wl,-z,nodelete -Wl,-Bsymbolic-functions -lm -lrt /proj/wcdmaiov/epatrek/babeltrace/glib/pcre2-10.42-bin/lib/libpcre2-8.so -Wl,--end-group -pthread
[128/1441] cc -Iglib/tests/cache.p -Iglib/tests -I../glib/tests -I. -I.. -Iglib -I../glib -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -pedantic -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wmissing-field-initializers -Wnonnull -Wunused -Wno-unused-parameter -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=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign -pthread '-DG_LOG_DOMAIN="GLib"' -UG_DISABLE_ASSERT -MD -MQ glib/tests/cache.p/cache.c.o -MF glib/tests/cache.p/cache.c.o.d -o glib/tests/cache.p/cache.c.o -c ../glib/tests/cache.c
[129/1441] cc -Iglib/tests/bytes.p -Iglib/tests -I../glib/tests -I. -I.. -Iglib -I../glib -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -pedantic -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wmissing-field-initializers -Wnonnull -Wunused -Wno-unused-parameter -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=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign -pthread '-DG_LOG_DOMAIN="GLib"' -UG_DISABLE_ASSERT -MD -MQ glib/tests/bytes.p/bytes.c.o -MF glib/tests/bytes.p/bytes.c.o.d -o glib/tests/bytes.p/bytes.c.o -c ../glib/tests/bytes.c
[130/1441] cc -Iglib/tests/bookmarkfile.p -Iglib/tests -I../glib/tests -I. -I.. -Iglib -I../glib -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -pedantic -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wmissing-field-initializers -Wnonnull -Wunused -Wno-unused-parameter -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=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign -pthread '-DG_LOG_DOMAIN="GLib"' -UG_DISABLE_ASSERT -MD -MQ glib/tests/bookmarkfile.p/bookmarkfile.c.o -MF glib/tests/bookmarkfile.p/bookmarkfile.c.o.d -o glib/tests/bookmarkfile.p/bookmarkfile.c.o -c ../glib/tests/bookmarkfile.c
[131/1441] cc -Iglib/tests/array-test.p -Iglib/tests -I../glib/tests -I. -I.. -Iglib -I../glib -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -pedantic -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wmissing-field-initializers -Wnonnull -Wunused -Wno-unused-parameter -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=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign -pthread '-DG_LOG_DOMAIN="GLib"' -UG_DISABLE_ASSERT -MD -MQ glib/tests/array-test.p/array-test.c.o -MF glib/tests/array-test.p/array-test.c.o.d -o glib/tests/array-test.p/array-test.c.o -c ../glib/tests/array-test.c
ninja: build stopped: subcommand failed.
patrik[babeltrace/glib/glib-2.76.5]$
However, this tells very little on what error that caused ninja to fail. Any idea how to find the defacto error that caused ninja to fail?
I am using ninja 1.9.0 and meson 1.2.1.
BR
Patrik
The error should be printed. Note that if you're running several concurrent jobs, which Ninja does by default, the error may have already scrolled off your terminal due to the commands of other compilation steps being printed after it.
If no error is printed, that might mean that the subcommand failed without printing any error. In that case, you can use -j1
to only run one command at a time. That way, it will be clear which command failed.