Link to home
Create AccountLog in
Avatar of Georges_Antoun
Georges_AntounFlag for Egypt

asked on

undefined reference to gst_gconf_get_default_video_sink

Dear Gurus,

When compiling wxWidgets 2.8.10 under Linux RedHat Entreprise 4 release 4, I used the following command to configure:
../configure --with-gtk --enable-monolithic --enable-mediactrl

I used --enable-mediactrl to enable the wav audio playback which is a feature of my application I am developing.
When I linked afterwards with the application or even with the sample "mediaplayer" I got the following linking error.

g++ -o mediaplayer   mediaplayer_mediaplayer.o    -L../../lib  -Wl,-rpath,../../lib -pthread   -L/usr/X11R6/lib64     -Wl,--export-dynamic -pthread -lgstinterfaces-0.8 -lgstgconf-0.8 -lgstreamer-0.8 -lgconf-2 -lgobject-2.0 -lxml2 -lpthread -lz -lORBit-2 -lm -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0       -lwx_gtk2-2.8         -pthread   -L/usr/X11R6/lib64  -Wl,--version-script,../../version-script -lz -ldl -lm  -Wl,--export-dynamic -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm -lSM -lpng -lz -ljpeg -ltiff -lz -ldl -lm

wxWidgets/wxWidgets-2.8.10d_RHE4/buildGTK/lib/ undefined reference to `gst_gconf_get_default_audio_sink()'
wxWidgets/wxWidgets-2.8.10d_RHE4/buildGTK/lib/ undefined reference to `gst_gconf_get_default_video_sink()'
collect2: ld returned 1 exit status
make: *** [mediaplayer] Error 1

Any help in this ?

Many Thanks Merry Xmas and happy new year,
Georges Antoun
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

2.8.8 is the current stable version - why are you using 2.8.10 and how did you get it?
Avatar of Georges_Antoun


It is written down that current stable version is 2.8.11, from following URL
I got 2.8.11 and it produces the same error.
I found 2.8.8 by googling. No worries - I have 2.8.11 now, so will see what transpires when I try to build it
I think your problem might be in ../src/unix/mediactrl.cpp (relative to the directory where you ran ../configure):
   117 // Other 0.10 macros
   121 #   define GstElementState GstState
   122 #   define gst_gconf_get_default_video_sink() \
   123         gst_element_factory_make ("gconfvideosink", "video-sink");
   124 #   define gst_gconf_get_default_audio_sink() \
   125         gst_element_factory_make ("gconfaudiosink", "audio-sink");
   126 #endif

Open in new window

For some reason, the #if is returning false, and gst_gconf_get_default_video_sink is not being #defined. On my system, these constants are defined in /usr/include/gstreamer-0.10/gst/gstversion.h with major and minor at line/value 48/0 and 54/10 respectively.
I suggest you upgrade GStreamer. Alternatively you could try adding --enable-gstreamer8 to your ../configure line if you have GStreamer 0.8 and don't wish to upgrade.
(you need to rebuild and re-install wxWidgets if you upgrade GStreamer)
I have an older wxWidgets installed so couldn't build the sample :(
Thank you very much for your input.

I went to adding --enable-gstreamer8 switch to ../configure but got the exact same result.
If this is possible to give it a try on your end (just by doing make after configure) and see whether you can make the mediaplayer sample which uses the same tree newly built.
#mkdir buildGTK
#cd buildGTK
#../configure --with-gtk --prefix=/home/gantoun/lib/wxWidgets2.8.10d_RHE4 --enable-monolithic --enable-mediactrl --enable-gstreamer8
#cd samples/mediaplayer
No need to make install.

Thank you very much
I'm back from holiday but it's a bit late tonight to do anything much.
I did find that my installation is in fact 2.8.11, but built without --enable-mediactrl (from unsuccessful attempt to build Flash open source alternative, suspended since Flash (eventually) started working for me again).
Will rebuild with --enable-mediactrl when I get some time (tomorrow, maybe)
I did as you asked and tried --enable-gstreamer8. I didn't expect it to do any  good as I have gstreamer 10 installed and I don't have gstreamer 8.
I like to encapsulate configure command lines in 1-line files which keep a log, so can show you what transpired:
11:20:12$ cd /usr/src/wxWidgets-2.8.11
11:21:56$ diff buildgs8/confline buildgs/         
< ../configure --prefix=/usr --with-gtk --enable-monolithic --enable-mediactrl --enable-gstreamer8 2>&1|tee heeconf
> ../configure --prefix=/usr --with-gtk --enable-monolithic --enable-mediactrl 2>&1|tee heeconf
11:22:12$ diff buildgs8/heeconf buildgs/
< checking for --enable-gstreamer8... yes
> checking for --enable-gstreamer8... no
< checking for GST... configure: WARNING: GStreamer 0.8/0.10 not available.
> checking for GST... yes
> config.status: creating samples/mediaplayer/Makefile

Open in new window

As you can see, the result of specifying --enable-gstreamer8 is that configure complains that I don't have it and doesn't build a Makefile for mediaplayer.
I'll see whether I can build the sample next.
I did a make install, after which the mediaplayer build was uneventful:
11:40:16$ cd /usr/src/wxWidgets-2.8.11/buildgs/samples/mediaplayer
11:52:23$ ls -Fx
11:52:24$ make 2>&1|tee hee
/usr/src/wxWidgets-2.8.11/buildgs/bk-deps g++ -c -o mediaplayer_mediaplayer.o -D__WXGTK__     -I../../../samples/mediaplayer -DWXUSINGDLL -I../../../samples/mediaplayer/../../samples -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/src/wxWidgets-2.8.11/buildgs/lib/wx/include/gtk2-ansi-release-2.8 -I../../../include -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -pthread -DORBIT2=1 -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -DWX_PRECOMP -pthread -Wall -Wundef -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing ../../../samples/mediaplayer/mediaplayer.cpp
g++ -o mediaplayer   mediaplayer_mediaplayer.o    -L/usr/src/wxWidgets-2.8.11/buildgs/lib  -Wl,-rpath,/usr/src/wxWidgets-2.8.11/buildgs/lib -pthread   -L/usr/X11R6/lib     -pthread -Wl,--export-dynamic -lgstreamer-0.10 -lxml2 -lgconf-2 -lORBit-2 -lgobject-2.0 -lgthread-2.0 -ldl -lm -lgmodule-2.0 -lrt -lglib-2.0   -lgstinterfaces-0.10     -lwx_gtk2-2.8         -pthread   -L/usr/X11R6/lib  -Wl,--version-script,/usr/src/wxWidgets-2.8.11/buildgs/version-script -lz -ldl -lm  -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXinerama -lXxf86vm -lSM -lpng -lz -ljpeg -ltiff -lz -ldl -lm
11:52:39$ ls
Makefile  hee  mediaplayer*  mediaplayer_mediaplayer.o

Open in new window

Wen I tried running, I got a new GUI screen but there were errors in the command window:
11:53:03$ ./mediaplayer 

(gst-plugin-scanner:21636): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/': cannot open shared object file: No such file or directory

(mediaplayer:21635): Gtk-CRITICAL **: gtk_range_set_range: assertion `min < max' failed

(mediaplayer:21635): Gtk-CRITICAL **: gtk_range_set_range: assertion `min < max' failed

(mediaplayer:21635): Gtk-CRITICAL **: gtk_range_set_range: assertion `min < max' failed

(mediaplayer:21635): Gtk-CRITICAL **: gtk_range_set_range: assertion `min < max' failed

Open in new window

The assertion failures came one every second or so until I terminated the GUI using its File / Exit. The real problem is, I think, the absence of which is a part of v4l-utils, available from I'll try that next.
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
I'm impressed:) I opened a .wav file and it played! Also, the warnings stopped.
I am a bit confused.

I have gstreamer 0.8 installed on Redhat Entreprise 4.
Moving to gstreamer 0.10 is not the best thing as it requires lots of dependencies that I do not have.
When I run the following configure:
../configure --prefix=/usr --with-gtk --enable-monolithic --enable-mediactrl --enable-gstreamer8

I got:
checking for GST... yes

which means that the GST is ok

g++ -o wxrc wxrc_wxrc.o    -L/export/home/users/cairosolo/gantoun/wxWidgets/wxWidgets-2.8.10/build/lib  -pthread   -L/usr/X11R6/lib64     -lexpat -lwx_gtk2-2.8     -pthread   -L/usr/X11R6/lib64  -Wl,--version-script,/export/home/users/cairosolo/gantoun/wxWidgets/wxWidgets-2.8.10/build/version-script -lz -ldl -lm  -Wl,--export-dynamic -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm -lSM -lpng -lz -ljpeg -ltiff -lz -ldl -lm
/export/home/users/cairosolo/gantoun/wxWidgets/wxWidgets-2.8.10/build/lib/ undefined reference to `gst_gconf_get_default_audio_sink()'
/export/home/users/cairosolo/gantoun/wxWidgets/wxWidgets-2.8.10/build/lib/ undefined reference to `gst_gconf_get_default_video_sink()'
collect2: ld returned 1 exit status
make[1]: *** [wxrc] Error 1
make[1]: Leaving directory `/export/home/users/cairosolo/gantoun/wxWidgets/wxWidgets-2.8.10/build/utils/wxrc'
make: *** [wxrc] Error 2

Open in new window

The last step of make (linking) does not succeed, while left me with an impression that the LD_LIBRARY_PATH is not including the correct libraries.

One more thing: inside /usr/lib/pkgconfig/ there is no files starting with gstrea*, however you can find the files at their places:
ksh [cairosolo] /usr/lib> ls -l | grep -i gst
drwxr-xr-x    2 root root        4096 Nov  9  2009 gstreamer-0.8
lrwxrwxrwx    1 root root          26 Nov  9  2009 ->
-rwxr-xr-x    1 root root       44984 Dec  4  2004
lrwxrwxrwx    1 root root          25 Nov  9  2009 ->
-rwxr-xr-x    1 root root     1150864 Dec  4  2004

Open in new window

Many Thanks for all your efforts to help me in getting this resolved.
The code is written to expect that if you have GStreamer version 8, then it will supply the entry point gst_gconf_get_default_audio_sink(). But you have found that it does not. If you google for gst_gconf_get_default_audio_sink you find some backtraces. Can you try that please and see if you can make any sense of them? I have to go to work now.
I can break this question to:

Does anyone knows in which library (.so file), the following 2 functions are defined ?

When I do:
$ nm /usr/lib64/libgst*.so
It returns "no symbols"

Thank you very much,
You would do much better to upgrade to GStreamer 10. Doesn't yum handle dependencies? Otherwise just do it.
Yes I've noticed that sort of thing with nm and dynamic libraries - the entry points are not visible as such because the library responds with their addresses dynamically.
If you try "strings" instead of "nm", you will see a bit more.
According to a backtrace I found on the Web, the entry point is in the GStreamer library I don't have such a library, guess it must be an optional component.
I didn't build GStreamer from source - will try to look at it this evening, have to go to work now.
Mate this package is so old I think you're going to have a hard time building it.
I append all the patches we applied at work, but don't apply the fairly_useless_patches, they're only for reference, especially Makefile.cfg. Really you only need to apply the important_patches.
Gcc has however moved along some way from when that used to be all you needed. You'll see errors to do with labels at the end of compound statements - fixable by inserting a semicon on the next line. Then you'll see "lvalue required as left operand of assignment" - it used to be allowed to apply a cast on the LHS but not any more. You'd need to use memcpy or memmove now.
I don't know if there are more errors -- it's getting late.
The diffs were done with -w, so use -l (ell) patch option, e.g. cat /tmp/important_patches.txt| patch -p0 -l when the CWD is /usr/src/svgalib-1.4.3
Sorry that's an answer to another post entirely.
Had a look in gstreamer-0.10.23 and gstreamer-0.10.29 - no sign of gst_gconf_get_default_audio_sink or gst_gconf_get_default_video_sink. The backtrace I saw at was gstreamer 0.10 but maybe an early one.
As I said before, you would do best to upgrade to GStreamer 0.10 (or upgrade your whole system  - I thought I heard RHEL6 is out now)
Hi Evilrix,

Much as I appreciate and respect your work as a cleanup volunteer, I beg to differ with your appraisal of this Q. Basically I think I posted the answer:

I first posted the solution in http:#a34509117. He posted in http:#a34547401 that he doesn't want to do that, but he has to, as I reaffirmed in http:#a34627476. Really, you can't expect to develop software using current packages in an antique distribution such as he has, without considerable effort.
Many thanks for your help. It does really resolved the problem described.
However in my case, I am tied to a certain platform which was a bit restricting.
In the near future, upgrading to RHE5 or RHE6, your answer will be really helpful to me.

Thank you again,
Hi duncan_roe,

Without feedback from the asker we can only make recommendations for solutions where it is obvious the answer either resolved or would have lead to a resolution. In this case the asker stated they were not in a position to undertake your solution meaning it did not resolve their issue. For this reason I could not recommend it as a solution. I see now; however, that the asker has returned an accepted it as a solution - that's just fine :)

The work the CVs do is as much about trying to get to the resolution of a question as it is about cleaning up. Whilst our remit is pretty well defined with regards to the recommendation of solutions it does, often, lead to the asker returning to a question and finalising it themselves. In that respect, it has worked here.

Best regards,