Search code examples
ffmpegraspberry-piraspbianxugglerlibx264

Issue #2 when compiling Xuggler for Raspberry pi with libx264


I am trying to compile Xuggler for Raspberry Pi(Running on Debian OS aka Raspbian),

I followed the 'Basic Build Instructions' available here for compiling Xuggler.

After I successfully installed all the prerequisites and set the correct paths, I ran the following command:

ant run-tests

After sometime I am facing the following error and the ant build fails at libx264:

{scroll at the end of log to see the issue}

common/arm/mc-c.c: In function âx264_weight_cache_neonâ:
common/arm/mc-c.c:89:25: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default]
common/arm/mc-c.c:94:25: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default]
common/arm/mc-c.c:99:21: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default]
common/arm/mc-c.c:101:21: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default]
common/arm/mc-c.c: In function âx264_mc_init_armâ:
common/arm/mc-c.c:236:19: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default]
common/arm/mc-c.c:237:19: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default]
common/arm/mc-c.c:238:19: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default]
gcc -Wshadow -O3 -fno-fast-math -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include  -Wall -I. -I.  -I'/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include' -std=gnu99 -mcpu=cortex-a8 -mfpu=neon -fPIC -fomit-frame-pointer -fno-tree-vectorize   -c -o common/arm/predict-c.o common/arm/predict-c.c
as -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include  -Wall -I. -I.  -I'/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include' -std=gnu99 -mcpu=cortex-a8 -mfpu=neon -c -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/cpu-a.o common/arm/cpu-a.S
as: unrecognized option '-std=gnu99'
make[1]: *** [common/arm/cpu-a.o] Error 1
make[1]: Leaving directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libx264/csrc'
make: *** [all-local] Error 2

I am unable to understand the problem statment "unrecognized option '-std=gnu99'" here, Can someone please tell me how can I resolve this or circumvent it in xuggler?


Solution

  • "ant run-tests" has been known to fail on certain architectures. Do you get this same error when you just run the following command?

    ant stage
    

    I have successfully built Xuggler on the Raspberry Pi using "ant stage". This produces the magic jar that can then be used on many different ARM computers. I personally was only interested in building an LGPL version of the library, and you can checkout the code that builds as-is on the pi branch here:

    https://github.com/e-d/xuggle-xuggler/tree/pi

    This does not include X264 support since it builds an LGPL version. I do know that it is possible to build the standard GPL version too, I just haven't done it. You can look at the last few commits I made to see what I changed to get it to build on the pi.