This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiling GStreamer 1.0 for ARM

Hello,

I am trying to compile my code for ARM. I have already developed a pipeline to play video. But, It fails to compile for ARM. Previously I was using GLSDK 6.04 which had Gstreamerv0.10. But, now I use GLSDK 7.03 which has GStreamer v1.0. I need my code to be compiled for ARM.

I use, arm-linux-gnueabi-gcc My_Gst_app.c -o gstapppc `pkg-config --libs --cflags gstreamer-1.0 gstreamer-app-1.0` to comile.
But I get error, saying

Package gstreamer-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-1.0' found
Package gstreamer-app-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-app-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-app-1.0' found
My_Gst_app.c:2:20: fatal error: gst/gst.h: No such file or directory
compilation terminated.


I checked for the .so files in /usr/arm-linux-gnueabi/libs. But, I can find none of the files like "libgstapp-1.0.so, libgstbase-1.0.so, libgstreamer-1.0.so". Instead, I can find only 0.10's .so files.


I also tried to find the .so files for v1.0 in targetfs directory which got created when GLSDK was installed. And also searched on internet. But couldn't succeed.

Please help me in compiling the code for ARM.

Thanks in Advance!

Shylesh S

  • Hello,

    Could you search for libgstreamer1.0
    I am asking because gst/gst.h is provided by this lib.


    You could check this :

    "To compile the helloworld example, use:
    gcc -Wall helloworld.c -o helloworld $(pkg-config --cflags
    --libs gstreamer-1.0)
    . GStreamer makes use of
    pkg-config
    to get compiler and linker flags needed to
    compile this application.
    If you’re running a non-standard installation (ie. you’ve i
    nstalled GStreamer from source yourself instead
    of using pre-built packages), make sure the
    PKG_CONFIG_PATH
    environment variable is set to the correct
    location (
    $libdir/pkgconfig
    ).
    In the unlikely case that you are using an uninstalled GStrea
    mer setup (ie. gst-uninstalled), you will need
    to use libtool to build the hello world program, like this:
    libtool --mode=link gcc -Wall helloworld.c -o
    helloworld $(pkg-config --cflags --libs gstreamer-1.0"


    Are you able to build it for PC? Or it is failing for both ( PC and Arm )?

    BR
    Margarita
  • Hello Margarita,

    I get this error.

    Package gstreamer-1.0 was not found in the pkg-config search path.

    Perhaps you should add the directory containing `gstreamer-1.0.pc'

    to the PKG_CONFIG_PATH environment variable

    No package 'gstreamer-1.0' found

    libtool: link: gcc -Wall My_Gst_app.c -o gstapppc

    My_Gst_app.c:2:20: fatal error: gst/gst.h: No such file or directory

    compilation terminated.

     


    I couldn't get the code compiled for both PC and arm. 

    My PKG_CONFIG_PATH path is /usr/lib/pkgconfig


    kindly help me.

    Thanks

    Shylesh S

  • Hello,

    For ARM have you cross-compiled gstreamer Or does the GLSDK have cross-complied libraries for it so that you can include in your include paths ?
    For your PC have you installed gstreamer ? Which OS are you using ?

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar,

    GLSDK has Cross Compiled Packages. So, I can compile for arm from my PC and use the executable file on the Board directly.
    For PC, I have nstalled gstreamer using "sudo apt-get install" method.
    I am using Ubuntu 12.04 LTS.

    BR,
    Shylesh S
  • Hello,

    If GLSDK has compiled the gstreamer and has all the libraries & includes file, can you tell what location its is ? Does glsdk have pc files for gstreamer library ?

    What is the output of the following command:
    'pkg-config --libs --cflags gstreamer-1.0 gstreamer-app-1.0'

    To install gstreamer-1.0 on 12.04

    hit the following commands,

    sudo apt-get install ubuntu-restricted-extras

    //backports from gstreamer developer ppa

    sudo add-apt-repository ppa:gstreamer-developers/ppa
    sudo apt-get update

    //install the base packages and plugins for gstreamer
    sudo apt-get install gstreamer1.0*


    Cheers,
    --Prabhakar Lad
  • Hello Prabhakar,

    When I try to install GStreamer 1.0, I get this error!!!

    root@jpc385:/home/shylesh#  sudo apt-get install gstreamer1.0*

    Reading package lists... Done

    Building dependency tree      

    Reading state information... Done

    E: Unable to locate package gstreamer1.0*

    E: Couldn't find any package by regex 'gstreamer1.0*'

    Output for the command  'pkg-config --libs --cflags gstreamer-1.0 gstreamer-app-1.0':

    root@jpc385:/home/shylesh# pkg-config --libs --cflags gstreamer-1.0 gstreamer-app-1.0

    Package gstreamer-1.0 was not found in the pkg-config search path.

    Perhaps you should add the directory containing `gstreamer-1.0.pc'

    to the PKG_CONFIG_PATH environment variable

    No package 'gstreamer-1.0' found

    Package gstreamer-app-1.0 was not found in the pkg-config search path.

    Perhaps you should add the directory containing `gstreamer-app-1.0.pc'

    to the PKG_CONFIG_PATH environment variable

    No package 'gstreamer-app-1.0' found

     

    I just mentioned about the GLSDK compiled GStreamer, Because when I use the processor (with bootable SD Card), I could run gst-launch1.0 or gst-inspect-1.0. And also, I prepared a pipeline which worked fine.


    BR,

    Shylesh S

  • Hello,

    To install gstreamer-1.0 on your machine (ubuntu 12.04) hit the following 4 commands in order:

    1: sudo apt-get install ubuntu-restricted-extras

    2: sudo add-apt-repository ppa:gstreamer-developers/ppa

    3: sudo apt-get update

    4: sudo apt-get install gstreamer1.0*

    If the above still fails please provide the logs of all the commands.

    Shylesh

    I just mentioned about the GLSDK compiled GStreamer, Because when I use the processor (with bootable SD Card), I could run gst-launch1.0 or gst-inspect-1.0. And also, I prepared a pipeline which worked fine.

    This means that the filesystem in the bootable sd card  has the cross compiled executables and binaries.

    Cheers,

    --Prabhakar Lad

  • Hi Prabhakar,

    I couldn't install Gstreamer 1.0, in spite of having a proper net access for the installation.

    I will attach the log files here.

    1: sudo apt-get install ubuntu-restricted-extras

    root@jpc385:/home/shylesh# sudo apt-get install ubuntu-restricted-extras
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    ubuntu-restricted-extras is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 247 not upgraded.

    2: sudo add-apt-repository ppa:gstreamer-developers/ppa

    root@jpc385:/home/shylesh# sudo add-apt-repository ppa:gstreamer-developers/ppa

    Cannot access PPA (launchpad.net/.../ppa) to get PPA information, please check your internet connection.

    3: sudo apt-get update

    This process got completed successfully.

    Fetched 6,091 kB in 16s (364 kB/s)                                                                                                  
    Reading package lists... Done

    4: sudo apt-get install gstreamer1.0*

    root@jpc385:/home/shylesh#
    root@jpc385:/home/shylesh# sudo apt-get install gstreamer1.0*
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package gstreamer1.0*
    E: Couldn't find any package by regex 'gstreamer1.0*'

    And, Yes. The Bootable SD card is capable of processing the GStreamer files, as it has the needy Binaries and Executables.

    BR,

    Shylesh S

  • Hello,

    Could you check in you GLSDK installation dir about :
    gstreamer-app-1.0.pc for example.

    Notice that this is .pc file.

    I am not sure about GLSDK but you should :

    export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS/usr/lib/pkgconfig

    in pkgconfig folder you have .pc files.

    BR
    Margarita
  • Hi Margarita,

    I checked my GLSDK installed directory and the bootable SD card.
    It doesn't contain a file called gstreamer-app-1.0.pc

    BR,
    Shylesh S
  • Hello,

    Either you need to update you operating system to 14.04+ which has gstreamer-1.0 support by default Or manually download source compile n install in you OS.

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar,

    I see that my GLSDK (7.03) works only with Ubuntu 12.04. Can you let me know, if 14.04 supports GLSDK??

    I also tried compiling and installing the GStreamer 1.0 manually. But, I get an error like this " configure: Requested 'glib-2.0 >= 2.40' but version of GLib Uninstalled is 2.32.4"

     

    Best Regards,

    Shylesh S

  • Hello,

    I am not sure if glsdk will work on 14.04, as the wiki says 12.04.
    Alternatively you can just cross compile your gstreamer application on a different machine which has ubuntu 14.04 + and gstreamer-1.0
    all you just need to copy your cross-compiler to that machine.

    Cheers,
    --Prabhakar Lad
  • Thank you very much Prabhakar! I will get back If I need more clarifications!

    BR,
    Shylesh S
  • Hello Prabhakar/Margarita,

    I have now installed GSTREAMER from the source files. I followed the link "" to install. But, used the following commands to make and install.

    ./configure --host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabi/usr/local/ --disable-loadsave --disable-gtk-doc --disable-examples --includedir=/usr/arm-linux-gnueabi/usr/include/ --libdir=/usr/arm-linux-gnueabi/usr/local/lib/ --exec-prefix=/usr/arm-linux-gnueabi/usr/local/

    make -j4

    make install

    I have also exported the PKG_CONFIG_PATH. (export PKG_CONFIG_PATH=/usr/arm-linux-gnueabi/usr/local/lib/pkgconfig/)
    Now, I find no errors which expect some missing .so files. But I face some other issue. When I try to compile my code using  arm-linux-gnueabi-gcc -Wall My_Gst_app.c -o gstapparm  `pkg-config --cflags --libs gstreamer-1.0 gstreamer-app-1.0` , I get the following error.


    root@shylesh:/home/shylesh/Standalones/Gstreamer_basic# arm-linux-gnueabi-gcc -Wall My_Gst_app.c -o gstapparm  `pkg-config --cflags --libs gstreamer-1.0 gstreamer-app-1.0`
    My_Gst_app.c: In function ‘bus_call’:
    My_Gst_app.c:8:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
    My_Gst_app.c:8:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
    My_Gst_app.c: In function ‘on_pad_added’:
    My_Gst_app.c:39:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
    My_Gst_app.c: In function ‘main’:
    My_Gst_app.c:123:1: warning: implicit declaration of function ‘gst_bin_add_many’ [-Wimplicit-function-declaration]
    My_Gst_app.c:127:1: warning: implicit declaration of function ‘gst_element_link’ [-Wimplicit-function-declaration]
    My_Gst_app.c:131:1: warning: implicit declaration of function ‘gst_element_link_many’ [-Wimplicit-function-declaration]
    My_Gst_app.c:56:10: warning: unused variable ‘caps’ [-Wunused-variable]
    My_Gst_app.c:54:13: warning: unused variable ‘msg’ [-Wunused-variable]
    /usr/arm-linux-gnueabi/usr/local/lib/libgstapp-1.0.so: file not recognized: File format not recognized
    collect2: ld returned 1 exit status


    I see that the .so and .pc files are all available. But, I get FILE FORMAT NOT RECOGNIZED error.

    I have not yet tried compiling using Ubuntu 14.04. Should I try compiling using 14.04 OS also??

    Kindly help me!

    Best Regards,

    Shylesh S

  • Hi,
    I have also tried this on Ubuntu 14.04. The same happens with this also. I face the same errors. I have also tried downloading the source files and compiling it, as I’ve mentioned on the previous post.

    Can you kindly, help me in finding the cross compiled .so files for arm that are readily available on the web for Gstreamer 1.0?? Coz, I could find the .so files for arm that are available.
    Or, If not possible.. Please let me know regarding the procedure of cross compiling the Gstreamer Application for the ARM.

    Thanks a lot.
    Shylesh S
  • Hello,

    When you have cross-compiled glib & gstreamer, just use -I and -L option of gcc and compile.

    For example:

    arm-linux-gnueabi-gcc -Wall My_Gst_app.c -o gstapparm -I <path where include files for gst reamer are present> -L <path where gstreamer libraries are present> -lgstapp.so.... (similar for glib)

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar/ Margarita,

    I got the job done.

    We, in our team have a BeagleBone board for which we use a PROCESSOR SDK kit(for Sitara Processors). On checking the installed SDK files for the .so files, I found them to be present. As a result, I tried to Cross Compile my file for ARM using the SDK files, by changing the PATH and PKG_CONFIG_PATH paths.

    These are the exported paths,

    export PATH=/opt/ti-processor-sdk-linux-am335x-evm-02.00.01.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/:$PATH

    export PKG_CONFIG_PATH=/opt/ti-processor-sdk-linux-am335x-evm-02.00.01.07/linux-devkit/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/lib/pkgconfig/


    It successfully got cross compiled. I was able to cross compile my files for ARM.

    But, I am still in search of a unique way to generate the gstreamer dependency files for compiling it for ARM Target Board.

    Any kind of solution would be most welcomed.

    Thanks a lot for your support.

    Best Regards,

    Shylesh S

  • Hi,

    Great good to hear.

    I usually use buildgear [1], to build my own sdk

    [1] buildgear.io/handbook.php

    Cheers,
    --Prabhakar Lad
  • Hello Prabhakar,
    Thank you very much!
    I hope this will be a useful info.

    Regards,
    Shylesh S