1

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.

ozimki
  • 75
  • 8
  • Daisy is quite old, so even if it is difficult to port hardware support, it's maybe the best option here. In your recipe, you shouldn't use absolute paths, I don't know how it worked on Daisy, but you should point to staging target/native sysroot instead. – Nayfe Sep 04 '19 at 13:08
  • This absolute paths are just copied from the output of the real compile task that fails. The recipe is a shortcut for resolving this issue so that I do not have to wait for the whole compile task, where the protoc command is run way after task start – ozimki Sep 04 '19 at 13:14
  • I think it has something to pseudo vs fakeroot that is causing the issue but cannot get to the point where it differs. – ozimki Sep 04 '19 at 13:15

0 Answers0