سؤال

I DID NOT FIND THE PRECOMPILED BINARIES FOR WINDOWS OR LINUX PLATFORM, AND I am trying to build the Xuggler code base cloned from the github. I am following the steps given in the link: http://www.xuggle.com/xuggler/build

I am facing a compilation error as below. Can someone please help me with what is missing? All the build environment prerequisite are taken care of.

     [exec]   CXX    AudioResampler.lo
     [exec]   CXX    AudioSamples.lo
     [exec]   CXX    Codec.lo
     [exec] ../../../../../../../csrc/com/xuggle/xuggler/Codec.cpp: In member function 'virtual bool com::xuggle::xuggler::Codec::canDecode()':
     [exec] ../../../../../../../csrc/com/xuggle/xuggler/Codec.cpp:158:38: error: converting 'false' to pointer type 'int (*)(AVCodecContext*, void*, int*, AVPacket*)' [-Werror=conversion-null]
     [exec] ../../../../../../../csrc/com/xuggle/xuggler/Codec.cpp: At global scope:
     [exec] ../../../../../../../csrc/com/xuggle/xuggler/Codec.cpp:26:1: error: 'vs_logger_static_context' defined but not used [-Werror=unused-variable]
     [exec] cc1plus: all warnings being treated as errors
     [exec] make[6]: *** [Codec.lo] Error 1
     [exec] make[5]: *** [all-recursive] Error 1
     [exec] make[4]: *** [all] Error 2
     [exec] make[3]: *** [all-recursive] Error 1
     [exec] make[2]: *** [all-recursive] Error 1
     [exec] make[1]: *** [all-recursive] Error 1
     [exec] make: *** [all-recursive] Error 1
     [exec] make[6]: Leaving directory `/home/anilj1/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/csrc/com/xuggle/xuggler'
     [exec] make[5]: Leaving directory `/home/anilj1/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/csrc/com/xuggle/xuggler'
     [exec] make[4]: Leaving directory `/home/anilj1/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/csrc/com/xuggle/xuggler'
     [exec] make[3]: Leaving directory `/home/anilj1/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/csrc/com/xuggle'
     [exec] make[2]: Leaving directory `/home/anilj1/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/csrc/com'
     [exec] make[1]: Leaving directory `/home/anilj1/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/csrc'

BUILD FAILED
/home/anilj1/xuggle-xuggler/mk/buildtools/buildhelper.xml:1192: exec returned: 2

Total time: 18 minutes 30 seconds

CAN SOMEONE ALSO HELP WHERE TO FIND THE PRECOMPILED XUGGLER BINARIES FOR WINDOWS?

هل كانت مفيدة؟

المحلول

Folks,

So finally I was able to successfully build the Xuggler build. It was a compiler version issue. I had installed (by virtue of apt-get install build-essential) latest version of gcc (version 4.7), and it was throwing all the below errors.

I downgraded my system to version 4.4, and it worked. I could have chosen 4.6 or something else, but now I guess its not required.

/anil.

نصائح أخرى

I've found another solution to fix this build fail:

[exec] cc1plus: all warnings being treated as errors

If you want to fix it independently from gcc version (you cannot choose gcc version in some linux distributions), go to the xuggle downloaded/extracted folder and use:

grep -rl "Werror" * | xargs sed -i 's/Werror/Wno-error/g'

This will force the compiler to consider warnings as warnings and not as errors, and the build will succeed.


Note: if you want to be sure that this command takes effect, before the command use:

grep -rl "Werror" * 

And after the command use:

grep -rl "Wno-error" * 

They should give you the same file-list.

Install GCC 4.4:

apt-get install gcc-4.4

Update symbolic links to use 4.4 (the arch-specific link will be different on 32-bit VM):

rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/x86_64-linux-gnu-gcc
ln -s /usr/bin/x86_64-linux-gnu-gcc-4.4 /usr/bin/x86_64-linux-gnu-gcc

Install C++ (G++) 4.4:

apt-get install c++-4.4

Update symbolic links to use 4.4 (the arch-specific link will be different on 32-bit VM):

rm /usr/bin/cpp
ln -s /usr/bin/cpp-4.4 /usr/bin/cpp
rm /usr/bin/x86_64-linux-gnu-cpp
ln -s /usr/bin/x86_64-linux-gnu-cpp-4.4 /usr/bin/x86_64-linux-gnu-cpp
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
rm /usr/bin/x86_64-linux-gnu-g++
ln -s /usr/bin/x86_64-linux-gnu-g++-4.4 /usr/bin/x86_64-linux-gnu-g++

Verify default versions:

gcc --version
c++ --version
cpp --version

If c++ wouldnt be found install g++ 4.4

apt-get install g++-4.4

That works for me to build a LGPL linux jar on a Ubuntu 14.0.4 LTS 64

here is the full guide: https://docs.google.com/document/d/1mjlI2jAGKK3_W4KIBjpUfM3F_SJjUkZhQJuwtIBn_7I/pub

remember to install g++ if the build failed

//windows build - still doesnt work for me

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top