Repository: opencv
Issue: Linking CXX executable ../../bin/opencv_test_videostab， error: 'GInferOutputs' in namespace 'cv' does not name a type
Labels: bug

### System Information

OpenCV version: 4.8.0
Operating System / Platform: Ubuntu 22.04.3 LTS
Compiler & compiler version: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

### Detailed description

[100%] Linking CXX executable ../../bin/opencv_test_videostab
[100%] Built target opencv_test_videostab
In file included from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/build/modules/python_bindings_generator/pyopencv_custom_headers.h:21,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:88:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/python_bridge.hpp:85:27: error: 'GInferOutputs' in namespace 'cv' does not name a type
   85 | GAPI_EXPORTS_W inline cv::GInferOutputs infer(const String& name, const cv::GInferInputs& inputs)
      |                           ^~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/python_bridge.hpp:90:23: error: 'GInferOutputs' does not name a type
   90 | GAPI_EXPORTS_W inline GInferOutputs infer(const std::string& name,
      |                       ^~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/python_bridge.hpp:97:23: error: 'GInferListOutputs' does not name a type
   97 | GAPI_EXPORTS_W inline GInferListOutputs infer(const std::string& name,
      |                       ^~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/python_bridge.hpp:104:23: error: 'GInferListOutputs' does not name a type
  104 | GAPI_EXPORTS_W inline GInferListOutputs infer2(const std::string& name,
      |                       ^~~~~~~~~~~~~~~~~
In file included from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/build/modules/python_bindings_generator/pyopencv_custom_headers.h:22,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:88:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:15:49: error: 'GNetPackage' in namespace 'cv::gapi' does not name a type; did you mean 'GKernelPackage'?
   15 | using gapi_GNetPackage              = cv::gapi::GNetPackage;
      |                                                 ^~~~~~~~~~~
      |                                                 GKernelPackage
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:16:49: error: 'ie' in namespace 'cv::gapi' does not name a type
   16 | using gapi_ie_PyParams              = cv::gapi::ie::PyParams;
      |                                                 ^~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:17:49: error: 'onnx' in namespace 'cv::gapi' does not name a type
   17 | using gapi_onnx_PyParams            = cv::gapi::onnx::PyParams;
      |                                                 ^~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:18:49: error: 'ov' in namespace 'cv::gapi' does not name a type
   18 | using gapi_ov_PyParams              = cv::gapi::ov::PyParams;
      |                                                 ^~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:22:61: error: 'GNetParam' is not a member of 'cv::gapi'
   22 | using vector_GNetParam              = std::vector<cv::gapi::GNetParam>;
      |                                                             ^~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:22:61: error: 'GNetParam' is not a member of 'cv::gapi'
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:22:70: error: template argument 1 is invalid
   22 | using vector_GNetParam              = std::vector<cv::gapi::GNetParam>;
      |                                                                      ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:22:70: error: template argument 2 is invalid
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:25:54: error: 'GStreamerSource' in namespace 'cv::gapi::wip' does not name a type; did you mean 'IStreamSource'?
   25 | using GStreamerSource_OutputType    = cv::gapi::wip::GStreamerSource::OutputType;
      |                                                      ^~~~~~~~~~~~~~~
      |                                                      IStreamSource
In file included from /usr/include/python3.10/Python.h:74,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.hpp:20,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:5:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp: In function 'bool pyopencv_to(PyObject*, T&, const ArgInfo&) [with T = cv::util::variant<cv::gapi::wip::draw::Text, cv::gapi::wip::draw::FText, cv::gapi::wip::draw::Rect, cv::gapi::wip::draw::Circle, cv::gapi::wip::draw::Line, cv::gapi::wip::draw::Mosaic, cv::gapi::wip::draw::Image, cv::gapi::wip::draw::Poly>; PyObject = _object]':
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:177:65: error: 'pyopencv_gapi_wip_draw_Rect_TypePtr' was not declared in this scope; did you mean 'pyopencv_rapid_Tracker_TypePtr'?
  177 |     if (PyObject_TypeCheck(obj, reinterpret_cast<PyTypeObject*>(pyopencv_gapi_wip_draw_##Prim##_TypePtr))) \
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:183:5: note: in expansion of macro 'TRY_EXTRACT'
  183 |     TRY_EXTRACT(Rect)
      |     ^~~~~~~~~~~
In file included from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/build/modules/python_bindings_generator/pyopencv_custom_headers.h:22,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:88:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:34: error: 'pyopencv_gapi_wip_draw_Rect_t' does not name a type
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:34: note: in definition of macro 'TRY_EXTRACT'
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:67: error: expected '>' before '*' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                   ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:183:5: note: in expansion of macro 'TRY_EXTRACT'
  183 |     TRY_EXTRACT(Rect)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:67: error: expected '(' before '*' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                   ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:183:5: note: in expansion of macro 'TRY_EXTRACT'
  183 |     TRY_EXTRACT(Rect)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:68: error: expected primary-expression before '>' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                    ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:183:5: note: in expansion of macro 'TRY_EXTRACT'
  183 |     TRY_EXTRACT(Rect)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:76: error: 'PyObject' {aka 'struct _object'} has no member named 'v'
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                            ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:183:5: note: in expansion of macro 'TRY_EXTRACT'
  183 |     TRY_EXTRACT(Rect)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:77: error: expected ')' before ';' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                             ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:183:5: note: in expansion of macro 'TRY_EXTRACT'
  183 |     TRY_EXTRACT(Rect)
      |     ^~~~~~~~~~~
In file included from /usr/include/python3.10/Python.h:74,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.hpp:20,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:5:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:177:65: error: 'pyopencv_gapi_wip_draw_Text_TypePtr' was not declared in this scope; did you mean 'pyopencv_rapid_Tracker_TypePtr'?
  177 |     if (PyObject_TypeCheck(obj, reinterpret_cast<PyTypeObject*>(pyopencv_gapi_wip_draw_##Prim##_TypePtr))) \
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:184:5: note: in expansion of macro 'TRY_EXTRACT'
  184 |     TRY_EXTRACT(Text)
      |     ^~~~~~~~~~~
In file included from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/build/modules/python_bindings_generator/pyopencv_custom_headers.h:22,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:88:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:34: error: 'pyopencv_gapi_wip_draw_Text_t' does not name a type
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:34: note: in definition of macro 'TRY_EXTRACT'
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:67: error: expected '>' before '*' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                   ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:184:5: note: in expansion of macro 'TRY_EXTRACT'
  184 |     TRY_EXTRACT(Text)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:67: error: expected '(' before '*' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                   ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:184:5: note: in expansion of macro 'TRY_EXTRACT'
  184 |     TRY_EXTRACT(Text)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:68: error: expected primary-expression before '>' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                    ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:184:5: note: in expansion of macro 'TRY_EXTRACT'
  184 |     TRY_EXTRACT(Text)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:76: error: 'PyObject' {aka 'struct _object'} has no member named 'v'
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                            ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:184:5: note: in expansion of macro 'TRY_EXTRACT'
  184 |     TRY_EXTRACT(Text)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:77: error: expected ')' before ';' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                             ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:184:5: note: in expansion of macro 'TRY_EXTRACT'
  184 |     TRY_EXTRACT(Text)
      |     ^~~~~~~~~~~
In file included from /usr/include/python3.10/Python.h:74,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.hpp:20,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:5:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:177:65: error: 'pyopencv_gapi_wip_draw_Circle_TypePtr' was not declared in this scope; did you mean 'pyopencv_rapid_Tracker_TypePtr'?
  177 |     if (PyObject_TypeCheck(obj, reinterpret_cast<PyTypeObject*>(pyopencv_gapi_wip_draw_##Prim##_TypePtr))) \
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:185:5: note: in expansion of macro 'TRY_EXTRACT'
  185 |     TRY_EXTRACT(Circle)
      |     ^~~~~~~~~~~
In file included from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/build/modules/python_bindings_generator/pyopencv_custom_headers.h:22,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:88:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:34: error: 'pyopencv_gapi_wip_draw_Circle_t' does not name a type
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:34: note: in definition of macro 'TRY_EXTRACT'
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:67: error: expected '>' before '*' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                   ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:185:5: note: in expansion of macro 'TRY_EXTRACT'
  185 |     TRY_EXTRACT(Circle)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:67: error: expected '(' before '*' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                   ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:185:5: note: in expansion of macro 'TRY_EXTRACT'
  185 |     TRY_EXTRACT(Circle)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:68: error: expected primary-expression before '>' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                    ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:185:5: note: in expansion of macro 'TRY_EXTRACT'
  185 |     TRY_EXTRACT(Circle)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:76: error: 'PyObject' {aka 'struct _object'} has no member named 'v'
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                            ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:185:5: note: in expansion of macro 'TRY_EXTRACT'
  185 |     TRY_EXTRACT(Circle)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:77: error: expected ')' before ';' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                             ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:185:5: note: in expansion of macro 'TRY_EXTRACT'
  185 |     TRY_EXTRACT(Circle)
      |     ^~~~~~~~~~~
In file included from /usr/include/python3.10/Python.h:74,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.hpp:20,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:5:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:177:65: error: 'pyopencv_gapi_wip_draw_Line_TypePtr' was not declared in this scope; did you mean 'pyopencv_rapid_Rapid_TypePtr'?
  177 |     if (PyObject_TypeCheck(obj, reinterpret_cast<PyTypeObject*>(pyopencv_gapi_wip_draw_##Prim##_TypePtr))) \
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:186:5: note: in expansion of macro 'TRY_EXTRACT'
  186 |     TRY_EXTRACT(Line)
      |     ^~~~~~~~~~~
In file included from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/build/modules/python_bindings_generator/pyopencv_custom_headers.h:22,
                 from /workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2.cpp:88:
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:34: error: 'pyopencv_gapi_wip_draw_Line_t' does not name a type
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:34: note: in definition of macro 'TRY_EXTRACT'
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:67: error: expected '>' before '*' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                   ^
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:186:5: note: in expansion of macro 'TRY_EXTRACT'
  186 |     TRY_EXTRACT(Line)
      |     ^~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:179:67: error: expected '(' before '*' token
  179 |         value = reinterpret_cast<pyopencv_gapi_wip_draw_##Prim##_t*>(obj)->v;                              \
      |                                                                   ^

...........

/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp:60:75: error: 'from' is not a member of 'PyOpenCV_Converter<cv::GArrayDesc, void>'
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp: In instantiation of 'PyObject* pyopencv_from(const T&) [with T = cv::GOpaqueDesc; PyObject = _object]':
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:781:38:   required from here
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp:60:75: error: 'from' is not a member of 'PyOpenCV_Converter<cv::GOpaqueDesc, void>'
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp: In instantiation of 'PyObject* pyopencv_from(const T&) [with T = cv::GKernelPackage; PyObject = _object]':
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:964:25:   required from here
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp:60:75: error: 'from' is not a member of 'PyOpenCV_Converter<cv::GKernelPackage, void>'
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp: In instantiation of 'PyObject* pyopencv_from(const T&) [with T = cv::gapi::wip::GOutputs; PyObject = _object]':
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:1025:25:   required from here
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp:60:75: error: 'from' is not a member of 'PyOpenCV_Converter<cv::gapi::wip::GOutputs, void>'
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp: In instantiation of 'bool pyopencv_to(PyObject*, T&, const ArgInfo&) [with T = cv::GCompileArg; PyObject = _object]':
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp:322:25:   required from 'bool pyopencv_to_generic_vec(PyObject*, std::vector<_Tp>&, const ArgInfo&) [with Tp = cv::GCompileArg; PyObject = _object]'
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:286:35:   required from here
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp:57:94: error: 'to' is not a member of 'PyOpenCV_Converter<cv::GCompileArg, void>'
   57 | bool pyopencv_to(PyObject* obj, T& p, const ArgInfo& info) { return PyOpenCV_Converter<T>::to(obj, p, info); }
      |                                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp: In instantiation of 'PyObject* pyopencv_from(const T&) [with T = cv::GCompileArg; PyObject = _object]':
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp:365:39:   required from 'PyObject* pyopencv_from_generic_vec(const std::vector<_Tp>&) [with Tp = cv::GCompileArg; PyObject = _object]'
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/gapi/misc/python/pyopencv_gapi.hpp:292:37:   required from here
/workspace/tensorrt-cpp-api-main/scripts/opencv-4.8.0/modules/python/src2/cv2_convert.hpp:60:75: error: 'from' is not a member of 'PyOpenCV_Converter<cv::GCompileArg, void>'
   60 | PyObject* pyopencv_from(const T& src) { return PyOpenCV_Converter<T>::from(src); }
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:76: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:10072: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

### Steps to reproduce

VERSION=4.8.0

test -e ${VERSION}.zip || wget https://github.com/opencv/opencv/archive/refs/tags/${VERSION}.zip
test -e opencv-${VERSION} || unzip ${VERSION}.zip

test -e opencv_extra_${VERSION}.zip || wget -O opencv_extra_${VERSION}.zip https://github.com/opencv/opencv_contrib/archive/refs/tags/${VERSION}.zip
test -e opencv_contrib-${VERSION} || unzip opencv_extra_${VERSION}.zip


cd opencv-${VERSION}
mkdir build
cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_TBB=ON \
-D ENABLE_FAST_MATH=1 \
-D CUDA_FAST_MATH=1 \
-D WITH_CUBLAS=1 \
-D WITH_CUDA=ON \
-D BUILD_opencv_cudacodec=ON \
-D WITH_CUDNN=ON \
-D OPENCV_DNN_CUDA=ON \
-D WITH_QT=OFF \
-D WITH_OPENGL=ON \
-D BUILD_opencv_apps=OFF \
-D BUILD_opencv_python2=OFF \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D OPENCV_PC_FILE_NAME=opencv.pc \
-D OPENCV_ENABLE_NONFREE=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-${VERSION}/modules \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D INSTALL_C_EXAMPLES=OFF \
-D BUILD_EXAMPLES=OFF \
-D WITH_FFMPEG=ON \
-D CUDNN_INCLUDE_DIR=/usr/include \
-D CUDNN_LIBRARY=/usr/lib/x86_64-linux-gnu/libcudnn.so \
..

make -j 8

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [ ] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)