Could not open include file error - c++

I am trying to compile a C++ application on SUN server using the compiler Sun C++ 5.9 SunOS_sparc Patch 124863-01.However i am getting an compilation errror saying that the compiler could not include header file.However the header file exist on the same folder and on the specified path/
CC -Dbcc9 -Dsun10 -I/export/home/bcc/bb1/bccprod/bb/compilation/bh/bh_xx_1_70_1 -DENV_OPT -DENV_OPT -D_XOPEN_SOURCE -D_XOPEN_VERSION=4 -D__SUN -Dsun -Dsparc -DSunOS53 -DCONFIG_64BIT -DNEW_ANSI -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/generic/include -DSHARED_EXT=\"so\" -DF257054 -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/dxlib/include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/udrlib/include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bat++/include -Dbcc_CONFIG -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bat/include -DF227344_CR102 -DF267107 -DF267107_d -DF268560 -DG_SUN -DG_EH -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/generic/include -DDEBUG -DORACLE_DB_BRAND -I/u01/app/oracle/product/10.2.0/db_1/precomp/public -I/u01/app/oracle/product/10.2.0/db_1/rdbms/public -I/u01/app/oracle/product/10.2.0/db_1/rdbms/demo -I/u01/app/oracle/product/10.2.0/db_1/plsql/public -I/u01/app/oracle/product/10.2.0/db_1/network/public -DF_TAP_311 -DF_LCS_310 -DF_RAP_103 -g -DCONTRACT_DETAILS -DCREDIT_DISPLAY -DSORT_BILLS -DSPLIT_BILL -DD_ROAMING -DSWAP_DATES -DFIXLASADDR -DFIXUSERID -DFIXBIGAMT -DNOPRINTZEROINV -DFIXIPBXDISP -DARABTRANS -DFIX_MKRTTEXT -DOCCDESC -DFIXBARCODE -DNEWTAX8 -DCARRY_OVER -I./include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bh/include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bat/include -I/export/home/bcc/bb1/bccprod/bb/LHS_TOOLS/product/JTG/prod/bcc/batch/src/bat++/include -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/generic/include -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/xalan/include -I/export/home/bcc/bb1/bccprod/bb/compilation/opt_nc/hpux11.x/xerces/include -I/usr/include -DSOLARIS -D_XOPEN_SOURCE -D_XOPEN_VERSION=4 -D__SUN -Dsun -Dsparc -DSunOS53 -DCONFIG_64BIT -DNEW_ANSI -D__EXTENSIONS__ -DF_TAP_311 -DF_LCS_310 -DF_RAP_103 -m64 -DNEW_ANSI -DG_ANSICPP -DG_LONGSIZE=64 -DGEN_INCIMP -w -KPIC -g -xs -c bhComponentController.cpp -o bhComponentController.o
"**./include/bhComponentController.hpp", line 20: Error: Could not open include file "ComponentController.hpp"**
"./include/bhComponentController.hpp", line 183: Error: ComponentController is not defined.
"./include/bhTerminationHandler.hpp", line 107: Error: Could not open include file "TerminationHandler.hpp".
"./include/bhTerminationHandler.hpp", line 113: Error: TerminationHandler is not defined.
"bhComponentController.cpp", line 47: Error: The function "setTerminationHandler" must have a prototype.
"bhComponentController.cpp", line 70: Error: The function "strcat" must have a prototype.
"bhComponentController.cpp", line 73: Error: The function "strcat" must have a prototype.
"bhComponentController.cpp", line 76: Error: The function "strcat" must have a prototype.
"bhComponentController.cpp", line 79: Error: The function "strcat" must have a prototype.
9 Error(s) detected.
gmake: *** [bhComponentController.o] Error 9
The error is saying
"Error:l Could not open include file "ComponentController.hpp"
however the file ./include/bhComponentController.hpp is there and readable on the specified location.
Any idea please?

add this one too -I/export/home/bcc/bb1/bccprod/bb/compilation/bh/bh_xx_1_70_1/include assumin g your sources are there.
or
I/pathtoyoursources/ #this is where bhComponentController.hpp is.
SO that you can include"bhComponentController.hpp" directly.

Related

src/caffe/parallel.cpp:70:1: error: ‘Params’ does not name a type

This is not the first time I compiled caffe, but I still have problems that I can't solve. The caffe version I used is https://github.com/chuanqi305/ssd, the compiled version is GPU, I successfully compiled and run on my computer ( Ubuntu 16.04 GTX1080TI*1 cuda9.0) , but in the school server (Ubuntu 14.04 Tesla k80*2+Tesla k40*2 cuda8.0), the same code, the same configuration, but the compilation failed。The error occurred in the code compilation phase rather than the link phase, but the code itself is definitely no problem, because it has been compiled successfully on another computer, I don't know if it is because of my gcc/g++ version.
I tried to compile the parallel.cpp file myself using the g++ command. When I don't specify the header file path, the same error will occur, but in the Makefile, the location of the header file has been added.
The error message is below:
SGM#user-SMBIOS-implementations-newer-thandmidecode-Super-Server:~/ssd-ssd$ sudo make all
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/parallel.cpp
src/caffe/parallel.cpp:70:1: error: ‘Params’ does not name a type
Params<Dtype>::Params(shared_ptr<Solver<Dtype> > root_solver)
^
src/caffe/parallel.cpp:77:1: error: ‘GPUParams’ does not name a type
GPUParams<Dtype>::GPUParams(shared_ptr<Solver<Dtype> > root_solver, int device)
^
src/caffe/parallel.cpp:102:1: error: ‘GPUParams’ does not name a type
GPUParams<Dtype>::~GPUParams() {
^
src/caffe/parallel.cpp:110:15: error: expected initializer before ‘<’ token
void GPUParams<Dtype>::configure(Solver<Dtype>* solver) const {
^
src/caffe/parallel.cpp:117:6: error: ‘DevicePair’ has not been declared
void DevicePair::compute(const vector<int> devices, vector<DevicePair>* pairs) {
^
src/caffe/parallel.cpp:117:60: error: ‘DevicePair’ was not declared in this scope
void DevicePair::compute(const vector<int> devices, vector<DevicePair>* pairs) {
^
src/caffe/parallel.cpp:117:70: error: template argument 1 is invalid
void DevicePair::compute(const vector<int> devices, vector<DevicePair>* pairs) {
^
src/caffe/parallel.cpp:117:70: error: template argument 2 is invalid
src/caffe/parallel.cpp: In function ‘void caffe::compute(std::vector<int>, int*)’:
src/caffe/parallel.cpp:133:20: error: request for member ‘push_back’ in ‘* pairs’, which is of non-class type ‘int’
pairs->push_back(DevicePair(remaining[i], remaining[j]));
^
src/caffe/parallel.cpp:133:67: error: ‘DevicePair’ was not declared in this scope
pairs->push_back(DevicePair(remaining[i], remaining[j]));
^
src/caffe/parallel.cpp:157:18: error: request for member ‘push_back’ in ‘* pairs’, which is of non-class type ‘int’
pairs->push_back(DevicePair(remaining[i], remaining[j]));
^
src/caffe/parallel.cpp:157:65: error: ‘DevicePair’ was not declared in this scope
pairs->push_back(DevicePair(remaining[i], remaining[j]));
^
src/caffe/parallel.cpp:175:14: error: request for member ‘push_back’ in ‘* pairs’, which is of non-class type ‘int’
pairs->push_back(DevicePair(remaining[i], remaining[i + 1]));
^
src/caffe/parallel.cpp:175:65: error: ‘DevicePair’ was not declared in this scope
pairs->push_back(DevicePair(remaining[i], remaining[i + 1]));
^
src/caffe/parallel.cpp:185:10: error: request for member ‘insert’ in ‘* pairs’, which is of non-class type ‘int’
pairs->insert(pairs->begin(), DevicePair(-1, remaining[0]));
^
src/caffe/parallel.cpp:185:24: error: request for member ‘begin’ in ‘* pairs’, which is of non-class type ‘int’
pairs->insert(pairs->begin(), DevicePair(-1, remaining[0]));
^
src/caffe/parallel.cpp:185:60: error: ‘DevicePair’ was not declared in this scope
pairs->insert(pairs->begin(), DevicePair(-1, remaining[0]));
^
In file included from src/caffe/parallel.cpp:4:0:
src/caffe/parallel.cpp:187:16: error: request for member ‘size’ in ‘* pairs’, which is of non-class type ‘int’
CHECK(pairs->size() == devices.size());
^
src/caffe/parallel.cpp:188:30: error: request for member ‘size’ in ‘* pairs’, which is of non-class type ‘int’
for (int i = 0; i < pairs->size(); ++i) {
^
In file included from src/caffe/parallel.cpp:4:0:
src/caffe/parallel.cpp:189:21: error: invalid types ‘int[int]’ for array subscript
CHECK((*pairs)[i].parent() != (*pairs)[i].device());
^
src/caffe/parallel.cpp:189:45: error: invalid types ‘int[int]’ for array subscript
CHECK((*pairs)[i].parent() != (*pairs)[i].device());
^
src/caffe/parallel.cpp:190:36: error: request for member ‘size’ in ‘* pairs’, which is of non-class type ‘int’
for (int j = i + 1; j < pairs->size(); ++j) {
^
In file included from src/caffe/parallel.cpp:4:0:
src/caffe/parallel.cpp:191:23: error: invalid types ‘int[int]’ for array subscript
CHECK((*pairs)[i].device() != (*pairs)[j].device());
^
src/caffe/parallel.cpp:191:47: error: invalid types ‘int[int]’ for array subscript
CHECK((*pairs)[i].device() != (*pairs)[j].device());
^
src/caffe/parallel.cpp: At global scope:
src/caffe/parallel.cpp:202:1: error: ‘P2PSync’ does not name a type
P2PSync<Dtype>::P2PSync(shared_ptr<Solver<Dtype> > root_solver,
^
src/caffe/parallel.cpp:249:1: error: ‘P2PSync’ does not name a type
P2PSync<Dtype>::~P2PSync() {
^
src/caffe/parallel.cpp:271:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::InternalThreadEntry() {
^
src/caffe/parallel.cpp:287:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::on_start() {
^
src/caffe/parallel.cpp:325:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::on_gradients_ready() {
^
src/caffe/parallel.cpp:383:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::Prepare(const vector<int>& gpus,
^
src/caffe/parallel.cpp:421:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::Run(const vector<int>& gpus) {
^
In file included from /usr/local/include/caffe/blob.hpp:8:0,
from /usr/local/include/caffe/caffe.hpp:7,
from src/caffe/parallel.cpp:12:
src/caffe/parallel.cpp:439:19: error: ‘Params’ is not a class template
INSTANTIATE_CLASS(Params);
^
src/caffe/parallel.cpp:439:19: error: explicit instantiation of non-template type ‘caffe::Params’
src/caffe/parallel.cpp:439:19: error: ‘Params’ is not a class template
INSTANTIATE_CLASS(Params);
^
src/caffe/parallel.cpp:439:19: error: explicit instantiation of non-template type ‘caffe::Params’
src/caffe/parallel.cpp:440:19: error: ‘GPUParams’ is not a class template
INSTANTIATE_CLASS(GPUParams);
^
src/caffe/parallel.cpp:440:19: error: explicit instantiation of non-template type ‘caffe::GPUParams’
src/caffe/parallel.cpp:440:19: error: ‘GPUParams’ is not a class template
INSTANTIATE_CLASS(GPUParams);
^
src/caffe/parallel.cpp:440:19: error: explicit instantiation of non-template type ‘caffe::GPUParams’
src/caffe/parallel.cpp:441:19: error: ‘P2PSync’ is not a class template
INSTANTIATE_CLASS(P2PSync);
^
src/caffe/parallel.cpp:441:19: error: explicit instantiation of non-template type ‘caffe::P2PSync’
src/caffe/parallel.cpp:441:19: error: ‘P2PSync’ is not a class template
INSTANTIATE_CLASS(P2PSync);
^
src/caffe/parallel.cpp:441:19: error: explicit instantiation of non-template type ‘caffe::P2PSync’
make: *** [.build_release/src/caffe/parallel.o] Error 1
Makefile.config
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1
# uncomment to disable IO dependencies and corresponding data layers
# USE_OPENCV := 0
# USE_LEVELDB := 0
# USE_LMDB := 0
# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
# You should not set this flag if you will be reading LMDBs with any
# possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1
# Uncomment if you're using OpenCV 3
OPENCV_VERSION := 3
# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++
# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr
# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the lines after *_35 for compatibility.
CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
-gencode arch=compute_20,code=sm_21 \
-gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=sm_50 \
-gencode arch=compute_52,code=sm_52 \
-gencode arch=compute_60,code=sm_60 \
-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_61,code=compute_61
# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
# BLAS := atlas
BLAS := open
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
# BLAS_INCLUDE := /path/to/your/blas
# BLAS_LIB := /path/to/your/blas
# Homebrew puts openblas in a directory that is not on the standard search path
# BLAS_INCLUDE := $(shell brew --prefix openblas)/include
# BLAS_LIB := $(shell brew --prefix openblas)/lib
# This is required only if you will compile the matlab interface.
# MATLAB directory should contain the mex binary in /bin.
# MATLAB_DIR := /usr/local
# MATLAB_DIR := /Applications/MATLAB_R2012b.app
# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
#PYTHON_INCLUDE := /usr/include/python2.7 \
# /usr/lib/python2.7/dist-packages/numpy/core/include
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
ANACONDA_HOME := /home/SGM/anaconda3
PYTHON_INCLUDE := /home/SGM/anaconda3/include \
/home/SGM/anaconda3/include/python3.6m \
/home/SGM/anaconda3/lib/python3.6/site-packages/numpy/core/include
# Uncomment to use Python 3 (default is Python 2)
PYTHON_LIBRARIES := boost_python3 python3.6m
PYTHON_INCLUDE := /home/SGM/anaconda3/include/python3.6m \
/home/SGM/anaconda3/lib/python3.6/site-packages/numpy/core/include
# We need to be able to find libpythonX.X.so or .dylib.
PYTHON_LIB := /usr/lib
# PYTHON_LIB := $(ANACONDA_HOME)/lib
# Homebrew installs numpy in a non standard path (keg only)
# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib
# Uncomment to support layers written in Python (will link against Python libs)
WITH_PYTHON_LAYER := 1
# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/local/hdf5/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/local/hdf5/lib /home/SGM/anaconda3/lib/
# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include
# LIBRARY_DIRS += $(shell brew --prefix)/lib
# Uncomment to use `pkg-config` to specify OpenCV library paths.
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
# USE_PKG_CONFIG := 1
# N.B. both build and distribute dirs are cleared on `make clean`
BUILD_DIR := build
DISTRIBUTE_DIR := distribute
# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
# DEBUG := 1
# The ID of the GPU that 'make runtest' will use to run unit tests.
TEST_GPUID := 0
# enable pretty build (comment to see full commands)
Q ?= #
When you change the environment,have you edit the path in Makefile.config?
Please make the python path correct and make sure cudnn is installed,if you want to compile with cuDNN.
Not very clear with your issue, try comment USE_CUDNN := 1

How to fix an unknown error when cross compiling my QT application to raspberry-pi3

my program (QT/C++)is using a python module to download some video from google drive, it's work very well but I couldn't cross compile it for raspberry pi3.
I am new in QT Cross Compile for raspberry and I couldn't find a solution for this error in any place :
#define _POSIX_C_SOURCE 200112L
^
In file included from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/c++config.h:426,
from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cstddef:41,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobal.h:45,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/qtimer.h:43,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/QTimer:1,
from DigitalSignal.h:5,
from DigitalSignal.cpp:1:
/opt/qtrpi/raspbian/sysroot/usr/include/./features.h:230:0: note: ceci est l'emplacement d’une précédente définition
# define _POSIX_C_SOURCE 200809L
^
In file included from lib/python2.7/Include/Python.h:8:0,
from DigitalSignal.cpp:15:
lib/python2.7/Include/pyconfig.h:1242:0: warning: « _XOPEN_SOURCE » redéfini [enabled by default]
#define _XOPEN_SOURCE 600
^
In file included from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/c++config.h:426,
from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cstddef:41,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobal.h:45,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/qtimer.h:43,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/QTimer:1,
from DigitalSignal.h:5,
from DigitalSignal.cpp:1:
/opt/qtrpi/raspbian/sysroot/usr/include/./features.h:162:0: note: ceci est l'emplacement d’une précédente définition
# define _XOPEN_SOURCE 700
^
In file included from lib/python2.7/Include/Python.h:61:0,
from DigitalSignal.cpp:15:
lib/python2.7/Include/pyport.h:895:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
^
Makefile:1145: recipe for target 'DigitalSignal.o' failed
make: *** [DigitalSignal.o] Error 1
Basing on the solution of this problem Python compilation error: "LONG_BIT definition appears wrong for platform" .I changed in lib/python2.7/Include/pyconfig.h this line #define SIZEOF_LONG 8 bye this line #define SIZEOF_LONG 4 (explanation : '4' for 32 bits and '8' for 64 bits ).
but now I have a new error that i does't understand :::
t/usr/lib/arm-linux-gnueabihf -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Xml -lQt5Core -Wl,-rpath-link,/opt/qtrpi/raspbian/sysroot/opt/vc/lib -lGLESv2 -lpthread
/home/Documents/project/digitalsignage/lib/python2.7//libpython2.7.a : erreur lors de l'ajout de symboles : Format de fichier non reconnu
collect2: error: ld a retourné le statut de sortie 1
Makefile:170: recipe for target 'DigitalSignal' failed
make: *** [DigitalSignal] Error 1
can anyone what is the meaning of this error ???

Linker error: ELF section name out of range

What does this "ELF section name out of range" error mean?
I am trying to build a binary, but constantly getting this linker error.
root#ubuntu:/home/ubuntu/e2c/e2c_core# make all
arm-oe-linux-gnueabi-g++ --sysroot=/home/ubuntu/sysroots/aarch64-oe-linux/ -O0 -g -Wall -fmessage-length=0 -MD -MP -DLINUX=1 -DUSE_CONFIG_FILE=1 --sysroot=/home/ubuntu/sysroots/aarch64-oe-linux/ -fstack-protector -fPIE -z relro -z now -D_FORTIFY_SOURCE=2 -std=c++0x -O3 -Wall -fmessage-length=0 -MD -MP -DLINUX=1 -DUSE_CONFIG_FILE=1 -D__MOCANA_DISABLE_INLINE_ASSEMBLY__ -I. -Iapi/ -Icfg/ -Iplatform/ -Icore/ -Icore/Diagnostics/ -Icore/GreyhoundThread/ -Icore/LIB_Mocana/ -Icore/LIB_ProtonE/ -Icore/Mocana/ -Icore/PKI/ -Icore/Telemetry/ -Icore/UTCtimeSync/ -Icore/jsmn/ -I../e2c_api/ -Ilib/atecclib/ -Ilib/atecclib/lib/ -Ilib/config/ -I../boost/ -I/home/ubuntu/Downloads/libwebsockets/build/include/ -Icore/LIB_Mocana/src/ocsp/ -Iunity/ -include core/E2C_global_include.h -o e2c_core main.o api/api_diy.o api/api_rci.o api/api_sta.o api/TelemetryInterface.o cfg/CloudVariantSetup.o cfg/SwVersion.o core/e2c_core_config.o core/E2C_internal_main.o core/Diagnostics/LegacyDBdiag.o core/GreyhoundThread/FirmwareDownload.o core/GreyhoundThread/GreyhoundThread.o core/GreyhoundThread/Provisioning.o core/GreyhoundThread/UTCtimeSync.o core/GreyhoundThread/WS_Provisioning.o core/jsmn/jsmn.o core/LIB_Mocana/src/asn1/ASN1TreeWalker.o core/LIB_Mocana/src/asn1/derencoder.o core/LIB_Mocana/src/asn1/oiddefs.o core/LIB_Mocana/src/asn1/oidutils.o core/LIB_Mocana/src/asn1/parseasn1.o core/LIB_Mocana/src/asn1/parsecert.o core/LIB_Mocana/src/common/absstream.o core/LIB_Mocana/src/common/altivec.o core/LIB_Mocana/src/common/circ_buf.o core/LIB_Mocana/src/common/circq.o core/LIB_Mocana/src/common/datetime.o core/LIB_Mocana/src/common/debug_console.o core/LIB_Mocana/src/common/dynarray.o core/LIB_Mocana/src/common/hash_table.o core/LIB_Mocana/src/common/hash_value.o core/LIB_Mocana/src/common/int128.o core/LIB_Mocana/src/common/int64.o core/LIB_Mocana/src/common/jacobi.o core/LIB_Mocana/src/common/lucas.o core/LIB_Mocana/src/common/math_arm.o core/LIB_Mocana/src/common/mbitmap.o core/LIB_Mocana/src/common/memfile.o core/LIB_Mocana/src/common/memory_debug.o core/LIB_Mocana/src/common/mem_part.o core/LIB_Mocana/src/common/mem_pool.o core/LIB_Mocana/src/common/merrors.o core/LIB_Mocana/src/common/mocana.o core/LIB_Mocana/src/common/moc_net.o core/LIB_Mocana/src/common/moc_stream.o core/LIB_Mocana/src/common/mprintf.o core/LIB_Mocana/src/common/mrtos.o core/LIB_Mocana/src/common/mstdlib.o core/LIB_Mocana/src/common/mtcp.o core/LIB_Mocana/src/common/prime.o core/LIB_Mocana/src/common/random.o core/LIB_Mocana/src/common/redblack.o core/LIB_Mocana/src/common/rng_seed.o core/LIB_Mocana/src/common/sizedbuffer.o core/LIB_Mocana/src/common/timer.o core/LIB_Mocana/src/common/tree.o core/LIB_Mocana/src/common/uri.o core/LIB_Mocana/src/common/utils.o core/LIB_Mocana/src/common/vlong.o core/LIB_Mocana/src/crypto/aesalgo.o core/LIB_Mocana/src/crypto/aesalgoNi.o core/LIB_Mocana/src/crypto/aes_ccm.o core/LIB_Mocana/src/crypto/aes_cmac.o core/LIB_Mocana/src/crypto/aes.o core/LIB_Mocana/src/crypto/aes_ctr.o core/LIB_Mocana/src/crypto/aes_eax.o core/LIB_Mocana/src/crypto/aes_ecb.o core/LIB_Mocana/src/crypto/aes_keywrap.o core/LIB_Mocana/src/crypto/aes_xcbc_mac_96.o core/LIB_Mocana/src/crypto/aes_xts.o core/LIB_Mocana/src/crypto/ansix9_63_kdf.o core/LIB_Mocana/src/crypto/arc2.o core/LIB_Mocana/src/crypto/arc4.o core/LIB_Mocana/src/crypto/asn1cert.o core/LIB_Mocana/src/crypto/base64m.o core/LIB_Mocana/src/crypto/blowfish.o core/LIB_Mocana/src/crypto/ca_mgmt.o core/LIB_Mocana/src/crypto/cert_store.o core/LIB_Mocana/src/crypto/cms_aux.o core/LIB_Mocana/src/crypto/crypto.o core/LIB_Mocana/src/crypto/des.o core/LIB_Mocana/src/crypto/dh.o core/LIB_Mocana/src/crypto/dsa2.o core/LIB_Mocana/src/crypto/dsa.o core/LIB_Mocana/src/crypto/fips.o core/LIB_Mocana/src/crypto/gcm.o core/LIB_Mocana/src/crypto/hmac.o core/LIB_Mocana/src/crypto/key_utils.o core/LIB_Mocana/src/crypto/md2.o core/LIB_Mocana/src/crypto/md45.o core/LIB_Mocana/src/crypto/md4.o core/LIB_Mocana/src/crypto/md5.o core/LIB_Mocana/src/crypto/nil.o core/LIB_Mocana/src/crypto/nist_rng.o core/LIB_Mocana/src/crypto/pem_key.o core/LIB_Mocana/src/crypto/pkcs10.o core/LIB_Mocana/src/crypto/pkcs12.o core/LIB_Mocana/src/crypto/pkcs1.o core/LIB_Mocana/src/crypto/pkcs5.o core/LIB_Mocana/src/crypto/pkcs7.o core/LIB_Mocana/src/crypto/pkcs8.o core/LIB_Mocana/src/crypto/pkcs_common.o core/LIB_Mocana/src/crypto/pkcs.o core/LIB_Mocana/src/crypto/pkcs_key.o core/LIB_Mocana/src/crypto/primeec_atecc.o core/LIB_Mocana/src/crypto/primeec.o core/LIB_Mocana/src/crypto/primefld.o core/LIB_Mocana/src/crypto/pubcrypto.o core/LIB_Mocana/src/crypto/rc2algo.o core/LIB_Mocana/src/crypto/rc4algo.o core/LIB_Mocana/src/crypto/rsa.o core/LIB_Mocana/src/crypto/sec_key.o core/LIB_Mocana/src/crypto/sha1.o core/LIB_Mocana/src/crypto/sha256.o core/LIB_Mocana/src/crypto/sha512.o core/LIB_Mocana/src/crypto/three_des.o core/LIB_Mocana/src/ocsp/client/ocsp_client.o core/LIB_Mocana/src/ocsp/ocsp_context.o core/LIB_Mocana/src/ocsp/ocsp.o core/LIB_Mocana/src/ocsp/ocsp_http.o core/LIB_Mocana/src/ocsp/ocsp_message.o core/LIB_Mocana/src/platform/linux_rtos.o core/LIB_Mocana/src/platform/linux_tcp_async.o core/LIB_Mocana/src/platform/linux_tcp.o core/LIB_Mocana/src/platform/linux_udp.o core/LIB_Mocana/src/ssl/ssl.o core/LIB_Mocana/src/ssl/ssl_ocsp.o core/LIB_Mocana/src/ssl/sslsock.o core/LIB_ProtonE/src/buffer.o core/LIB_ProtonE/src/error.o core/LIB_ProtonE/src/log.o core/LIB_ProtonE/src/parser.o core/LIB_ProtonE/src/pn_platform.o core/LIB_ProtonE/src/scanner.o core/LIB_ProtonE/src/selectable.o core/LIB_ProtonE/src/types.o core/LIB_ProtonE/src/url.o core/LIB_ProtonE/src/util.o core/LIB_ProtonE/src/codec/codec.o core/LIB_ProtonE/src/codec/decoder.o core/LIB_ProtonE/src/codec/encoder.o core/LIB_ProtonE/src/dispatcher/dispatcher.o core/LIB_ProtonE/src/engine/engine.o core/LIB_ProtonE/src/events/event.o core/LIB_ProtonE/src/framing/framing.o core/LIB_ProtonE/src/message/message.o core/LIB_ProtonE/src/messenger/messenger.o core/LIB_ProtonE/src/messenger/store.o core/LIB_ProtonE/src/messenger/subscription.o core/LIB_ProtonE/src/messenger/transform.o core/LIB_ProtonE/src/object/iterator.o core/LIB_ProtonE/src/object/list.o core/LIB_ProtonE/src/object/map.o core/LIB_ProtonE/src/object/object.o core/LIB_ProtonE/src/object/record.o core/LIB_ProtonE/src/object/string.o core/LIB_ProtonE/src/posix/io.o core/LIB_ProtonE/src/posix/selector.o core/LIB_ProtonE/src/sasl/none_sasl.o core/LIB_ProtonE/src/sasl/sasl.o core/LIB_ProtonE/src/ssl/mocanassl_proton.o core/LIB_ProtonE/src/transport/autodetect.o core/LIB_ProtonE/src/transport/transport.o core/Mocana/MocSetup.o core/Mocana/MocTest.o core/Mocana/TLS_http_get.o core/PKI/CertificateStore.o core/PKI/ILVT.o core/PKI/MDKcode.o core/Telemetry/AMQPlayer.o core/Telemetry/GatewayTerminatedMessages.o core/Telemetry/GHbase64.o core/Telemetry/GHsequence.o core/Telemetry/MsgRouting.o core/Telemetry/RegistrationFlag.o core/Telemetry/TelemetryThread.o core/Telemetry/WSlayer.o core/Telemetry/WS_Stats.o core/Telemetry/PELIB/PELIBassert.o core/Telemetry/PELIB/PELIBmemoryMgmt.o core/Telemetry/PELIB/PELIBplatform.o core/UTCtimeSync/UTCtime.o core/UTCtimeSync/UTCtimeSyncJSON.o platform/Daemon.o platform/Linux_api.o platform/Logger.o platform/Platform.o platform/STA_DNScache.o platform/e2c/BL-RO-Store.o platform/e2c/ConfigStore.o platform/e2c/DebugPrint.o platform/e2c/DeviceConfig.o platform/e2c/E2C_FILE.o platform/e2c/MemoryManager.o platform/e2c/PlatformFileSystem.o lib/config/grammar.o lib/config/libconfig.o lib/config/scanctx.o lib/config/scanner.o lib/config/strbuf.o lib/config/libconfigcpp.o lib/atecclib/libatecc508.a -L../e2c_api/ -L/home/ubuntu/Downloads/libwebsockets/build/lib/ -Wl,--whole-archive -lpthread -ldl -Wl,--no-whole-archive -le2c_api -lrt -lwebsockets -luuid -lcurl
/home/ubuntu/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.3/real-ld: fatal error: /home/ubuntu/sysroots/aarch64-oe-linux/usr/lib/libstdc++.so: ELF section name out of range
What does this actually mean?
In my case I was getting ld : error : myfile: file too short, or sometimes:
ld: warning: myfile has a section extending past end of file
ld : error : myfile: ELF section name out of range
because I was patching for Nix a folder containing both source code and binary blob… and since the number of files to patch was high I used a script to patch them all at the same time (using find and sed -i). Unfortunately, sed was also applied on binary files, which completely corrupted them.
I realized that by printing objdump -a myfile before and after the patching (I would get an error in the second case).

Go-QT Binding: QAbstractAnimation No such file or directory

I am using go-QT binding(https://github.com/therecipe/qt). My code is compiling & working good for amd64 but when I try to cross compile it for arm devices (Raspberrypi), it gives below error. Please advise how to solve this issue
**src/github.com/therecipe/qt/core/core.cpp:9:30: fatal error:
QAbstractAnimation: No such file or directory
compilation terminated.**
Environment Variables
GOARCH="arm"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/minhaj/GoLang"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
GOARM=""
CC="arm-linux-gnueabi-gcc"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-
map=/tmp/go-build728594690=/tmp/go-build -gno-record-gcc-switches"
CXX="arm-linux-gnueabi-g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
Compilation Result
go build -v IndoorMass/
crypto
encoding
encoding/base64
crypto/sha256
unicode/utf16
flag
encoding/json
golang.org/x/image/math/fixed
github.com/golang/freetype/raster
golang.org/x/image/font
github.com/icza/mjpeg
github.com/golang/freetype/truetype
github.com/skip2/go-qrcode/bitset
github.com/skip2/go-qrcode/reedsolomon
path/filepath
io/ioutil
github.com/skip2/go-qrcode
container/list
golang.org/x/net/context
github.com/mattn/go-sqlite3
IndoorMass/General
github.com/tidwall/match
github.com/tidwall/gjson
compress/gzip
crypto/subtle
crypto/cipher
crypto/aes
internal/syscall/unix
math/rand
math/big
crypto/rand
crypto/des
crypto/elliptic
crypto/sha512
encoding/asn1
crypto/ecdsa
crypto/hmac
crypto/internal/cipherhw
crypto/md5
crypto/rc4
crypto/rsa
crypto/sha1
crypto/dsa
crypto/x509/pkix
encoding/hex
encoding/pem
internal/nettrace
internal/singleflight
net
crypto/x509
vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20
vendor/golang_org/x/crypto/poly1305
vendor/golang_org/x/crypto/chacha20poly1305
vendor/golang_org/x/crypto/curve25519
crypto/tls
vendor/golang_org/x/net/http2/hpack
vendor/golang_org/x/net/idna
vendor/golang_org/x/net/lex/httplex
vendor/golang_org/x/text/transform
vendor/golang_org/x/text/unicode/norm
vendor/golang_org/x/text/width
mime
mime/quotedprintable
net/textproto
mime/multipart
net/http/httptrace
net/http/internal
path
net/http
IndoorMass/Server
github.com/kaey/framebuffer
os/exec
github.com/mrmorphic/hwio
github.com/DexterInd/GrovePi/Software/Go/grovepi
IndoorMass/Sensor
github.com/therecipe/qt
github.com/therecipe/qt/core
# github.com/therecipe/qt/core
src/github.com/therecipe/qt/core/core.cpp:9:30: fatal error:
QAbstractAnimation: No such file or directory
compilation terminated.
IndoorMass/DB
IndoorMass/Manager

Installing RLdev tools on Linux

When installing Haeleth's RLdev I got the error:
$ ./configure && omake
........
File "pa_matches.ml", line 24, characters 2-6:
Parse error: Deprecated syntax, the grammar module is expected
Error while running external preprocessor
Command line: camlp4 pa_o.cmo pa_op.cmo pa_extend.cmo q_MLast.cmo pr_dump.cmo 'pa_matches.ml' > /home/.../tmp/ocamlpp4e8738
*** omake error:
File rlc/OMakefile: lines 26:4-27:88
command terminated with code 2: ocamlc -c -pp 'camlp4 pa_o.cmo pa_op.cmo pa_extend.cmo q_MLast.cmo pr_dump.cmo' -I /usr/lib/ocaml/camlp4 gramlib.cma pa_matches.ml -o pa_matches.cmo
File pa_matches.ml contains only following code:
Line 22: open Pcaml
Line 23: EXTEND
Line 24: expr: LEVEL "expr1"
Line 25: [[ v = expr; "matches"; p = patt -> <:expr< match $v$ with [ $p$ -> True | _ -> False ] >> ]];
Line 26: END
In the INSTALL file specified OCaml version 3.09 but 4.01 installed.
OCaml 3.09 is incompatible to OCaml 4.01. This especially applies to camlp4. With OCaml 3.10 a new, backward incompatible version of camlp4 was introduced.
That's probably the reason, why pa_matches.ml doesn't compile. It uses the old camlp4.