After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 712631 - On Redhat 6.4 gstreamer 1.0 build fails
On Redhat 6.4 gstreamer 1.0 build fails
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.2.1
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-18 20:00 UTC by navesta
Modified: 2013-11-25 11:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description navesta 2013-11-18 20:00:58 UTC
Overview:

Linker fails while linking gst-plugin-scanner.
autogen didn't complain during configuration. However, during  gst-plugin-scanner build, linker fails

Steps to Reproduce:

1- ./autogen.sh --prefix=/usr
2- make -j 10

Actual Results:
1- ./autogen.sh --prefix=/usr
...
Configuration
        Version                    : 1.2.1
        Source code location       : .
        Prefix                     : /usr
        Compiler                   : gcc -std=gnu99
        Package name               : GStreamer source release
        Package origin             : Unknown package origin

        Documentation (manuals)    : yes
        Documentation (API)        : yes

        Debug Logging              : yes
        Command-line parser        : yes
        Option parsing in gst_init : yes
        Tracing subsystem          : yes
        Allocation tracing         : yes
        Plugin registry            : yes
        Plugin support             : yes
        Static plugins             : no
        Unit testing support       : yes

        Debug                      : yes
        Profiling                  : no

        Building benchmarks        : yes
        Building examples          : yes
        Building test apps         : yes
        Building tests that fail   : yes
        Building tools             : yes

Now type 'make' to compile gstreamer.

2- make -j 10 
...
...
make[4]: Leaving directory `/home/navesta/work/gstreamer/gstreamer1.x/gstreamer-1.2.1/libs/gst/check'
Making all in helpers
make[4]: Entering directory `/home/navesta/work/gstreamer/gstreamer1.x/gstreamer-1.2.1/libs/gst/helpers'
  CC     gst_plugin_scanner-gst-plugin-scanner.o
  CCLD   gst-plugin-scanner
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_cond_clear'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_add'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_rw_lock_reader_lock'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_cond_wait_until'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_to_unix'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_get_month'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_rw_lock_reader_unlock'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_cond_broadcast'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_list_free_full'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_new_from_unix_local'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_get_hour'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_mutex_init'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_new_now_local'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_get_utc_offset'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_rec_mutex_lock'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_rw_lock_init'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_mutex_unlock'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_object_class_install_properties'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_time_zone_unref'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_rw_lock_writer_lock'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_new_local'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_cond_wait'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_cond_init'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_time_zone_new'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_unref'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_thread_get_type'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_new_now_utc'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_new'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_rec_mutex_clear'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_cond_signal'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_new_from_unix_utc'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_get_year'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_get_microsecond'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_array_set_clear_func'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_rw_lock_writer_unlock'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_mutex_lock'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_get_monotonic_time'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_source_set_name'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_rec_mutex_unlock'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_get_day_of_month'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_object_notify_by_pspec'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_get_minute'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_mutex_clear'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_cclosure_marshal_generic'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_error_get_type'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_type_class_adjust_private_offset'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_thread_try_new'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_date_time_get_second'
../../../gst/.libs/libgstreamer-1.0.so: undefined reference to `g_rec_mutex_init'
collect2: ld returned 1 exit status
make[4]: *** [gst-plugin-scanner] Error 1
make[4]: Leaving directory `/home/navesta/work/gstreamer/gstreamer1.x/gstreamer-1.2.1/libs/gst/helpers'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/navesta/work/gstreamer/gstreamer1.x/gstreamer-1.2.1/libs/gst'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/navesta/work/gstreamer/gstreamer1.x/gstreamer-1.2.1/libs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/navesta/work/gstreamer/gstreamer1.x/gstreamer-1.2.1'
make: *** [all] Error 2


Expected Results:
Successful build.

Build Date & Platform:
2013-11-18 Redhat 6.4, with 3.10.4 kernel

Additional Builds and Platforms:
NA

Additional Information: 

Here are "nm" results on libgstream and Glib, for a sample function:

$ nm libgstreamer-1.0.so | grep g_thread_try_new
                 U g_thread_try_new
$ nm /usr/lib/libglib-2.0.so  | grep g_thread_try_new
000000000006d910 T g_thread_try_new
Comment 1 Tim-Philipp Müller 2013-11-18 20:21:26 UTC
Any chance you might have some ancient and long-forgotten GLib installed somewhere on your system in some other prefix such as /usr/local ?
Comment 2 Fredrik Wigert 2013-11-19 16:09:42 UTC
I got this problem too, trying to build gstreamer on CentOS 6.4.
I built my own glib2-38.2, and at first used prefix=/usr. When I rebuilt it with /usr/local as prefix it worked all of a sudden. Make sure your libgstreamer-1.0.so is linking the corrent lib, run the following command:
ldd gst/.libs/libgstreamer-1.0.so.0.200.0

Hope this might help!
Comment 3 navesta 2013-11-20 21:22:03 UTC
Thank you for your valuable replies.
I think that I have  a handle on the problem. As suspected gstreamer is pointing to an older version of Glib:

$ldd gst/.libs/libgstreamer-1.0.so.0.201.0 (Thank you Fredrik)
        linux-vdso.so.1 =>  (0x00007fff0876e000)
        libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f5081b7c000)
        libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f5081978000)
        libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f5081693000)
        libffi.so.6 => /usr/lib/../lib64/libffi.so.6 (0x00007f508148b000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f5081206000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5080fe9000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f5080de1000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f5080bdc000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f5080849000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003084a00000)
Somewhat misleading is the output of pkg-config:
$ pkg-config --modversion glib-2.0
2.38.1

Set LDFLAGS  variable to new library path
export LDFLAGS="-L/usr/local/lib"

And set PKG_CONFIG_PATH  to /usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib:$ PKG_CONFIG_PATH

And voila, it built!

Strangely enough ldd still points to the old /lib64 library! Binaries seem to be fine:
$ ./gst-launch-1.0  --version
gst-launch-1.0 version 1.2.1
GStreamer 1.2.1
Unknown package origin
$

Will experiment further and report.
Cheers,