Building a stand-alone, static, debug'-g' version of GStreamer
FritzKatz
frtzkatz at yahoo.com
Tue May 22 17:58:30 PDT 2012
I'd like to build a stand-alone, static, debug'-g' version of GStreamer so
I can step through simulations, bugs, and new plugin development with a
source-debugger. I'd like to install the executables, libraries, includes,
and debug versions of plugins in a directory ~/BIN under my user account.
I'd also like to leave the system GStreamer working so I can switch back and
forth between development and a known, working system.
Is there a better way of doing this? Please let me know. This is what I've
been able to figure out on my own:
__________________________________________
I've successfully built gstreamer-0.10 ( from
http://gstreamer.freedesktop.org/src/ ). And I've installed my local copy to
compile and build against by doing:
$ cd ~/DEV/gstreamer-0.10/
$ ./configure --enable-debug --enable-gst-debug --enable-profiling
--enable-parse --enable-option-parsing --enable-static --disable-shared
--prefix=/home/user/BIN
$ make
$ make install
So now I've got my own debug version of the Gstreamer launcher, inspector,
includes, and libs. Everything appears to be happy, so far.
$ cd ~/BIN
$ tree -d
.
|-- bin
|-- include
| `-- gstreamer-0.10
| `-- gst
| |-- base
| |-- check
| |-- controller
| |-- dataprotocol
| `-- net
|-- lib
| |-- gstreamer-0.10
| `-- pkgconfig
|-- libexec
| `-- gstreamer-0.10
`-- share
|-- aclocal
[[...]]
__________________________________________
Next I downloaded the gst-plugins-base-0.10, built, and statically linked
against my development version:
$ cd ~/DEV/gst-plugins-base-0.10/
$ export GST_CFLAGS="-I/home/user/BIN/include/gstreamer-0.10 \
-I/home/user/BIN/include/gstreamer-0.10/gst
-I/usr/include/glib-2.0 \
-I/usr/lib/glib-2.0/include -I/usr/include/libxml2"
$ export GST_LIBS="-pthread -static -L/home/user/BIN/lib -lgstreamer-0.10 \
-lxml2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0"
$ ./configure --enable-debug --enable-static --enable-profiling
--disable-shared --prefix=/home/user/BIN
$ make
$ make install
__________________________________________
I can verify my debug versions of the gst-plugins-base were correctly
installed and visible:
$ cd ~/BIN/bin/
$ ./gst-inspect
audioresample: audioresample: Audio resampler
playback: subtitleoverlay: Subtitle Overlay
[[...]]
audiotestsrc: audiotestsrc: Audio test source
alsa: alsasink: Audio sink (ALSA)
alsa: alsasrc: Audio source (ALSA)
alsa: alsamixer: Alsa mixer
coreelements: valve: Valve element
[[...]]
typefindfunctions: audio/x-musepack: mpc, mpp, mp+
typefindfunctions: video/x-ms-asf: asf, wm, wma, wmv
staticelements: bin: Generic bin
staticelements: pipeline: Pipeline object
Total count: 26 plugins, 178 features
However, when I try inspect one of the plugins, or use ./gst-launch, I get
"GLib-GObject-CRITICAL" errors:
$ ./gst-inspect alsasink
(gst-inspect-0.10:30950): GLib-GObject-WARNING **: cannot register existing
type `GstObject'
(gst-inspect-0.10:30950): GLib-CRITICAL **: g_once_init_leave: assertion
`initialization_value != 0' failed
(gst-inspect-0.10:30950): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed
(gst-inspect-0.10:30950): GLib-CRITICAL **: g_once_init_leave: assertion
`initialization_value != 0' failed
(gst-inspect-0.10:30950): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed
__________________________________________
Is there something obvious I've done wrong? Where to go next?
Since I've got debug turned on, I can get lot's of information. Spewage from
turning on GST_DEBUG indicates that it's using the correct library in
~/BIN/lib. It even says it "looks good", just before it hangs
$ export GST_DEBUG=5
$ ./gst-inspect alsasink
0:00:00.000448594 31059 0xa0bf070 INFO GST_INIT
gst.c:613:init_pre: Initializing GStreamer Core Library version 0.10.36
0:00:00.000485536 31059 0xa0bf070 INFO GST_INIT
gst.c:614:init_pre: Using library installed in /home/user/BIN/lib
0:00:00.000495006 31059 0xa0bf070 INFO GST_INIT
gst.c:624:init_pre: Linux ubuntu 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4
11:13:04 UTC 2012 i686
[[...]]
0:00:00.904396010 31156 0x8232070 DEBUG GST_PLUGIN_LOADING
gstplugin.c:1293:gst_plugin_load_by_name: looking up plugin alsa in default
registry
0:00:00.904410607 31156 0x8232070 DEBUG GST_PLUGIN_LOADING
gstplugin.c:1296:gst_plugin_load_by_name: loading plugin alsa from file
/home/user/BIN/lib/gstreamer-0.10/libgstalsa.so
0:00:00.904419281 31156 0x8232070 DEBUG GST_PLUGIN_LOADING
gstplugin.c:737:gst_plugin_load_file: attempt to load plugin
"/home/user/BIN/lib/gstreamer-0.10/libgstalsa.so"
0:00:00.905904303 31156 0x8232070 LOG GST_PLUGIN_LOADING
gstplugin.c:834:gst_plugin_load_file: Plugin 0x824ba20 for file
"/home/user/BIN/lib/gstreamer-0.10/libgstalsa.so" prepared, calling entry
function...
0:00:00.905922400 31156 0x8232070 LOG GST_PLUGIN_LOADING
gstplugin.c:841:gst_plugin_load_file: Plugin 0x824ba20 for file
"/home/user/BIN/lib/gstreamer-0.10/libgstalsa.so" prepared, registering...
0:00:00.905933556 31156 0x8232070 LOG GST_PLUGIN_LOADING
gstplugin.c:540:gst_plugin_register_func: plugin
"/home/user/BIN/lib/gstreamer-0.10/libgstalsa.so" looks good
(gst-inspect-0.10:866): GLib-GObject-WARNING **: cannot register existing
type `GstObject'
(gst-inspect-0.10:866): GLib-CRITICAL **: g_once_init_leave: assertion
`initialization_value != 0' failed
(gst-inspect-0.10:866): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed
__________________________________________
And, here's a backtrace from gdb where the program is hanging:
__________________________________________
$ ps -aux | grep inspect
fritzkatz 32146 0.0 0.1 9552 3036 pts/0 S 19:12 0:00
/home/user/BIN/bin/gst-inspect-0.10 alsasink
$ gdb /home/user/BIN/bin/gst-inspect-0.10 32146
[[...]]
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0x0012d422 in __kernel_vsyscall ()
(gdb) bt
#0 0x0012d422 in __kernel_vsyscall ()
#1 0x003aa015 in ?? ()
#2 0x0066b738 in ?? ()
#3 0x0067e98b in ?? ()
#4 0x005948c2 in ?? ()
#5 0x00596482 in ?? ()
#6 0x080929a6 in gst_plugin_register_func (plugin=0x80f70bc, desc=0x0,
user_data=<value optimized out>) at gstplugin.c:557
#7 0x080943c3 in gst_plugin_load_file (filename=0x8125c40
"/home/user/BIN/lib/gstreamer-0.10/libgstalsa.so",
error=0xbffff04c) at gstplugin.c:843
#8 0x08094fb9 in gst_plugin_load_by_name (name=0x8125c10 "alsa") at
gstplugin.c:1297
#9 0x08095a68 in gst_plugin_feature_load (feature=0x81262d0) at
gstpluginfeature.c:111
#10 0x08051f36 in print_element_info (factory=0xfffffe00, print_names=0) at
gst-inspect.c:1332
#11 0x0805315f in main (argc=2, argv=0xbffff324) at gst-inspect.c:1619
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Building-a-stand-alone-static-debug-g-version-of-GStreamer-tp4650852.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list