Valgrind is compiled without -fPIC, affect callgrind which in turn is used by other packages. These other packages fail to build correctly. Applies at least to version 3.1.0
I don't see a problem adding -fPIC to callgrind or valgrind.
Heikki, can you give some details about the problems you see? Valgrind doesn't work well with -fpie, so it may have problems with -fPIC as well. I'll have to be sure -fPIC is what we want before I add it.
To my understanding, all libraries should be compiler with -fPIC to actually work on AMD64. Thus: Emerge gstreamer -> x86_64-pc-linux-gnu-gcc -shared .libs/libgstreamer_0.8_la-gst.o .libs/libgstreamer_0.8_la-gstobject.o .libs/libgstreamer_0.8_la-gstatomic.o .libs/libgstreamer_0.8_la-gstbin.o .libs/libgstreamer_0.8_la-gstbuffer.o .libs/libgstreamer_0.8_la-gstcaps.o .libs/libgstreamer_0.8_la-gstclock.o .libs/libgstreamer_0.8_la-gstcpu.o .libs/libgstreamer_0.8_la-gstdata.o .libs/libgstreamer_0.8_la-gstelement.o .libs/libgstreamer_0.8_la-gstelementfactory.o .libs/libgstreamer_0.8_la-gsterror.o .libs/libgstreamer_0.8_la-gstevent.o .libs/libgstreamer_0.8_la-gstfilter.o .libs/libgstreamer_0.8_la-gstformat.o .libs/libgstreamer_0.8_la-gstindex.o .libs/libgstreamer_0.8_la-gstinfo.o .libs/libgstreamer_0.8_la-gstinterface.o .libs/libgstreamer_0.8_la-gstmemchunk.o .libs/libgstreamer_0.8_la-gstpad.o .libs/libgstreamer_0.8_la-gstchildproxy.o .libs/libgstreamer_0.8_la-gstpipeline.o .libs/libgstreamer_0.8_la-gstplugin.o .libs/libgstreamer_0.8_la-gstpluginfeature.o .libs/libgstreamer_0.8_la-gstprobe.o .libs/libgstreamer_0.8_la-gstqueue.o .libs/libgstreamer_0.8_la-gstquery.o .libs/libgstreamer_0.8_la-gstscheduler.o .libs/libgstreamer_0.8_la-gststructure.o .libs/libgstreamer_0.8_la-gstsystemclock.o .libs/libgstreamer_0.8_la-gsttag.o .libs/libgstreamer_0.8_la-gsttaginterface.o .libs/libgstreamer_0.8_la-gstthread.o .libs/libgstreamer_0.8_la-gsttrace.o .libs/libgstreamer_0.8_la-gsttrashstack.o .libs/libgstreamer_0.8_la-gsttypefind.o .libs/libgstreamer_0.8_la-gsturi.o .libs/libgstreamer_0.8_la-gsturitype.o .libs/libgstreamer_0.8_la-gstutils.o .libs/libgstreamer_0.8_la-gstvalue.o .libs/libgstreamer_0.8_la-gstregistry.o .libs/libgstreamer_0.8_la-gstregistrypool.o .libs/libgstreamer_0.8_la-gstparse.o .libs/libgstreamer_0.8_la-gstxml.o .libs/libgstreamer_0.8_la-gstenumtypes.o .libs/libgstreamer_0.8_la-gstmarshal.o -Wl,--whole-archive parse/.libs/libgstparse.a registries/.libs/libgstxmlregistry.a -Wl,--no-whole-archive -L/usr/lib64/valgrind/amd64-linux /usr/lib64/libxml2.so -lz /usr/lib64/libgobject-2.0.so -L/usr/lib64 /usr/lib64/libgthread-2.0.so -lpthread /usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libglib-2.0.so /usr/lib64/libpopt.so -lcoregrind -lvex -lgcc -lm -march=k8 -pthread -Wl,--export-dynamic -Wl,-soname -Wl,libgstreamer-0.8.so.1 -Wl,-version-script -Wl,.libs/libgstreamer-0.8.ver -o .libs/libgstreamer-0.8.so.1.4.0 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/valgrind/amd64-linux/libcoregrind.a(libcoregrind_amd64_linux_a-m_main.o): relocation R_X86_64_32S against `vgPlain_interim_stack' can not be used when making a shared object; recompile with -fPIC /usr/lib64/valgrind/amd64-linux/libcoregrind.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[4]: *** [libgstreamer-0.8.la] Error 1
Looks like it requires valgrind's static library be built with -fPIC. We only build shared objects with -fPIC, because the rest would just generate unnecessary performance overhead. I'm not sure why gstreamer would link to valgrind's libraries. And did you mistake coregrind for callgrind? What other packages do you see this problem with? I'd like to find out if the package itself is pulling in valgrind or if it's something under water.
Unable to verify what other packages might need this. This originally came up as the result of emerge -uDv --newuse world where gstreamer is the first on list. Still blocking other updates. Thus don't know what other packages might need this. Tetex came through nicely without it. I do not know why gstreamer wants to link with valgrind libraries. However, it seems that it is trying to build a shared library and this would need PIC. Which explains why it complains. Don't know why it needs the libraries in question for that part, however.
Reassigning to gnome (maintainers of gstreamer). Let's see what they know about this.
please check gstreamer 0.8.11 it now disables run-time valgrind checking
ping, anyone checked gstreamer 0.8.11 or 0.8.12?
I don't know what is the current version, latest stable in tree nonetheless And no such problem anymore.
ok closing