Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53967 - gstreamer 0.8.1 does not compile because of valgrind (valgrind_printf and valgrind_malloc_like macros not defined)
Summary: gstreamer 0.8.1 does not compile because of valgrind (valgrind_printf and val...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: Normal minor (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-15 04:37 UTC by davi
Modified: 2004-08-18 03:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix gstreamer-0.8.1 ebuild by disabling debug (gstreamer-0.8.1.ebuild.patch,308 bytes, patch)
2004-06-15 04:39 UTC, davi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description davi 2004-06-15 04:37:30 UTC
When I try to emerge gstreamer 0.81 I get the following error:

gcc -march=pentium4 -pipe -O2 -o .libs/spidertest spidertest-spidertest.o -pthread -Wl,--export-dynamic  ../../gst/.libs/libgstreamer-0.8.so /usr/lib/libxml2.so -lz -lm /usr/lib/libgobject-2.0.so /usr/lib/libgthread-2.0.so -lpthread /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libglib-2.0.so /usr/lib/libpopt.so
../../gst/.libs/libgstreamer-0.8.so: undefined reference to `VALGRIND_MALLOCLIKE_BLOCK'
../../gst/.libs/libgstreamer-0.8.so: undefined reference to `VALGRIND_PRINTF'
../../gst/.libs/libgstreamer-0.8.so: undefined reference to `VALGRIND_FREELIKE_BLOCK'
collect2: ld returned 1 exit status

I do have valgrind installed:
bash-2.05b# epm -q valgrind
valgrind-2.0.0

But I can't find the VALGRIND_PRINTF & friends definition in the /usr/include/valgrind/valgrind.h header.

Gstreamer's configure script does not have an option to directly disable valgrind support, but if you look inside configure.ac you can find
USE_VALGRIND="$USE_DEBUG". Therefore, disabling debug (--disable-debug) solves the problem.





Reproducible: Always
Steps to Reproduce:
1. emerge gstreamer
2.
3.

Actual Results:  
...

gcc -march=pentium4 -pipe -O2 -o .libs/spidertest spidertest-spidertest.o
-pthread -Wl,--export-dynamic  ../../gst/.libs/libgstreamer-0.8.so
/usr/lib/libxml2.so -lz -lm /usr/lib/libgobject-2.0.so
/usr/lib/libgthread-2.0.so -lpthread /usr/lib/libgmodule-2.0.so -ldl
/usr/lib/libglib-2.0.so /usr/lib/libpopt.so
../../gst/.libs/libgstreamer-0.8.so: undefined reference to
`VALGRIND_MALLOCLIKE_BLOCK'
../../gst/.libs/libgstreamer-0.8.so: undefined reference to `VALGRIND_PRINTF'
../../gst/.libs/libgstreamer-0.8.so: undefined reference to
`VALGRIND_FREELIKE_BLOCK'
collect2: ld returned 1 exit status



Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.4.26)
=================================================================
System uname: 2.4.26 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays
-pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa apache2 apm arts avi berkdb bonobo cdr crypt cscope cups curl
dga directfb doc dvd encode esd ethereal evo fam fbcon foomaticdb gd gdbm gif
gnome gpm gstreamer gtk gtk2 gtkhtml guile icc icc-pgo imap imlib java jpeg kde
libg++ libwww mad maildir mbox mikmod motif mozilla mpeg mysql ncurses nls nocd
oggvorbis opengl oss pam pdflib perl plotutils png postgres python qt quicktime
readline sdl slang spell ssl svga tcltk tcpd tetex truetype unicode videos x86
xml2 xmms xv zlib"
Comment 1 davi 2004-06-15 04:39:09 UTC
Created attachment 33308 [details, diff]
Patch to fix gstreamer-0.8.1 ebuild by disabling debug
Comment 2 foser (RETIRED) gentoo-dev 2004-06-15 15:16:32 UTC
i'll check it when updating.. 
Comment 3 foser (RETIRED) gentoo-dev 2004-06-29 09:24:44 UTC
added a debug USE flag to gstreamer-0.8.2 to give the choice. That should take care of this for now.
Comment 4 foser (RETIRED) gentoo-dev 2004-06-29 10:46:29 UTC
reverted that change after a little talk with the gstreamer devs who say it's not wise to disable debug by default.
Comment 5 Benjamin Otte 2004-06-29 12:20:24 UTC
This looks like a bug with your valgrind. GStreamer detects the availability of valgrind headers via pkgconfig. And the pkgconfig support for valgrind is younger than those macros, so you can't have a too old valgrind version.

fyi, VALGRIND_PRINTF is part of valgrind.h, the other macros are part of memcheck.h
Comment 6 davi 2004-06-30 18:46:50 UTC
It is actually a problem with my valgrind version, but mine is the version from the portage tree. VALGRIND_MALLOCLIKE_BLOCK and VALGRIND_FREELIKE_BLOCK are in the memcheck.h header, but VALGRIND_PRINTF simply doesn't exist:

bash-2.05b$ tar xjf /usr/portage/distfiles/valgrind-2.0.0.tar.bz2
bash-2.05b$ cd valgrind-2.0.0/
bash-2.05b$ grep -r VALGRIND_PRINTF *
bash-2.05b$

Although it does exist in valgrind-2.1.1.tar.bz2 (unstable version), which is not in portage yet.
Comment 7 Benjamin Otte 2004-07-01 03:18:23 UTC
You are right.
2.0.0 in fact does not include VALGRIND_PRINTF. The GStreamer configure script should probably check for valgrind >= 2.1.

I'll fix that upstream tonight. Fixing the ebuild configure is probably up to foser :)
Comment 8 foser (RETIRED) gentoo-dev 2004-08-11 04:27:08 UTC
umm yeah..got a bit stuffed with other things. I guess this is already fixed now in newer versions.. still need to check though.
Comment 9 foser (RETIRED) gentoo-dev 2004-08-18 03:34:32 UTC
checked, all good now, thnx