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)
Related
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
I want to generate a pdf file from a Rmd script (r markdown), so I installed Pandoc, in the installation guide, it said: For PDF output, you’ll need LaTeX. We recommend installing TeX Live. So I downloaded Tex Live from their website.
(I must install it in a specific directory so that I can load it with a environment modules system)
Then i did this:
$: tar xf texlive-20190408-source.tar.xz
$: cd texlive-20190408-source
$: sudo ./configure --prefix=$path --enable-build-in-source-tree
$: make
configure: error: Sorry, you will need at least the Xaw header/library files to compile xdvik.
=== configuring in xdvik failed
make[2]: *** [recurse] Error 1
make[2]: Leaving directory `/Downloads/texlive-20190408-source/texk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Downloads/texlive-20190408-source/texk'
make: *** [all-recursive] Error 1
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.
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
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