Skip to content

meson: gst-play: link to libm

Carlos Bentzen requested to merge cadubentzen/gstreamer:gst-play-libm into main

gst-play.c depends on libm due to using round. Passing by, correct identation of gst_tools definition.

It usually gets the -lm transitively from its dependencies, except when building for gstreamer-full with e.g.

$ meson setup \
  --default-library=static -Dauto_features=disabled -Dtools=enabled \
  -Dgst-full=enabled \
  -Dgst-full-libraries=gstreamer-base-1.0,gstreamer-pbutils-1.0,gstreamer-tag-1.0,gstreamer-video-1.0,gstreamer-audio-1.0
  builddir
$ meson compile -C builddir
...
[4/4] Linking target gst-play-1.0
FAILED: gst-play-1.0 
cc  -o gst-play-1.0 gst-play-1.0.p/subprojects_gst-plugins-base_tools_gst-play.c.o gst-play-1.0.p/subprojects_gst-plugins-base_tools_gst-play-kb.c.o -L/jhbuild/install/lib -Wl,--as-needed -Wl,--no-undefined '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/host/home/cadubentzen/git/gstreamer/builddir-test/ -Wl,--start-group libgstreamer-full-1.0.so /usr/lib/x86_64-linux-gnu/libglib-2.0.so /usr/lib/x86_64-linux-gnu/libgobject-2.0.so /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so -Wl,--end-group -pthread
/usr/bin/ld: gst-play-1.0.p/subprojects_gst-plugins-base_tools_gst-play.c.o: undefined reference to symbol 'round@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Merge request reports

Loading