Compiling gstreamer on RPI2 using Arch

Faktor E2 faktorqm_e2 at yahoo.com.ar
Thu Jul 9 08:19:35 PDT 2015


Dear all, I have tried to compile gstreamer1.0 for Raspberry pi 2 using Arch linux distribution following this instructions: http://permalink.gmane.org/gmane.comp.video.gstreamer.devel/43011 Many thanks to Sebastian Dröge for share his knowledge. If this mail-list is not the appropiate one for this kind of questions, please let me know and sorry for this email. 
My goal is to use the hardware as much as possible to play videos with omxplayer. As Arch is other distribution (the instructions are for Raspbian) I made my own version of those instructions checking name by name all the libraries, and fixing some missing libraries (at least under Arch laws).Of course, it didn't work. :) I'm using a fresh install, using the image provided here 
http://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2
and only used the commands posted here. (only installed tools like wget, X server, chromium)

Here my recipe:
STEP 1:
pacman -Syu (this means update packages list and upgrade all the installed packages if applicable)

pacman -S gnurl exempi libgme libiptcdata libkate libmms libmodplug libmpcdec libofa opus-tools opusfile libfslvpuwrap tesseract-data-slv soundtouch twolame libsidplay zbar zvbi spandsp gtk3 v4l-utils binutils fakeroot gcc make patch sudo gtk-doc gconf gconfmm libbcm2835 cogl gts automake autoconf pkg-config bison flex git libmp4v2 libmpeg2 libgudev libvisual libvisual-plugins cdparanoia libraw1394 iso-codes speex libavc1394 libiec61883 libshout libdv libtaginfo wavpack libsoup libcdaudio libdc1394 ladspa
(those are, as far as I knew, all the required libraries under Arch.)
STEP 2: Download sources
git clone git://anongit.freedesktop.org/git/gstreamer/gstreamergit clone git://anongit.freedesktop.org/git/gstreamer/orcgit clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-basegit clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-goodgit clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-badgit clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-uglygit clone git://anongit.freedesktop.org/git/gstreamer/gst-libavgit clone git://anongit.freedesktop.org/git/gstreamer/gst-omx
STEP 3:
Do
./autogen.shmake -j3make install
on each directory following this order
gstreamerorcgst-plugins-base (in order to get working this, I need to use "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" because autogen does not find "gstreamer" installed before)gst-plugins-goodgst-plugins-uglygst-libav
STEP 4: (please note the capital "L", on the original recipe was just "l" and it didn't work under arch)
LDFLAGS='-L/opt/vc/lib' CPPFLAGS='-L/opt/vc/include -L/opt/vc/include/interface/vcos/pthreads -L/opt/vc/include/interface/vmcs_host/linux' ./autogen.sh
makemake install
STEP 5:
LDFLAGS='-L/opt/vc/lib' CPPFLAGS='-L/opt/vc/include -L/opt/vc/include/IL -L/opt/vc/include/interface/vcos/pthreads -L/opt/vc/include/interface/vmcs_host/linux' ./autogen.sh --with-omx-header-path=/opt/vc/include/IL --with-omx-target=rpi
makemake install
I added --with-omx-header-path=/opt/vc/include/IL to autogen, because when you do "make", it fails saying that is not able to find libraries under that path. The curious thing here is that there is not the only thing, also is missing a lot of files needed under indicated paths!!!!! :( 
The error is on "make" in STEP 5. This is the output: 
[...]Making all in omxmake[2]: Entering directory '/root/gst-omx/omx' CC libgstomx_la-gstomx.lo CC libgstomx_la-gstomxbufferpool.lo CC libgstomx_la-gstomxvideo.lo CC libgstomx_la-gstomxvideodec.logstomxvideodec.c:41:42: fatal error: gst/gl/egl/gsteglimagememory.h: No such file or directorycompilation terminated.Makefile:722: recipe for target 'libgstomx_la-gstomxvideodec.lo' failed[...]
Looking for that file... # find / -type f -name gsteglimagememory.h/root/gst-plugins-bad/gst-libs/gst/gl/egl/gsteglimagememory.h
I didn't know how to add that path to the autogen (may be in cppflags?) so I decided to copy the entire gst folder to gst-omx root folder. cp -R /root/gst-plugins-bad/gst-libs/gst /root/gst-omx/Then did make again:
[...]
Making all in eglmake[3]: Entering directory '/root/gst-omx/examples/egl'    CC         testegl-testegl.o
testegl.c:65:22: fatal error: bcm_host.h: No such file or directorycompilation terminated.[...]

Looking for that file... # find / -type f -name bcm_host.h/opt/vc/include/bcm_host.h
And it's a surprise for me because "/opt/vc/include" it's added (properly?) on CPPFLAGS when autogen.
This is config.log generated by autogen for gst-omx: http://pastebin.com/m9Vb7WMU
I have tried without success to add the paths to ld.conf.d/*'s files and then running ldconfig. 
I have tried adding more paths to --with-omx-header-path=/opt/vc/include/IL without success, it only takes the first one.I have tried to run autogen.sh --no-configure and then ./configure with more options -> without success.
I ran out of ideas, uncle google didn't help too much this time. It appear to be some kind of rejection about arch. There are thousands of result regarding raspbian however arch is not so popular. I'm pretty sure that a more experienced eyes can help me or at least, bring some light on this matter. Thanks in advance to read until here. Have a nice day!  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150709/1040bb5d/attachment-0001.html>


More information about the gstreamer-devel mailing list