gstreamer undefined symbol: _gst_fraction_type error

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

gstreamer undefined symbol: _gst_fraction_type error

stproj
Greetings,

I have installed  GStreamer-1.6.0  along with  gst-plugins-base-1.6.0 and  gst-plugins-good-1.6.0  according to this guide:
http://www.linuxfromscratch.org/blfs/view/svn/multimedia/gstreamer10.html

My problem is that when i try to execute a compiled code i get this weird error: undefined symbol: _gst_fraction_type

I compile like this libtool --mode=link gcc `pkg-config --cflags --libs gstreamer-1.0` -o myprog myprog.c according to this: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/faq/html/chapter-developing.html

I have seen no other reference to this error so any help you provide is valuable.

Regards,
S.
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

Tim Müller
On Fri, 2015-10-30 at 11:53 -0700, stproj wrote:

Hi,

> I have installed  GStreamer-1.6.0 (...)
>
> My problem is that when i try to execute a compiled code i get this
> weird
> error: *undefined symbol: _gst_fraction_type*

This happens when some code using GStreamer (a plugin, an application
or some library using libgstreamer) was compiled against GStreamer >=
1.4 headers, but then at runtime it picks up an older version of
libgstreamer-1.0.so from somewhere.

Make sure you either set the LD_LIBRARY_PATH environment variable to
point the dynamic linker to the location where the new 1.6 library is
installed, or add the location to your /etc/ld.so.conf*

Perhaps it's also enough to just run 'sudo ldconfig' (which you
generally might want to do after running 'make install' for new
libraries).

You can check which GStreamer gets picked up with:

 $ ldd ./yourapp

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

stproj
Hi,

I am reporting both the print output of ldd ./myapp and after i link LD_CONFIG_PATH to the /usr/lib gstreamer library. I have edited the outputs so that they can be readable.  Also, when i link the LD_CONFIG_PATH i get the output that you see below. Please provide some information regardings to these errors:


# ldd ./myapp
linux-vdso.so.1 =>  (0x00007ffc883e0000)
    libgstreamer-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007f6b638be000)
    libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f6b6366d000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f6b63365000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6b63147000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6b62d82000)
    libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f6b62b7e000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6b62878000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6b62674000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f6b6246c000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f6b6222e000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f6b63bc2000)



And the print i get after i link the my app to the gstreamer lib:

$ LD_LIBRARY_PATH=/usr/lib/ ./client-rtpaux

(rtpaux2:5359): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_element_link_many: assertion 'GST_IS_ELEMENT (element_2)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_element_link_many: assertion 'GST_IS_ELEMENT (element_2)' failed

Joining session 0x135ca40

(rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed

Connecting to 5000/5001/5005

(rtpaux2:5359): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed
(rtpaux2:5359): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(rtpaux2:5359): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed

Joining session 0x1375080

(rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed

Connecting to 5006/5007/5011

(rtpaux2:5359): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed
(rtpaux2:5359): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(rtpaux2:5359): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(rtpaux2:5359): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
(rtpaux2:5359): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed

starting client pipeline
Pipeline pipeline0 changed state from NULL to READY
Pipeline pipeline0 changed state from READY to PAUSED
Pipeline pipeline0 changed state from PAUSED to PLAYING

Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

Tim Müller
On Tue, 2015-11-03 at 07:00 -0800, stproj wrote:

Hi,

> I am reporting both the print output of ldd ./myapp and after i link
> LD_CONFIG_PATH to the /usr/lib gstreamer library. I have edited the
> outputs
> so that they can be readable.  Also, when i link the LD_CONFIG_PATH i
> get
> the output that you see below. Please provide some information
> regardings to
> these errors:

It looks like the 'undefined symbol' problem was resolved then, yes?


> And the print i get after i link the my app to the gstreamer lib:
>
> *$ LD_LIBRARY_PATH=/usr/lib/ ./client-rtpaux *
>
> (rtpaux2:5359): GStreamer-CRITICAL **: gst_bin_add: assertion
> 'GST_IS_ELEMENT (element)' failed
> (rtpaux2:5359): GLib-GObject-CRITICAL **: g_object_set: assertion
> 'G_IS_OBJECT (object)' failed

This probably indicates that you are missing some plugins/elements, and
that the application in question doesn't check whether the element it
tried to create is actually available.

You can run it in gdb with G_DEBUG=fatal_warnings to make it stop at
the first warning, and then look at the 'bt' stack trace to see which
line of code triggered it. Then check with gst-inspect-1.0 ELEMENTNAME
that the element actually exists. Perhaps you need to install some of
the plugins, or set GST_PLUGIN_PATH.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

stproj
That is correct, the undefined symbol problem seems to be solved. I am posting the shared library dependencies because i was expecting to see somewhere a link to gstreamer1.6 library.

I will soon post my results regardings the rest of the process and i will inform accordingly.
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

stproj
In reply to this post by Tim Müller
Greetings,

I am posting the whole output of warnings. This output is taken after the execution one of the examples in the test folders of good plugins. By running G_DEBUG=fatal_warnings i get only the first line of the below output, which is not very helpful. I am not sure of how to fix these errors, so any advice would be very helpful.



(server:19830): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(server:19830): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed
(server:19830): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (dest)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_get_static_pad: assertion 'GST_IS_ELEMENT (element)' failed
(server:19830): GStreamer-CRITICAL **: gst_ghost_pad_new: assertion 'GST_IS_PAD (target)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_add_pad: assertion 'GST_IS_PAD (pad)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_many: assertion 'GST_IS_ELEMENT (element_2)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_get_static_pad: assertion 'GST_IS_ELEMENT (element)' failed
(server:19830): GStreamer-CRITICAL **: gst_ghost_pad_new: assertion 'GST_IS_PAD (target)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_add_pad: assertion 'GST_IS_PAD (pad)' failed
(server:19830): GStreamer-CRITICAL **: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed
(server:19830): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(server:19830): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(server:19830): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(server:19830): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(server:19830): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (dest)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (dest)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed

New RTP stream on 5000/5001/5005
(server:19830): GStreamer-CRITICAL **: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed
(server:19830): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(server:19830): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(server:19830): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(server:19830): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(server:19830): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (dest)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (dest)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
(server:19830): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
New RTP stream on 5006/5007/5011
starting server pipeline
Pipeline pipeline0 changed state from NULL to READY
Pipeline pipeline0 changed state from READY to PAUSED
Pipeline pipeline0 changed state from PAUSED to PLAYING
^C

Thanx,
S.
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

Nicolas Dufresne-3
Le vendredi 06 novembre 2015 à 14:24 -0800, stproj a écrit :
> I am posting the whole output of warnings. This output is taken after
> the
> execution one of the examples in the test folders of good plugins. By
> running G_DEBUG=fatal_warnings i get only the first line of the below
> output, which is not very helpful. I am not sure of how to fix these
> errors,
> so any advice would be very helpful.

The idea with G_DEBUG=fatal_warnings, is that it would break at the
exact location where the first error happens. This way you can fix it.
It will most likely point into your code, but maybe not. Share the gdb
backtrace if not.

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

stproj
This post was updated on .
Hi,

Thanks for your effort. Please tell me if this is something what you were expecting to see. With bold are my commands, the source code can be found here:

http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/client-rtpaux.c


gcc -Wall rtpclient.c -o rtpclient $(pkg-config --cflags --libs gstreamer-1.0)
G_DEBUG=fatal_warnings ./rtpclient

(rtpclient:2758): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed
Trace/breakpoint trap (core dumped)

(gdb) file ./rtpclient
Reading symbols from ./rtpclient...(no debugging symbols found)...done.
(gdb) set env G_DEBUG=fatal-criticals
(gdb)run

Starting program: /home/gstreamer7/Desktop/rtpclient
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
(rtpclient:2771): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff75b6c13 in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0

(gdb) bt

#0  0x00007ffff75b6c13 in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ffff75b6d72 in g_log () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff7af5751 in gst_bin_add (bin=0x66c170, element=0x0)
    at gstbin.c:1292
#3  0x000000000040268a in main ()
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

Nicolas Dufresne-3
Le samedi 07 novembre 2015 à 10:26 -0800, stproj a écrit :
> #2  0x00007ffff7af5751 in gst_bin_add (bin=0x66c170, element=0x0)
>     at gstbin.c:1292
> #3  0x000000000040268a in main ()

Next time, try enabling debug symbols, using -g. Though here the reason
is very obvious. You call from your program (in the main() function)
gst_bin_add() with a NULL pointer (element=NULL). It's a problem in
your code. Try and check you return values (specially when calling
gst_element_factory_make()).

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

Chuck Crisler-3
In reply to this post by stproj
Hmmm...element=0x0 might be a problem.

On Sat, Nov 7, 2015 at 1:26 PM, stproj <[hidden email]> wrote:
Hi,

Thanks for your effort. Please tell me if this is something what you were
expecting to see. With bold are my commands, the source code can be found
here:

http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/client-rtpaux.c
<http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/client-rtpaux.c>


*gcc -Wall rtpclient.c -o rtpclient $(pkg-config --cflags --libs
gstreamer-1.0)*
*G_DEBUG=fatal_warnings ./rtpclient*

(rtpclient:2758): GStreamer-CRITICAL **: gst_bin_add: assertion
'GST_IS_ELEMENT (element)' failed
Trace/breakpoint trap (core dumped)

*(gdb) file ./rtpclient*
Reading symbols from ./rtpclient...(no debugging symbols found)...done.
(gdb)* set env G_DEBUG=fatal-criticals*
(gdb)*run

Starting program: /home/gstreamer7/Desktop/rtpclient
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
(rtpclient:2771): GStreamer-CRITICAL **: gst_bin_add: assertion
'GST_IS_ELEMENT (element)' failed
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff75b6c13 in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0

(gdb) *bt*

#0  0x00007ffff75b6c13 in g_logv () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ffff75b6d72 in g_log () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff7af5751 in gst_bin_add (bin=0x66c170, element=0x0)
    at gstbin.c:1292
#3  0x000000000040268a in main ()




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gstreamer-undefined-symbol-gst-fraction-type-error-tp4674349p4674417.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer undefined symbol: _gst_fraction_type error

stproj
In reply to this post by Nicolas Dufresne-3
Nicolas Dufresne-3 wrote

Next time, try enabling debug symbols, using -g. Though here the reason
is very obvious. You call from your program (in the main() function)
gst_bin_add() with a NULL pointer (element=NULL). It's a problem in
your code. Try and check you return values (specially when calling
gst_element_factory_make()).
Hi,

The specific example is part of the good plugins examples, inside the rtp folder. Perhaps i should feed the program with some init command line arguments but it is not specified inside the code.

My expectation was, since  address and ports are reserved from the code to see a message that an incoming rtp stream has yet to be found. Instead i see these errors which are making my believe that i am missing something.

To the forum admins: since the initial problem is solved, i can open another thread in order to make more sence.

Thanks for your efforts,
S.