trouble to run make for the buildroot - c++

I'm not sure what the problem is.
The command is:
root#root:/usr/lib/buildroot# make
And the error message is:
llvm 9.0.1 Building PATH="/usr/lib/buildroot/output/host/bin:/usr/lib/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" /usr/bin/make -j3 -C /usr/lib/buildroot/output/build/llvm-9.0.1//buildroot-build make[1]: Entering directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' make[2]: Entering directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' make[3]: Entering directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' make[3]: Entering directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' make[3]: Entering directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' make[3]: Leaving directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' make[3]: Leaving directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' make[3]: Leaving directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' make[3]: Entering directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' make[3]: Entering directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' [ 0%] Building CXX object lib/TableGen/CMakeFiles/LLVMTableGen.dir/Error.cpp.o make[3]: Entering directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' [ 0%] Building CXX object lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o aarch64-none-linux-gnu-g++: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build/lib/TableGen' lib/TableGen/CMakeFiles/LLVMTableGen.dir/build.make:62: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/Error.cpp.o' failed make[3]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/Error.cpp.o] Error 1 make[3]: Leaving directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' CMakeFiles/Makefile2:879: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/all' failed make[2]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/all] Error 2 make[2]: *** Waiting for unfinished jobs.... [ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/AArch64TargetParser.cpp.o [ 0%] Building CXX object lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o aarch64-none-linux-gnu-g++: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build/lib/Demangle' lib/Demangle/CMakeFiles/LLVMDemangle.dir/build.make:62: recipe for target 'lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o' failed make[3]: *** [lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o] Error 1 make[3]: *** Waiting for unfinished jobs.... aarch64-none-linux-gnu-g++: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build/lib/Support' lib/Support/CMakeFiles/LLVMSupport.dir/build.make:62: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/AArch64TargetParser.cpp.o' failed make[3]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/AArch64TargetParser.cpp.o] Error 1 make[3]: *** Waiting for unfinished jobs.... aarch64-none-linux-gnu-g++: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build/lib/Demangle' lib/Demangle/CMakeFiles/LLVMDemangle.dir/build.make:75: recipe for target 'lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o' failed make[3]: *** [lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o] Error 1 make[3]: Leaving directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' CMakeFiles/Makefile2:640: recipe for target 'lib/Demangle/CMakeFiles/LLVMDemangle.dir/all' failed make[2]: *** [lib/Demangle/CMakeFiles/LLVMDemangle.dir/all] Error 2 [ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ARMTargetParser.cpp.o aarch64-none-linux-gnu-g++: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build/lib/Support' lib/Support/CMakeFiles/LLVMSupport.dir/build.make:75: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/ARMTargetParser.cpp.o' failed make[3]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/ARMTargetParser.cpp.o] Error 1 make[3]: Leaving directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' CMakeFiles/Makefile2:800: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/all' failed make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2 make[2]: Leaving directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' Makefile:151: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/usr/lib/buildroot/output/build/llvm-9.0.1/buildroot-build' package/pkg-generic.mk:266: recipe for target '/usr/lib/buildroot/output/build/llvm-9.0.1/.stamp_built' failed make: *** [/usr/lib/buildroot/output/build/llvm-9.0.1/.stamp_built] Error 2

You have added a host system library path to your build (maybe by error? Since you did not post the necessary information we do not know). Host library paths are paths outside of the cross-toolchain or buildroot path.
This Feature for detecting unsafe include paths has been included into buildroot a couple of years ago. See: https://git.busybox.net/buildroot/commit/?id=5aa205eba4063ddf17a2e11420eea2a8aa7536a5
Either you will need to remove host system include paths from your build (which you always should do). But if you are sure everything is right you can define BR_COMPILER_PARANOID_UNSAFE_PATH to an empty value so it will be just a warning, and not an error.

You cannot build Buildroot under /usr/lib. Move the directory somewhere else, e.g. /home/buildroot. Note that after moving you have to do a clean build.
Note also that you shouldn't do the build as root. Create a non-root user and do the build as that user.

Related

'QVTKWidget.h' file not found

I installed PCL 1.8.0 on Ubuntu 18.04 but I encountered an error while installing a repo.
[ 88%] Building CXX object CMakeFiles/tviewer.dir/tviewer/tviewer_widget/tviewer_widget.cpp.o
In file included from /home/gpu-1/Téléchargements/ForestMetrics/build/third-party/tviewer/tviewer-prefix/src/tviewer/tviewer/tviewer_widget/tviewer_widget.cpp:6:0:
/home/gpu-1/Téléchargements/ForestMetrics/build/third-party/tviewer/tviewer-prefix/src/tviewer/tviewer/tviewer_widget/tviewer_widget.h:12:10: fatal error: QVTKWidget.h: Aucun fichier ou dossier de ce type
#include <QVTKWidget.h>
^~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/tviewer.dir/build.make:354: recipe for target 'CMakeFiles/tviewer.dir/tviewer/tviewer_widget/tviewer_widget.cpp.o' failed
make[5]: *** [CMakeFiles/tviewer.dir/tviewer/tviewer_widget/tviewer_widget.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tviewer.dir/all' failed
make[4]: *** [CMakeFiles/tviewer.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[3]: *** [all] Error 2
third-party/tviewer/CMakeFiles/tviewer.dir/build.make:110: recipe for target 'third-party/tviewer/tviewer-prefix/src/tviewer-stamp/tviewer-build' failed
make[2]: *** [third-party/tviewer/tviewer-prefix/src/tviewer-stamp/tviewer-build] Error 2
CMakeFiles/Makefile2:385: recipe for target 'third-party/tviewer/CMakeFiles/tviewer.dir/all' failed
make[1]: *** [third-party/tviewer/CMakeFiles/tviewer.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
However I installed sudo apt-get install libvtk6-qt-dev without any error.
Any idea ? Many Thanks !

Cannot compile MEGA api

I'm using Windows 7 64bits and been trying to compile the MEGA api with MSYS2 using the autotools, but after running 'make' compilation stops showing this error:
# make
make all-recursive
make[1]: Entering directory '/d/sdk-develop'
Making all in include
make[2]: Entering directory '/d/sdk-develop/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/d/sdk-develop/include'
make[2]: Entering directory '/d/sdk-develop'
CXX examples/megacli-megacli.o
In file included from D:/msys64/mingw64/include/zconf.h:475,
from D:/msys64/mingw64/include/zlib.h:34,
from ./include/mega/win32/meganet.h:26,
from ./include/mega.h:76,
from examples/megacli.cpp:22:
./include/mega/win32/megafs.h:170:10: error: 'bool mega::WinFileAccess::ftruncate64()' marked 'override', but does not override
170 | bool ftruncate() override;
| ^~~~~~~~~
make[2]: *** [Makefile:2742: examples/megacli-megacli.o] Error 1
make[2]: Leaving directory '/d/sdk-develop'
make[1]: *** [Makefile:3294: all-recursive] Error 1
make[1]: Leaving directory '/d/sdk-develop'
make: *** [Makefile:1495: all] Error 2

cross compiling protocol buffers for arm

I am new to Google's protocol buffers and I am having trouble with cross-compiling it for arm. I am not able to find any concrete solutions to my problem using google.
The steps I am following:
./autogen.sh
./configure
make -s && make install
./configure --host=arm-linux-gnueabi CC=arm-linux-gnueabi-gcc --prefix=/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/ --with-protoc=/usr/local/bin/protoc
make
I get an error when I run make.
google/protobuf/stubs/common.cc:55:2: error: #error "No suitable threading library available."
#error "No suitable threading library available."
^
Makefile:3956: recipe for target 'google/protobuf/stubs/common.lo' failed
make[2]: *** [google/protobuf/stubs/common.lo] Error 1
make[2]: Leaving directory '/home/protobuf/protobuf/src'
Makefile:1544: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/protobuf/protobuf'
Makefile:1451: recipe for target 'all' failed
make: *** [all] Error 2
Any help would be much appreciated.

Error: installting GDB-8.1 with target=mips-elf-linux

Below error occurs while installing gdb-8.1 on Ubuntu-16.04-TLS with target configuration>> --target=mips-elf-linux:
make[4]: Leaving directory '/home/../gdb-installation/gdb-8.1-mips32be/bfd/po'
make[4]: Entering directory '/home/../gdb-installation/gdb-8.1-mips32be/bfd'
make[5]: Entering directory '/home/.../gdb-installation/gdb-8.1-mips32be/bfd'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Leaving directory '/home/.../gdb-installation/gdb-8.1-mips32be/bfd'
make[4]: Leaving directory '/home/.../gdb-installation/gdb-8.1-mips32be/bfd'
Makefile:1748: recipe for target 'install-recursive' failed
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory '/home/.../gdb-installation/gdb-8.1-mips32be/bfd'
Makefile:1885: recipe for target 'install' failed
make[2]: *** [install] Error 2
make[2]: Leaving directory '/home/.../gdb-installation/gdb-8.1-mips32be/bfd'
Makefile:2756: recipe for target 'install-bfd' failed
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory '/home/.../gdb-installation/gdb-8.1-mips32be'
Makefile:2223: recipe for target 'install' failed
make: *** [install] Error 2
Kindly help me fix this!

Opam installation error from source

The following error was obtained while installing opam from source
make -C ocp-build
make[1]: Entering directory `/home/14810/opam-master/ocp-build'
make[1]: `ocp-build' is up to date.
make[1]: Leaving directory `/home/14810/opam-master/ocp-build'
make clone
make[1]: Entering directory `/home/14810/opam-master'
make -C src_ext
make[2]: Entering directory `/home/14810/opam-master/src_ext'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/14810/opam-master/src_ext'
make[1]: Leaving directory `/home/14810/opam-master'
make compile
make[1]: Entering directory `/home/14810/opam-master'
make -C ocp-build
make[2]: Entering directory `/home/14810/opam-master/ocp-build'
make[2]: `ocp-build' is up to date.
make[2]: Leaving directory `/home/14810/opam-master/ocp-build'
ocaml shell/get-git-id.ml src/core/opamGitVersion.ml
./ocp-build/ocp-build -no-use-opamfind -init -scan
Unknown option -no-use-opamfind.
make[1]: *** [compile] Error 2
make[1]: Leaving directory `/home/14810/opam-master'
make: *** [all] Error 2
tried removing options from the makefile but did not work