mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.49k stars 1.59k forks source link

gnome.generate_gir() is spammy #2700

Open tp-m opened 6 years ago

tp-m commented 6 years ago

Example: GStreamer core build looks like this:

ninja: Entering directory `/tmp/gst'
[103/460] Generating Gst-1.0.gir with a custom command.
g-ir-scanner: link: cc -o /tmp/gst/tmp-introspect8aseldb0/Gst-1.0 /tmp/gst/tmp-introspect8aseldb0/Gst-1.0.o -L. -Wl,-rpath,. -Wl,--no-as-needed -lgstreamer-1.0 -lglib-2.0 -ldw -lgobject-2.0 -lunwind -ldl -lelf -lm -lgmodule-2.0 -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -Wl,-rpath,/home/tpm/gst/glib-master/prefix/lib -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
[174/460] Generating GstController-1.0.gir with a custom command.
g-ir-scanner: link: cc -o /tmp/gst/tmp-introspectatqnkl4x/GstController-1.0 /tmp/gst/tmp-introspectatqnkl4x/GstController-1.0.o -L. -Wl,-rpath,. -Wl,--no-as-needed -lgstcontroller-1.0 -lglib-2.0 -ldw -lgobject-2.0 -lgstreamer-1.0 -lunwind -ldl -lelf -lm -lgmodule-2.0 -L/tmp/gst/libs/gst/controller -Wl,-rpath,/tmp/gst/libs/gst/controller -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -Wl,-rpath,/home/tpm/gst/glib-master/prefix/lib -L/tmp/gst/libs/gst/controller -Wl,-rpath,/tmp/gst/libs/gst/controller -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
[195/460] Generating GstCheck-1.0.gir with a custom command.
g-ir-scanner: link: cc -o /tmp/gst/tmp-introspectfgip77bd/GstCheck-1.0 /tmp/gst/tmp-introspectfgip77bd/GstCheck-1.0.o -L. -Wl,-rpath,. -Wl,--no-as-needed -lgstcheck-1.0 -lglib-2.0 -ldw -lgobject-2.0 -lgstreamer-1.0 -lunwind -ldl -lelf -lm -lgmodule-2.0 -L/tmp/gst/libs/gst/check -Wl,-rpath,/tmp/gst/libs/gst/check -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -Wl,-rpath,/home/tpm/gst/glib-master/prefix/lib -L/tmp/gst/libs/gst/check -Wl,-rpath,/tmp/gst/libs/gst/check -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
home/tpm/gst/glib-master/gstreamer/libs/gst/check/gstcheck.c:129: Warning: GstCheck: gst_check_add_log_filter: unknown parameter 'log_domain' in documentation comment, should be 'log'
home/tpm/gst/glib-master/gstreamer/libs/gst/check/gstcheck.c:142: Warning: GstCheck: gst_check_add_log_filter: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
home/tpm/gst/glib-master/gstreamer/libs/gst/check/gstcheck.h:177: Warning: GstCheck: gst_check_run_suite: argument suite: Unresolved type: 'Suite*'
[208/460] Generating GstBase-1.0.gir with a custom command.
g-ir-scanner: link: cc -o /tmp/gst/tmp-introspect7xrb32bj/GstBase-1.0 /tmp/gst/tmp-introspect7xrb32bj/GstBase-1.0.o -L. -Wl,-rpath,. -Wl,--no-as-needed -lgstbase-1.0 -lglib-2.0 -ldw -lgobject-2.0 -lgstreamer-1.0 -lunwind -ldl -lelf -lm -lgmodule-2.0 -L/tmp/gst/libs/gst/base -Wl,-rpath,/tmp/gst/libs/gst/base -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -Wl,-rpath,/home/tpm/gst/glib-master/prefix/lib -L/tmp/gst/libs/gst/base -Wl,-rpath,/tmp/gst/libs/gst/base -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
[247/460] Generating GstNet-1.0.gir with a custom command.
g-ir-scanner: link: cc -o /tmp/gst/tmp-introspectim7cap4w/GstNet-1.0 /tmp/gst/tmp-introspectim7cap4w/GstNet-1.0.o -L. -Wl,-rpath,. -Wl,--no-as-needed -lgstnet-1.0 -lgio-2.0 -lglib-2.0 -lgstbase-1.0 -ldw -lgobject-2.0 -lgstreamer-1.0 -lunwind -ldl -lelf -lm -lgmodule-2.0 -L/tmp/gst/libs/gst/net -Wl,-rpath,/tmp/gst/libs/gst/net -L/tmp/gst/libs/gst/base -Wl,-rpath,/tmp/gst/libs/gst/base -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -Wl,-rpath,/home/tpm/gst/glib-master/prefix/lib -L/tmp/gst/libs/gst/net -Wl,-rpath,/tmp/gst/libs/gst/net -L/tmp/gst/libs/gst/base -Wl,-rpath,/tmp/gst/libs/gst/base -L/tmp/gst/gst -Wl,-rpath,/tmp/gst/gst -L/home/tpm/gst/glib-master/prefix/lib -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
[460/460] Linking target tests/misc/netclock-replay.

it's worse with gst-plugins-base where there are more libs.

I think it shouldn't spam the terminal like that.

Now the simplest solution is to simply pass --quiet to g-ir-scanner (in combination with the patch in bug #790953).

Then we don't see linker lines if stuff fails of course. Not sure if there's a better way to fix this?

nirbheek commented 6 years ago

This is likely because g-ir-scanner is incorrectly outputting linker lines to stderr instead of stdout. It should only do that for actual errors, not for debug messages.

tp-m commented 6 years ago

That would make sense, but it doesn't look like it from the code at first glance.

ghost commented 6 years ago

The behaviour described here is the result of the fact that g-ir-scanner is producing output by default, which goes against the grain of most UNIX tools, which are silent if nothing goes wrong. Where the output is written to is actually irrelevant.