[gst-devel] helloworld build problems

Damien Lespiau damien.lespiau at gmail.com
Tue Dec 23 11:55:34 CET 2008


2008/12/23 Rajesh K <gstdoubts at gmail.com>:
> Hi,
> I made the following modification in my Makefile posted in the previous
> mail( I looked at the Makefile generated by configure and picked the ideas
> from there)
>
> libtool --tag=CC --mode=link $(CC) $(GST_INCLUDE_DIR) $(GLIB_INCLUDE_DIR) -o
> playbin playbin.c  $(GST_LIB_DIR) $(GLIB_LIB_DIR) $(GST_GLIB_LIBS) -pthread
>
> and this is the command that runs at the prompt.
>
>
> gcc -I/users/rajesh/gstreamer_build/GST/include/gstreamer-0.10/
> -I/usr/include/libxml2/
> -I/users/rajesh/gstreamer_build/GLIB/include/glib-2.0
> -I/users/rajesh/gstreamer_build/GLIB/lib/glib-2.0/include -o playbin
> playbin.c  -L/users/rajesh/gstreamer_build/GST/lib
> -L/users/rajesh/gstreamer_build/GLIB/lib/
> /users/rajesh/gstreamer_build/GST/lib/libgstreamer-0.10.so
> -L/users/rajesh/gstreamer_build/GLIB/lib
> /users/rajesh/gstreamer_build/GLIB/lib/libgobject-2.0.so
> /users/rajesh/gstreamer_build/GLIB/lib/libgthread-2.0.so -lrt
> /users/rajesh/gstreamer_build/GLIB/lib/libgmodule-2.0.so -ldl
> /users/rajesh/gstreamer_build/GLIB/lib/libglib-2.0.so /usr/lib/libxml2.so
> -lpthread -lz -lm -pthread -Wl,--rpath
> -Wl,/users/rajesh/gstreamer_build/GST/lib -Wl,--rpath
> -Wl,/users/rajesh/gstreamer_build/GLIB/lib -Wl,--rpath
> -Wl,/users/rajesh/gstreamer_build/GST/lib -Wl,--rpath
> -Wl,/users/rajesh/gstreamer_build/GLIB/lib
>
> That means make is some how resolving the library paths and setting them to
> user defined locations rather than system specified paths.
> I read somewhere that -Wl,--rpath results in hardcoding of the library
> locations and hence  the implementation is not portable.
>
> Can somebody please explain, what exactly happened when I included the
> libtool --tag=CC --mode=link ?
>
>
> Now if I do
> $ldd ./playbin
>         libgstreamer-0.10.so.0 =>
> /users/rajesh/gstreamer_build/GST/lib/libgstreamer-0.10.so.0 (0x005a1000)
>         libgobject-2.0.so.0 =>
> /users/rajesh/gstreamer_build/GLIB/lib/libgobject-2.0.so.0 (0x00e5b000)
>         libgthread-2.0.so.0 =>
> /users/rajesh/gstreamer_build/GLIB/lib/libgthread-2.0.so.0 (0x00ead000)
>         librt.so.1 => /lib/tls/librt.so.1 (0x00111000)
>         libgmodule-2.0.so.0 =>
> /users/rajesh/gstreamer_build/GLIB/lib/libgmodule-2.0.so.0 (0x00125000)
>         libdl.so.2 => /lib/libdl.so.2 (0x008c9000)
>         libglib-2.0.so.0 =>
> /users/rajesh/gstreamer_build/GLIB/lib/libglib-2.0.so.0 (0x002a8000)
>         libxml2.so.2 => /usr/lib/libxml2.so.2 (0x07d22000)
>         libpthread.so.0 => /lib/tls/libpthread.so.0 (0x009ba000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x008cf000)
>         libm.so.6 => /lib/tls/libm.so.6 (0x008a4000)
>         libc.so.6 => /lib/tls/libc.so.6 (0x00778000)
>         /lib/ld-linux.so.2 (0x0075b000)
> All of them have the specified paths
> Regards
> Rajesh
>
>
>
> On Tue, Dec 23, 2008 at 11:57 AM, Rajesh K <gstdoubts at gmail.com> wrote:
>>
>> Hi,
>> I have installed the glib and gstreamer-0.10.21 in
>> /users/rajesh/gstreamer_build/GLIB and /users/rajesh/gstreamer_build/GSt
>> respectively
>> I am trying to build the helloworld example in
>> gstreamer-0.10.21/tests/examples/manual/
>> I have written my own make file as follows.
>> where $HOME is /users/rajesh/
>> MAKEFILE
>>
>> ****************************************************************************************
>>
>> CC = gcc
>> GLIB_INCLUDE_DIR =-I/users/rajesh/gstreamer_build/GLIB/include/glib-2.0
>> -I/users/rajesh/gstreamer_build/GLIB/lib/glib-2.0/include
>> GLIB_LIB_DIR = -L/users/rajesh/gstreamer_build/GLIB/lib/
>>
>> GST_INCLUDE_DIR=-I$(HOME)/gstreamer_build/GST/include/gstreamer-0.10/
>> -I/usr/include/libxml2/
>> GST_LIB_DIR=-L$(HOME)/gstreamer_build/GST/lib
>>
>> PKG_CONFIG_PATH=$(HOME)/gstreamer_build/GST/lib/pkgconfig/
>> GST_GLIB_LIBS= -lgstreamer-0.10 -lgobject-2.0 -lgthread-2.0 -lrt
>> -lgmodule-2.0 -ldl -lglib-2.0 -lxml2
>>
>> all: clean playbin
>> playbin:
>>         $(CC) $(GST_INCLUDE_DIR) $(GLIB_INCLUDE_DIR) -o playbin playbin.c
>> $(GST_LIB_DIR) $(GLIB_LIB_DIR) $(GST_GLIB_LIBS) -pthread
>> clean:
>>         rm -rf playbin *.o
>>
>> **********************************************************************************************************************
>> the executable playbin is built
>> The I set the LD_LIBRARY_PATH as follows
>> $set
>> LD_LIBRARY_PATH=($HOME/gstreamer_build/GST/include/gstreamer-0.10/:$HOME/gstreamer_build/GST/lib/:$LD_LIBRARY_PATH)
>> when I try to run playbin
>> It says it cannot find the shared library libgstreamer-0.10.21
>> ldd produces the following output
>> $ldd ./playbin
>>         libgstreamer-0.10.so.0 => not found
>>         libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00c65000)
>>         libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00688000)
>>         librt.so.1 => /lib/tls/librt.so.1 (0x005bf000)
>>         libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00c60000)
>>         libdl.so.2 => /lib/libdl.so.2 (0x008c9000)
>>         libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00af6000)
>>         libxml2.so.2 => /usr/lib/libxml2.so.2 (0x07d22000)
>>         libpthread.so.0 => /lib/tls/libpthread.so.0 (0x009ba000)
>>         libc.so.6 => /lib/tls/libc.so.6 (0x00778000)
>>         /lib/ld-linux.so.2 (0x0075b000)
>>         libz.so.1 => /usr/lib/libz.so.1 (0x008cf000)
>>         libm.so.6 => /lib/tls/libm.so.6 (0x008a4000)
>>
>> I don't understand
>> 1.why it is not able to detect libgstreamer-0.10.21
>> 2.why the default library paths are being set for other libarires
>>
>> Any clues on this?
>> Regards
>> Rajesh
>>
>>
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>



-- 
Damien Lespiau




More information about the gstreamer-devel mailing list