Can someone post a detailed write up, on how to compile Xuggler for Raspberry Pi?
问题:
回答1:
After working on for about 5 days , I am putting the following guide to compile xuggler for Raspberry Pi (Time required : 8 hrs):
Prerequisites:
- Raspberry Pi Model B+ with 512 MB RAM (Any model less than this will not give you the compiled binaries and will stuck during compilation)
- Raspbian installed on an SD Card (more than 4GB SD card will do)
Steps:
Switch to 'root' user.
From the Basic xuggler build page install the dependencies (http://www.xuggle.com/xuggler/build) labeled as 'Required'
Create and export variables as follows (Make the relevant directories)
export XUGGLE_HOME=/home/pi/Downloads/xuggler export PATH=$XUGGLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH
Create the following link:
sudo ln -s /usr/bin/make /usr/bin/gmake
If you are behind any kind of web proxy then set the following variables too:
export http_proxy='proxy-url:port' export https_proxy='proxy-url:port' export ftp_proxy='proxy-url:port'
Now move to the following directory:
cd /home/pi/Downloads/
Download the xuggler code from here(https://github.com/artclarke/xuggle-xuggler):
git clone https://github.com/artclarke/xuggle-xuggler.git
The code would be downloaded in the directory named 'xuggle-xuggler'
Move inside the directory 'xuggle-xuggler'
If you are behind a proxy add the following line in the file 'build.xml', just below the 'property' xml tags in the file:
<setproxy proxyhost="proxy-url" proxyport="port"/>
Now edit the file 'captive/libspeex/csrc/configure' as follows:
From:
CFLAGS="$CFLAGS -O3 -msse"
To:
CFLAGS="$CFLAGS -O3"
And
From:
if test "$has_sse" = yes; then $as_echo "#define _USE_SSE /**/" >>confdefs.h fi
To:
#if test "$has_sse" = yes; then #$as_echo "#define _USE_SSE /**/" >>confdefs.h #fi
Refer this for more info.
Now edit the file ' captive/libspeex/csrc/configure.ac' as follows:
From:
CFLAGS="$CFLAGS -O3 -msse"
To:
CFLAGS="$CFLAGS -O3"
And
From:
if test "$has_sse" = yes; then AC_DEFINE([_USE_SSE], , [Enable SSE support]) fi
To:
#if test "$has_sse" = yes; then # AC_DEFINE([_USE_SSE], , [Enable SSE support]) #fi
Refer this for more info.
Now as listed in the xuggler advance build link (http://www.xuggle.com/xuggler/advbuild), launch the command:
ant stage
The process will fail at or during the compilation of libX264, to circumvent it, add the following compile switches in the now generated file i.e edit file 'captive/libx264/incarcerate.in' :
From:
X264_OPTIONS="$X264_OPTIONS --enable-static" X264_OPTIONS="$X264_OPTIONS --enable-pic"
To:
X264_OPTIONS="$X264_OPTIONS --disable-asm" X264_OPTIONS="$X264_OPTIONS --enable-shared" X264_OPTIONS="$X264_OPTIONS --enable-static" X264_OPTIONS="$X264_OPTIONS --enable-pic"
Now run following command(one by one only):
ant clobber ant clean ant stage
This time all the compile steps will go through.
Run the install command:
ant install
The xuggler binaries would be installed at the location 'XUGGLE_HOME' as defined in step #3.
The xuggler maven repository for java binaries would be located at '/root/.m2/repository/xuggle/xuggle-xuggler'
Also you can check out the '../xuggle-xuggler/dist' directory to check all the native and java binaries for your non-maven kind of use.
The compiled binaries ran fine on Raspberry PI (Arch Linux, Raspbian).
If you don't have the time to compile, get the binaries from here.
Make sure to add the variables as defined in step #3 in java class path or shell terminal before using the java binaries compiled by me.
Special thanks to 11101101b for guidance and helping.
References:
- https://github.com/e-d/xuggle-xuggler/commit/035c676e6e289fbb4b27dc75134a4470a5bab28a
- Issue #1 when compiling Xuggler for Raspberry pi with libspeex
- How can I build the GPL and LGPL version of Xuggle Xuggler?
- Issue #2 when compiling Xuggler for Raspberry pi with libx264
- http://blog.oneiroi.co.uk/linux/ffmpeg-install-with-libx264-h264/
- http://www.unix.com/unix-for-dummies-questions-and-answers/53319-change-target-symbolic-link.html
- http://www.raspberrypi.org/arch-linux-arm-available-for-download/
- Special Thanks : https://groups.google.com/forum/#!topic/xuggler-users/F-fSSm46ZaI
- For x86_64 Arch, this helped : while installing xuggler in ubuntu 11.10 getting error message
- Getting git to work with a proxy server
- Xuggler code : https://github.com/artclarke/xuggle-xuggler
- Xuggler for Raspberry Pi: https://github.com/e-d/xuggle-xuggler/tree/pi