GNOME Bugzilla – Bug 689583
gst-rtsp-server: docs fails to build when gcov is enabled...
Last modified: 2014-02-25 22:28:22 UTC
If (having already build gstreamer from git and setup my paths) I checkout gst-rtsp-server and run: ./autogen.sh --prefix=/tmp/prefix --enable-gcov make -j10 install then I am faced with this puzzling error message: [...] DOC Introspecting gobjects .libs/gst-rtsp-server-scan.o: In function `_GLOBAL__sub_I_65535_0_gst_rtsp_server_scan.c': /home/sebras/src/gst/gst-rtsp-server/docs/libs/gst-rtsp-server-scan.c:1199: undefined reference to `__gcov_init' .libs/gst-rtsp-server-scan.o:(.data.rel+0x20): undefined reference to `__gcov_merge_add' collect2: error: ld returned 1 exit status This is of course due to --enable-gcov being set. --enable-gcov will in common/m4/gst-args.m4 cause GCOV_CFLAGS and GCOV_LIBS to be set. GCOV_CFLAGS will in configure.ac be used in GST_CFLAGS. In docs/libs/Makefile.am GTKDOC_CFLAGS uses GST_CFLAGS. GCOV_LIBS is not included anywhere, so the compiler is instructed to use gcov, but the linker is not. The obvious fix is to add this to GTKDOC_LDFLAGS in docs/libs/Makefile.am as the attached patch does.
Created attachment 230608 [details] [review] Proposed patch to fix compilation error.
Thanks! commit e2d02097a612a3661ce922ff2617ddbb90465383 Author: Sebastian Rasmussen <sebras@hotmail.com> Date: Tue Dec 4 01:05:31 2012 +0100 docs: Link with gcov library when gcov is enabled Fixes https://bugzilla.gnome.org/show_bug.cgi?id=689583