Guide to compile Xuggler for Raspberry Pi

ぃ、小莉子 提交于 2019-12-12 09:02:14

问题


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:

  1. 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)
  2. Raspbian installed on an SD Card (more than 4GB SD card will do)

Steps:

  1. Switch to 'root' user.

  2. From the Basic xuggler build page install the dependencies (http://www.xuggle.com/xuggler/build) labeled as 'Required'

  3. 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
    
  4. Create the following link:

    sudo ln -s /usr/bin/make /usr/bin/gmake
    
  5. 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'
    
  6. Now move to the following directory:

    cd /home/pi/Downloads/
    
  7. Download the xuggler code from here(https://github.com/artclarke/xuggle-xuggler):

    git clone https://github.com/artclarke/xuggle-xuggler.git
    
  8. The code would be downloaded in the directory named 'xuggle-xuggler'

  9. Move inside the directory 'xuggle-xuggler'

  10. 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"/>
    
  11. 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.

  12. 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.

  13. Now as listed in the xuggler advance build link (http://www.xuggle.com/xuggler/advbuild), launch the command:

    ant stage
    
  14. 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"
    
  15. Now run following command(one by one only):

    ant clobber
    ant clean
    ant stage
    
  16. This time all the compile steps will go through.

  17. Run the install command:

    ant install
    
  18. The xuggler binaries would be installed at the location 'XUGGLE_HOME' as defined in step #3.

  19. The xuggler maven repository for java binaries would be located at '/root/.m2/repository/xuggle/xuggle-xuggler'

  20. 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.

  21. The compiled binaries ran fine on Raspberry PI (Arch Linux, Raspbian).

  22. If you don't have the time to compile, get the binaries from here.

  23. 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:

  1. https://github.com/e-d/xuggle-xuggler/commit/035c676e6e289fbb4b27dc75134a4470a5bab28a
  2. Issue #1 when compiling Xuggler for Raspberry pi with libspeex
  3. How can I build the GPL and LGPL version of Xuggle Xuggler?
  4. Issue #2 when compiling Xuggler for Raspberry pi with libx264
  5. http://blog.oneiroi.co.uk/linux/ffmpeg-install-with-libx264-h264/
  6. http://www.unix.com/unix-for-dummies-questions-and-answers/53319-change-target-symbolic-link.html
  7. http://www.raspberrypi.org/arch-linux-arm-available-for-download/
  8. Special Thanks : https://groups.google.com/forum/#!topic/xuggler-users/F-fSSm46ZaI
  9. For x86_64 Arch, this helped : while installing xuggler in ubuntu 11.10 getting error message
  10. Getting git to work with a proxy server
  11. Xuggler code : https://github.com/artclarke/xuggle-xuggler
  12. Xuggler for Raspberry Pi: https://github.com/e-d/xuggle-xuggler/tree/pi


来源:https://stackoverflow.com/questions/25218879/guide-to-compile-xuggler-for-raspberry-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!