Xuggler compilation is failing. - xuggler

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

Related

Build Lollipop 5.1.1 Aosp on Ubuntu 18.04 (Bionic Beaver)

I am getting below error while trying to build Lollipop 5.1.1 AOSP on Ubuntu 18.04.
build/core/Makefile:34: warning: overriding recipe for target 'out/target/product/apq8084/system/etc/permissions/android.hardware.sensor.stepdetector.xml'
build/core/base_rules.mk:550: warning: ignoring old recipe for target 'out/target/product/apq8084/system/etc/permissions/android.hardware.sensor.stepdetector.xml'
No private recovery resources for TARGET_DEVICE apq8084
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/bin/bash: prebuilts/misc/linux-x86/flex/flex-2.5.39: Is a directory
build/core/binary.mk:575: recipe for target 'out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp' failed
make: *** [out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 126
make: *** Waiting for unfinished jobs....
host C++: libaapt_32 <= frameworks/base/tools/aapt/AaptXml.cpp
make: *** wait: No child processes. Stop.
#### make failed to build some targets (01:06 (mm:ss)) ####
Any Idea why this happens?
I tried "export LC_ALL=C" but didn't help.
I rebuild the flex package and the issue got resolved.
cd prebuilts/misc/linux-x86/flex
rm flex-2.5.39
tar zvxf flex-2.5.39.tar.gz
cd flex-2.5.39
./configure
make
mv flex ../
cd ../
rm -rf flex-2.5.39
mv flex flex-2.5.39

fatal error: 'google/protobuf/compiler/plugin.h' file not found

I'm compiling a Google protobuf plugin from these sources.
I've installed protobuf#2.5 with the homebrew command:
brew install protobuf#2.5
After installation I get the following error when trying to compile by calling make:
Richards-Mac-mini:protobuf-objc-arc richard$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in src/compiler
g++ -DHAVE_CONFIG_H -I. -I../.. -g -O2 -DNDEBUG -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cc
main.cc:17:10: fatal error: 'google/protobuf/compiler/plugin.h' file not found
#include <google/protobuf/compiler/plugin.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [main.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
In particular, this line is interesting:
fatal error: 'google/protobuf/compiler/plugin.h' file not found
While I definitely able to go to this path and find the plugin.h file:
/usr/local/Cellar/protobuf#2.5/2.5.0/include/google/protobuf/compiler/plugin.h
Looks, like the library is not linked correctly with the binary and the issue is somehow related to the correct path.
When I try to issue a command which protoc, I get:
/usr/local/opt/protobuf#2.5/bin/protoc
protoc --version leads to the following output, which is expected.
libprotoc 2.5.0
Fixed by issuing the following commands:
brew link --force --overwrite protobuf250
Output:
Linking /usr/local/Cellar/protobuf#2.5/2.5.0... 14 symlinks created
If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/usr/local/opt/protobuf#2.5/bin:$PATH"' >> ~/.bash_profile
And then:
echo 'export PATH="/usr/local/opt/protobuf#2.5/bin:$PATH"' >>
~/.bash_profile
After successful linking I was able to compile the Objective-C plugin without errors.

CMake fails to generate Makefiles with Sun Studio 12.5

I'm working on Solaris 11.3 with Sun Studio 12.5. When I attempt to configure with Cmake out-of-tree, Cmake finishes with configuration errors and does not produce the makefiles. In-tree may be broken, too. But our procedures say to build out-of-tree, so that;' what I do.
I have nearly no Cmake experience. Others contributed the the CMake files, and I struggle with tasks related to them. I'm not sure if I am doing something wrong, if our Cmake files are broken, or if Cmake is not well tested under Solaris.
What is going on with CMake, and how do I fix it?
Here are the links to the Cmake files. I can copy/paste them, but it just takes up a bunch of space. The files are hosted on GitHub so they should always be available.
CMakefileList.txt
cryptopp-config.cmake
Here is Solaris' Cmake version, prior to me installing 3.6.2:
$ cmake --version
cmake version 2.8.6
Below is from Solaris Cmake version 2.8.6.
cryptopp-build$ export CXX=/opt/developerstudio12.5/bin/CC
cryptopp-build$ export CXXFLAGS="-DNDEBUG -g2 -O2 -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__ -D__SSE4_2__ -D__AES__ -D__PCLMUL__ -D__RDRND__ -D__RDSEED__ -D__AVX__ -D__AVX2__ -D__BMI__ -D__BMI2__ -D__ADX__ -xarch=avx2_i"
cryptopp-build$ cmake ../cryptopp
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:45 (MESSAGE):
The C++ compiler "/bin/c++" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /export/home/test/cryptopp-build/CMakeFiles/CMakeTmp
Run Build Command:/bin/gmake "cmTryCompileExec/fast"
/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory
`/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o
/bin/c++ -DNDEBUG -g2 -O2 -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__
-D__SSE4_2__ -D__AES__ -D__PCLMUL__ -D__RDRND__ -D__RDSEED__ -D__AVX__
-D__AVX2__ -D__BMI__ -D__BMI2__ -D__ADX__ -xarch=avx2_i -o
CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o -c
/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
c++: error: language arch=avx2_i not recognized
c++: error: language arch=avx2_i not recognized
gmake[1]: Leaving directory
`/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp'
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o] Error
1
gmake: *** [cmTryCompileExec/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)
-- Configuring incomplete, errors occurred!
And:
$ /opt/developerstudio12.5/bin/CC -V
CC: Studio 12.5 Sun C++ 5.14 SunOS_i386 2016/05/31
I built Cmake 3.6.2 from sources and installed in /usr/local to attack the CXX compiler identification is unknown issue, but it appears to be having some troubles. As I said earlier, I'm not a Cmake expert (and I'm not sure how one can mess up a make && sudo make install).
cryptopp-build$ cmake ../cryptopp
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
CMake Error: Error executing cmake::LoadCache(). Aborting.
Clearing the cache as suggested by #AndrewHenle results in:
# The project GNUmakefile clears all Cmake artifacts because Cmake cannot seem to do it on its own
$ cd cryptopp
$ git status -s
$
$ cd ..
$ rm -rf cryptopp-build
$ mkdir cryptopp-build
$ cd cryptopp-build
# Using 3.6.2 now
$ cmake ../cryptopp
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
CMake Error: Error executing cmake::LoadCache(). Aborting.
So there appeared to be two problems. First was the down level Sun supplied Cmake. There's nothing genius about diagnosing it as "too old".
The second issue was more interesting. It appears the CMake Error: Could not find CMAKE_ROOT !!! was cause by sudo make install Once I switched to sudo gmake install the issue went away.
Here are the bug reports on the issue:
Cmake Issue 16302: Cmake fails to identify Sun Studio 12.5 compiler
Cmake Issue 16303: Cmake fails to produce a working installation on Solaris 11.3

glib2 build can't find automake 1.13 when automake 1.14 is installed

I'm attempting to build glib-2.36.4 on CentOS5. I realize it would be wiser to upgrade to 6 but this isn't possible because of a customer requirement.
I've started a make build and I get the below error. The error complains that automake-1.13 doesn't exist on the system. However, I built automake 1.14 and installed it. An automake --version outputs the correct version.
I've done a yum list installed | grep automake to insure automake doesn't have conflicting installations.
I've tried googling the issue but I can't come up with anything.
make[4]: Entering directory `/home/tharper/glib-2.36.4/docs/reference/glib'
cd ../../.. && /bin/sh /home/tharper/glib-2.36.4/missing
automake-1.13 --gnu docs/reference/glib/Makefile
/home/tharper/glib-2.36.4/missing: line 81: automake-1.13: command not found
WARNING: 'automake-1.13' is missing on your system.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make[4]: *** [Makefile.in] Error 127
make[4]: Leaving directory `/home/tharper/glib-2.36.4/docs/reference/glib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/tharper/glib-2.36.4/docs/reference'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tharper/glib-2.36.4/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tharper/glib-2.36.4'
make: *** [all] Error 2
From the top level directory run the command
automake
Basically, your makefiles were built using Automake 1.13 and now you've got 1.14 they're getting confused, so running automake will recreate all the Makefiles using your new version.
In my side, it will show some warning after run automake, and I run the command to resolved this issue:
autoreconf -ivf
I ran in a similar problem when trying to compile gnome-mplayer-1.0.9.2 on Ubuntu 14.01.1.
I managed to resolve it by running the following commands in the source folder:
aclocal
automake
./configure
make

Netbeans 7.1.2 C/C++ MinGW build errors

I have installed Netbeans and MinGW to use as a C/C++ IDE but am failing to compile the provided samples in Netbeans. I'm getting the following build errors:
mkdir -p build/Debug/MinGW_1-Windows
rm -f build/Debug/MinGW_1-Windows/main.o.d
gcc.exe -c -g -MMD -MP -MF build/Debug/MinGW_1-Windows/main.o.d -o build/Debug/MinGW_1-Windows/main.o main.c
make[2]: *** [build/Debug/MinGW_1-Windows/main.o] Error 1
make[2]: Leaving directory `/c/Users/Momo/Documents/NetBeansProjects/Test2'
make[1]: Leaving directory `/c/Users/Momo/Documents/NetBeansProjects/Test2'
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 4s)