I have upgraded libopencv version in the daisy openembedded to 4.1. It would be very difficult to move to the newer openembedded release due to required support for old hardware. I have a problem running google protoc compiler(from protobuf-native package) in a task.
I have made do_compile_prepend that uses protoc to compile files:
do_compile_prepend() {
#protoc fails with PSEUDO_UNLOAD="1" set by default in the task
unset PSEUDO_UNLOAD
cd /home/s/builds/tmp/work/corei7-64-poky-linux/opencv/4.1.0-r0/build/modules/dnn /home/s/builds/tmp/sysroots/x86_64-linux/usr/bin/protoc --cpp_out /home//builds/tmp/work/corei7-64-poky-linux/opencv/4.1.0-r0/build/modules/dnn -I /home/s/builds/tmp/work/corei7-64-poky-linux/opencv/4.1.0-r0/git/modules/dnn/src/tensorflow -I /home/s/builds/tmp/work/corei7-64-poky-linux/opencv/4.1.0-r0/git/modules/dnn/src/caffe -I /home/s/builds/tmp/work/corei7-64-poky-linux/opencv/4.1.0-r0/git/modules/dnn/src/onnx /home/s/builds/tmp/work/corei7-64-poky-linux/opencv/4.1.0-r0/git/modules/dnn/src/onnx/opencv-onnx.proto
#exit task to prevent other compilations
exit 0
}
It fails with the following error:
[libprotobuf FATAL google/protobuf/generated_message_util.cc:818] CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
From my investigation this error occurs when it was not compiled for the same environment as it is used for. However when run the same task from devshell it succeeds:
bitbake opencv -c devshell
.....
#From the devshell
cd ../temp
./run.do_compile
Now according to the openembedded manual in devshell:
The commands execute just as if the OpenEmbedded build system were executing them.
In my case there is a difference between a task running from devshell and the same task executed directly from bitbake. I have tried to compare environment variables and I do not really see the difference.
Does anybody have a suggestion on how can I find the difference between those two shells? Alternatively could I execute commands in devshell from my task?
Any suggestions are highly appreciated.
I am runnining openembedded daisy on Mint 16 Petra.