Intel OneAPI TBB (2021.1.1.119) does not provide tbb_stddef.h anymore that is included in modules/core/src/parallel.cpp (and CMake cmake/OpenCVDetectTBB.cmake, but this is configurable). Compilation process fails if OpenCV configured
WITH_TBB=ON
/home/user/Work/opencv-4.5.1/modules/core/src/parallel.cpp:104:14: fatal error: tbb/tbb_stddef.h: No such file or directory
104 | #include "tbb/tbb_stddef.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
Replacing
#include "tbb/tbb_stddef.h"
#include "tbb/version.h"
results into another error:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:376:5: warning: "TBB_INTERFACE_VERSION" is not defined, evaluates to 0 [-Wundef]
376 | #if TBB_INTERFACE_VERSION > 9002
| ^~~~~~~~~~~~~~~~~~~~~
[ 94%] Building CXX object modules/gapi/CMakeFiles/opencv_gapi.dir/src/executor/gasync.cpp.o
[ 94%] Building CXX object modules/gapi/CMakeFiles/opencv_gapi.dir/src/backends/cpu/gcpubackend.cpp.o
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:46:42: error: variable or field 'assert_graph_is_running' declared void
46 | inline void assert_graph_is_running(tbb::task* root) {
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:46:46: error: expected primary-expression before '*' token
46 | inline void assert_graph_is_running(tbb::task* root) {
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:46:48: error: 'root' was not declared in this scope
46 | inline void assert_graph_is_running(tbb::task* root) {
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:55:33: error: expected class-name before '{' token
55 | struct functor_task : tbb::task {
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:61:9: error: 'task' in namespace 'tbb' does not name a type
61 | tbb::task * execute() override {
| ^~~~
In file included from /opt/intel/oneapi/tbb/2021.1.1/include/tbb/task.h:17,
from /home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:16:
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/task.h:26:11: note: 'tbb::v1::task' declared here
26 | namespace task {
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In destructor 'cv::gimpl::parallel::detail::tasking::functor_task<body_t>::~functor_task()':
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:69:31: error: there are no arguments to 'parent' that depend on a template parameter, so a declaration of 'parent' must be available [-fpermissive]
69 | assert_graph_is_running(parent());
| ^~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:69:31: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: At global scope:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:74:29: error: expected primary-expression before '*' token
74 | auto allocate_task(tbb::task* root, body_t const& body) -> functor_task<body_t>* {
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:74:31: error: 'root' was not declared in this scope
74 | auto allocate_task(tbb::task* root, body_t const& body) -> functor_task<body_t>* {
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:74:44: error: expected primary-expression before 'const'
74 | auto allocate_task(tbb::task* root, body_t const& body) -> functor_task<body_t>* {
| ^~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:74:55: error: expression list treated as compound expression in initializer [-fpermissive]
74 | auto allocate_task(tbb::task* root, body_t const& body) -> functor_task<body_t>* {
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:74:6: warning: variable templates only available with '-std=c++14' or '-std=gnu++14'
74 | auto allocate_task(tbb::task* root, body_t const& body) -> functor_task<body_t>* {
| ^~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:74:56: error: expected ';' before '->' token
74 | auto allocate_task(tbb::task* root, body_t const& body) -> functor_task<body_t>* {
| ^~~
| ;
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:79:27: error: variable or field 'spawn_no_assert' declared void
79 | void spawn_no_assert(tbb::task* root, body_t const& body) {
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:79:31: error: expected primary-expression before '*' token
79 | void spawn_no_assert(tbb::task* root, body_t const& body) {
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:79:33: error: 'root' was not declared in this scope
79 | void spawn_no_assert(tbb::task* root, body_t const& body) {
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:79:46: error: expected primary-expression before 'const'
79 | void spawn_no_assert(tbb::task* root, body_t const& body) {
| ^~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:94:37: error: 'tbb::task' is not a type
94 | void batch_spawn(size_t count, tbb::task* root, body_t const& body, bool do_assert_graph_is_running = true) {
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In function 'void cv::gimpl::parallel::detail::tasking::batch_spawn(size_t, int*, const body_t&, bool)':
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:97:8: error: there are no arguments to 'assert_graph_is_running' that depend on a template parameter, so a declaration of 'assert_graph_is_running' must be available [-fpermissive]
97 | assert_graph_is_running(root);
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: At global scope:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:107:26: error: 'tbb::task' is not a type
107 | void operator()(tbb::task* t) const { if (t) tbb::task::destroy(*t);};
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In member function 'void cv::gimpl::parallel::detail::tasking::destroy_tbb_task::operator()(int*) const':
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:107:61: error: 'destroy' is not a member of 'tbb::v1::task'; did you mean 'tbb::detail::d1::destroy'?
107 | void operator()(tbb::task* t) const { if (t) tbb::task::destroy(*t);};
| ^~~~~~~
In file included from /opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/detail/_aggregator.h:25,
from /opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/concurrent_priority_queue.h:21,
from /opt/intel/oneapi/tbb/2021.1.1/include/tbb/concurrent_priority_queue.h:17,
from /home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.hpp:21,
from /home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:7:
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/profiling.h:68:63: note: 'tbb::detail::d1::destroy' declared here
68 | enum notify_type {prepare=0, cancel, acquired, releasing, destroy};
| ^~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: At global scope:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:110:59: error: template argument 1 is invalid
110 | using root_t = std::unique_ptr<tbb::task, destroy_tbb_task>;
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:112:1: error: 'root_t' does not name a type
112 | root_t inline create_root(tbb::task_group_context& ctx) {
| ^~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In function 'std::size_t cv::gimpl::parallel::detail::tasking::tg_context_traits()':
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:121:17: error: 'tbb::task_group_context' has not been declared
121 | return tbb::task_group_context::default_traits | tbb::task_group_context::concurrent_wait;
| ^~~~~~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:121:59: error: 'tbb::task_group_context' has not been declared
121 | return tbb::task_group_context::default_traits | tbb::task_group_context::concurrent_wait;
| ^~~~~~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: At global scope:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:195:30: error: 'tbb::task' is not a type
195 | void operator()(tbb::task* t) const {
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:202:56: error: template argument 1 is invalid
202 | std::unique_ptr<tbb::task, root_decrement_ref_count> guard;
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:205:37: error: expected ')' before '&' token
205 | root_wait_lock_t(tasking::root_t& root, is_tbb_work_present& previous_state) : guard{root.get()} {
| ~ ^
| )
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:205:102: error: expected unqualified-id before '{' token
205 | root_wait_lock_t(tasking::root_t& root, is_tbb_work_present& previous_state) : guard{root.get()} {
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In member function 'void cv::gimpl::parallel::detail::async::root_wait_lock_t::root_decrement_ref_count::operator()(int*) const':
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:197:30: error: request for member 'decrement_ref_count' in '* t', which is of non-class type 'int'
197 | auto result = t->decrement_ref_count();
| ^~~~~~~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: At global scope:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:213:18: warning: inline variables are only available with '-std=c++17' or '-std=gnu++17'
213 | root_wait_lock_t inline lock_wait_master(tasking::root_t& root, is_tbb_work_present& previous_state) {
| ^~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:213:51: error: 'root_t' is not a member of 'cv::gimpl::parallel::detail::tasking'
213 | root_wait_lock_t inline lock_wait_master(tasking::root_t& root, is_tbb_work_present& previous_state) {
| ^~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:213:59: error: 'root' was not declared in this scope
213 | root_wait_lock_t inline lock_wait_master(tasking::root_t& root, is_tbb_work_present& previous_state) {
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:213:84: error: expected primary-expression before '&' token
213 | root_wait_lock_t inline lock_wait_master(tasking::root_t& root, is_tbb_work_present& previous_state) {
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:213:86: error: 'previous_state' was not declared in this scope
213 | root_wait_lock_t inline lock_wait_master(tasking::root_t& root, is_tbb_work_present& previous_state) {
| ^~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:213:102: error: expected ',' or ';' before '{' token
213 | root_wait_lock_t inline lock_wait_master(tasking::root_t& root, is_tbb_work_present& previous_state) {
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:246:14: error: 'task_group_context' in namespace 'tbb' does not name a type
246 | tbb::task_group_context tg_ctx;
| ^~~~~~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:247:18: error: 'root_t' in namespace 'cv::gimpl::parallel::detail::tasking' does not name a type
247 | tasking::root_t root;
| ^~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In constructor 'cv::gimpl::parallel::detail::graph::exec_ctx::exec_ctx(tbb::detail::d1::task_arena&, cv::gimpl::parallel::prio_items_queue_t&)':
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:254:15: error: class 'cv::gimpl::parallel::detail::graph::exec_ctx' does not have any field named 'tg_ctx'
254 | tg_ctx{tbb::task_group_context::bound, tasking::tg_context_traits()},
| ^~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:254:27: error: 'tbb::task_group_context' has not been declared
254 | tg_ctx{tbb::task_group_context::bound, tasking::tg_context_traits()},
| ^~~~~~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:255:15: error: class 'cv::gimpl::parallel::detail::graph::exec_ctx' does not have any field named 'root'
255 | root(tasking::create_root(tg_ctx))
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:255:29: error: 'create_root' is not a member of 'cv::gimpl::parallel::detail::tasking'
255 | root(tasking::create_root(tg_ctx))
| ^~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:255:41: error: 'tg_ctx' was not declared in this scope
255 | root(tasking::create_root(tg_ctx))
| ^~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In member function 'void cv::gimpl::parallel::detail::graph::task_body::spawn_clones(std::size_t) const':
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:291:45: error: 'struct cv::gimpl::parallel::detail::graph::exec_ctx' has no member named 'root'
291 | tasking::batch_spawn(items, ctx.root.get(), *this);
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In lambda function:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:335:100: error: 'struct cv::gimpl::parallel::detail::graph::exec_ctx' has no member named 'root'
335 | auto root_wait_lock = copy_through_move(lock_wait_master(self_copy.ctx.root, master_was_active));
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In lambda function:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:345:56: error: 'root_wait_lock' is not captured
345 | volatile auto unused = root_wait_lock.get().guard.get();
| ^~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:342:96: note: the lambda has no capture-default
342 | self_copy.ctx.arena.enqueue([ready_items, self_copy, root_wait_lock]() {
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:335:34: note: '<typeprefixerror>root_wait_lock' declared here
335 | auto root_wait_lock = copy_through_move(lock_wait_master(self_copy.ctx.root, master_was_active));
| ^~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In function 'void cv::gimpl::parallel::execute(cv::gimpl::parallel::prio_items_queue_t&)':
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:379:27: error: 'internal' in namespace 'tbb' does not name a type
379 | using attach_t = tbb::internal::attach;
| ^~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:382:27: error: 'attach_t' was not declared in this scope
382 | tbb::task_arena arena{attach_t{}};
| ^~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:382:35: error: expected '}' before '{' token
382 | tbb::task_arena arena{attach_t{}};
| ~ ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:382:35: error: no matching function for call to 'tbb::detail::d1::task_arena::task_arena(<brace-enclosed initializer list>)'
In file included from /opt/intel/oneapi/tbb/2021.1.1/include/tbb/task_arena.h:17,
from /home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.hpp:22,
from /home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:7:
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/task_arena.h:262:14: note: candidate: 'tbb::detail::d1::task_arena::task_arena(tbb::detail::d1::task_arena::attach)'
262 | explicit task_arena( attach )
| ^~~~~~~~~~
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/task_arena.h:262:14: note: conversion of argument 1 would be ill-formed:
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/task_arena.h:246:5: note: candidate: 'tbb::detail::d1::task_arena::task_arena(const tbb::detail::d1::task_arena&)'
246 | task_arena(const task_arena &s) // copy settings but not the reference or instance
| ^~~~~~~~~~
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/task_arena.h:246:5: note: conversion of argument 1 would be ill-formed:
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/task_arena.h:240:5: note: candidate: 'tbb::detail::d1::task_arena::task_arena(const tbb::detail::d1::task_arena_base::constraints&, unsigned int, tbb::detail::d1::task_arena_base::priority)'
240 | task_arena(const constraints& constraints_, unsigned reserved_for_masters = 1,
| ^~~~~~~~~~
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/task_arena.h:240:5: note: conversion of argument 1 would be ill-formed:
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/task_arena.h:233:5: note: candidate: 'tbb::detail::d1::task_arena::task_arena(int, unsigned int, tbb::detail::d1::task_arena_base::priority)'
233 | task_arena(int max_concurrency_ = automatic, unsigned reserved_for_masters = 1,
| ^~~~~~~~~~
/opt/intel/oneapi/tbb/2021.1.1/include/oneapi/tbb/task_arena.h:233:5: note: conversion of argument 1 would be ill-formed:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:382:35: error: expected ',' or ';' before '{' token
382 | tbb::task_arena arena{attach_t{}};
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:374:55: warning: unused parameter 'q' [-Wunused-parameter]
374 | void cv::gimpl::parallel::execute(prio_items_queue_t& q) {
| ~~~~~~~~~~~~~~~~~~~~^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: At global scope:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:383:12: error: expected constructor, destructor, or type conversion before '(' token
383 | execute(q, arena);
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:384:1: error: expected declaration before '}' token
384 | }
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In lambda function:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:398:55: error: 'struct cv::gimpl::parallel::detail::graph::exec_ctx' has no member named 'root'
398 | tasking::batch_spawn(num_start_tasks, ctx.root.get(), graph::task_body{ctx}, /* assert_graph_is_running*/false);
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In lambda function:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:403:63: error: 'struct cv::gimpl::parallel::detail::graph::exec_ctx' has no member named 'root'
403 | auto tbb_work_done = [&ctx]() { return 1 == ctx.root->ref_count(); };
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In lambda function:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:407:20: error: 'struct cv::gimpl::parallel::detail::graph::exec_ctx' has no member named 'root'
407 | ctx.root->wait_for_all();
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In lambda function:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:414:94: error: could not convert '(& tbb_work_done)->cv::gimpl::parallel::execute(cv::gimpl::parallel::prio_items_queue_t&, tbb::detail::d1::task_arena&)::<lambda()>::<lambda()>()' from 'void' to 'bool'
414 | ctx.async_tasks.cv.wait(lk, [&]{return async_work_done() || !tbb_work_done() ;});
| ~~~~~~~~~~~~~^~
| |
| void
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:414:95: error: in argument to unary !
414 | ctx.async_tasks.cv.wait(lk, [&]{return async_work_done() || !tbb_work_done() ;});
| ^
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp: In lambda function:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:419:33: error: could not convert 'tbb_work_done.cv::gimpl::parallel::execute(cv::gimpl::parallel::prio_items_queue_t&, tbb::detail::d1::task_arena&)::<lambda()>::<lambda()>()' from 'void' to 'bool'
419 | while(!tbb_work_done() || !async_work_done());
| ~~~~~~~~~~~~~^~
| |
| void
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:419:34: error: in argument to unary !
419 | while(!tbb_work_done() || !async_work_done());
| ^
In file included from /home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:12:
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:421:33: error: could not convert 'tbb_work_done.cv::gimpl::parallel::execute(cv::gimpl::parallel::prio_items_queue_t&, tbb::detail::d1::task_arena&)::<lambda()>::<lambda()>()' from 'void' to 'bool'
421 | ASSERT(tbb_work_done() && async_work_done() && "Graph is still running?");
| ~~~~~~~~~~~~~^~
/home/user/Work/opencv-4.5.1/modules/gapi/include/opencv2/gapi/own/assert.hpp:14:44: note: in definition of macro 'GAPI_DbgAssertNoOp'
14 | constexpr bool _assert_tmp = false && (expr); \
| ^~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:24:31: note: in expansion of macro 'GAPI_DbgAssert'
24 | #define ASSERT(expr) GAPI_DbgAssert(expr)
| ^~~~~~~~~~~~~~
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:421:13: note: in expansion of macro 'ASSERT'
421 | ASSERT(tbb_work_done() && async_work_done() && "Graph is still running?");
| ^~~~~~
In file included from /home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:20:
/usr/include/c++/9/condition_variable: In instantiation of 'void std::condition_variable::wait(std::unique_lock<std::mutex>&, _Predicate) [with _Predicate = cv::gimpl::parallel::execute(cv::gimpl::parallel::prio_items_queue_t&, tbb::detail::d1::task_arena&)::<lambda()>::<lambda()>]':
/home/user/Work/opencv-4.5.1/modules/gapi/src/executor/gtbbexecutor.cpp:414:99: required from here
/usr/include/c++/9/condition_variable:100:13: error: could not convert '__p.cv::gimpl::parallel::execute(cv::gimpl::parallel::prio_items_queue_t&, tbb::detail::d1::task_arena&)::<lambda()>::<lambda()>()' from 'void' to 'bool'
100 | while (!__p())
| ~~~^~
| |
| void
/usr/include/c++/9/condition_variable:100:9: error: in argument to unary !
100 | while (!__p())
| ^~~~~~
make[2]: *** [modules/gapi/CMakeFiles/opencv_gapi.dir/build.make:628: modules/gapi/CMakeFiles/opencv_gapi.dir/src/executor/gtbbexecutor.cpp.o] Error 1
Steps to reproduce
Concurrency-in-CGAL CMakeLists.txt Error _ CMake TBB support for parallel excution not working
CGAL/cgal#5676