Search:  
Gentoo Wiki

TIP_Troubleshooting_Gstreamer

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

Contents

Introduction

gstreamer is a very sensitive build and will compile correctly, but fail to run for the following reasons. I'm going to list them in somewhat reverse order because troubleshooting step-by-step isn't worth the time it takes. Do everything at once and it's sure to work. Some material was taken from a Gentoo Forums thread in the Gentoo Forums

GCC Hardened

If you're using gcc hardened you need to switch your profile to the vanilla version. Example:

Code: vanillafy gcc
 gcc-config -l
 [1] i686-pc-linux-gnu-3.3.5-20050130 *
 [2] i686-pc-linux-gnu-3.3.5-20050130-hardenednopie
 [3] i686-pc-linux-gnu-3.3.5-20050130-hardenednossp
 [4] i686-pc-linux-gnu-3.3.5-20050130-vanilla
 gcc-config 4
 env-update
 source /etc/profile

prelink

Code: unmerge prelink
 emerge -C prelink

or

File: /etc/env.d/60gstreamer-0.8
 PRELINK_PATH_MASK=/usr/lib/gstreamer-0.8
Code: update environment
 env-update
 source /etc/profile

NOTE: this is already done by recent gstreamer builds

gst registry

Occasionally, the gstreamer registry become corrupt. As root:

Code: recreate registry
 rm -f /root/.gstreamer-0.8/registry.xml
 ls /home/ | while read USER; do rm -f /home/${USER}/.gstreamer-0.8/registry.xml; done
 rm -f /var/lib/cache/gstreamer-0.8/registry.xml
 gst-register

CFLAGS & LDFLAGS

Some of the seemingly safe CFLAGS, and even the default "safe" LDFLAGS can make gstreamer twitch. After you have done all of the steps above, re-emerge gstreamer explicitly without LDFLAGS. You shouldn't have to re-emerge the plugins, but it can't hurt.

export LDFLAGS=" "
export CFLAGS="-O -pipe -mcpu=i586"
export CXXFLAGS="${CFLAGS}"

-mcpu or -mtune can affect the stability but they do not seem to be so important. Removing any -f... CFLAGS (ex. -fomit-frame-pointers) and lowering to -O is crucial. For example: gstreamer-0.10.8 compiled with the above options but k8 instead of i586 on AMD64 Gentoo using a vanilla gcc 3.4.6 works fine.

remerge gstreamer gst-plugins, and all plugins

emerge gstreamer gst-plugins
ls /usr/portage/media-plugins/ | grep gst-plugins-| while read PLUGIN; do emerge ${PLUGIN}; done

similar but slightly alternative method

eix gst | grep '*' | grep media | cut -d' ' -f2 | while read GST; do emerge ${GST}; done
unset LDFLAGS
unset CFLAGS
unset CXXFLAGS

Known to NOT work:

Other Notes

Retrieved from "http://www.gentoo-wiki.info/TIP_Troubleshooting_Gstreamer"

Last modified: Mon, 22 Jan 2007 18:33:00 +0000 Hits: 19,146