DeepStream 6.1.1 Compilation error

Hello, I am trying to modify the pixel format used by deepstream, according to the following tutorial.

how-to-change-source-pixel-format-from-yuyv-to-mjpg

There was an error when I compiled in the
/ opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-app
directory.

My environment:

  • deepstream-app version 6.1.1
  • DeepStreamSDK 6.1.1
  • gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  • g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/[mpeg](https://mpeg)gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:3300:3: error: template with C linkage
 3300 |   template<typename _Tp>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
make: *** [Makefile:72: ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.o] Error 1

Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
• The pipeline being used

• Hardware Platform (Jetson / GPU) ubuntu-22.04.1-desktop-amd64
• DeepStream Version 6.1.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 8.5.1
• NVIDIA GPU Driver Version (valid for GPU only) Driver Version: 515.65.01 CUDA Version: 11.7
• Issue Type( questions, new requirements, bugs) questions

I can recreate it every time. Maybe it’s the compiler version?
I’m a c++ novice. I found this article.
why-cant-templates-be-within-extern-c-blocks

Here is the program output

(base) lxy@lxy:/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-app$ ls

deepstream_app.c                deepstream_app_config_parser_yaml.cpp  deepstream_app_main.c  README
deepstream_app_config_parser.c  deepstream_app.h                       Makefile

(base) lxy@lxy:/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-app$ sudo make

cc -c -o deepstream_app.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include deepstream_app.c
deepstream_app.c: In function ‘create_pipeline’:
deepstream_app.c:1133:7: warning: ‘gst_element_get_request_pad’ is deprecated: Use 'gst_element_request_pad_simple' instead [-Wdeprecated-declarations]
 1133 |       demux_src_pad = gst_element_get_request_pad (pipeline->demuxer, pad_name);
      |       ^~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
                 from /usr/include/gstreamer-1.0/gst/gst.h:35,
                 from deepstream_app.c:23:
/usr/include/gstreamer-1.0/gst/gstelement.h:1042:25: note: declared here
 1042 | GstPad*                 gst_element_get_request_pad     (GstElement *element, const gchar *name);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
deepstream_app.c:1227:7: warning: ‘gst_element_get_request_pad’ is deprecated: Use 'gst_element_request_pad_simple' instead [-Wdeprecated-declarations]
 1227 |       demux_src_pad = gst_element_get_request_pad(pipeline->demuxer, pad_name);
      |       ^~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
                 from /usr/include/gstreamer-1.0/gst/gst.h:35,
                 from deepstream_app.c:23:
/usr/include/gstreamer-1.0/gst/gstelement.h:1042:25: note: declared here
 1042 | GstPad*                 gst_element_get_request_pad     (GstElement *element, const gchar *name);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -c -o deepstream_app_config_parser.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include deepstream_app_config_parser.c
cc -c -o deepstream_app_main.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include deepstream_app_main.c
g++ -c -o deepstream_app_config_parser_yaml.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include deepstream_app_config_parser_yaml.cpp
cc -c -o ../../apps-common/src/deepstream_audio_classifier_bin.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_audio_classifier_bin.c
cc -c -o ../../apps-common/src/deepstream_c2d_msg.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_c2d_msg.c
cc -c -o ../../apps-common/src/deepstream_c2d_msg_util.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_c2d_msg_util.c
cc -c -o ../../apps-common/src/deepstream_common.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_common.c
../../apps-common/src/deepstream_common.c: In function ‘link_element_to_streammux_sink_pad’:
../../apps-common/src/deepstream_common.c:85:3: warning: ‘gst_element_get_request_pad’ is deprecated: Use 'gst_element_request_pad_simple' instead [-Wdeprecated-declarations]
   85 |   mux_sink_pad = gst_element_get_request_pad (streammux, pad_name);
      |   ^~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
                 from /usr/include/gstreamer-1.0/gst/gst.h:35,
                 from ../../apps-common/src/deepstream_common.c:23:
/usr/include/gstreamer-1.0/gst/gstelement.h:1042:25: note: declared here
 1042 | GstPad*                 gst_element_get_request_pad     (GstElement *element, const gchar *name);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../apps-common/src/deepstream_common.c: In function ‘link_element_to_demux_src_pad’:
../../apps-common/src/deepstream_common.c:167:3: warning: ‘gst_element_get_request_pad’ is deprecated: Use 'gst_element_request_pad_simple' instead [-Wdeprecated-declarations]
  167 |   demux_src_pad = gst_element_get_request_pad (demux, pad_name);
      |   ^~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
                 from /usr/include/gstreamer-1.0/gst/gst.h:35,
                 from ../../apps-common/src/deepstream_common.c:23:
/usr/include/gstreamer-1.0/gst/gstelement.h:1042:25: note: declared here
 1042 | GstPad*                 gst_element_get_request_pad     (GstElement *element, const gchar *name);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -c -o ../../apps-common/src/deepstream_config_file_parser.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_config_file_parser.c
cc -c -o ../../apps-common/src/deepstream_dewarper_bin.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_dewarper_bin.c
cc -c -o ../../apps-common/src/deepstream_dsanalytics.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_dsanalytics.c
cc -c -o ../../apps-common/src/deepstream_dsexample.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_dsexample.c
cc -c -o ../../apps-common/src/deepstream_osd_bin.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_osd_bin.c
cc -c -o ../../apps-common/src/deepstream_perf.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_perf.c
cc -c -o ../../apps-common/src/deepstream_preprocess.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_preprocess.c
cc -c -o ../../apps-common/src/deepstream_primary_gie_bin.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_primary_gie_bin.c
cc -c -o ../../apps-common/src/deepstream_secondary_gie_bin.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_secondary_gie_bin.c
cc -c -o ../../apps-common/src/deepstream_sink_bin.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_sink_bin.c
cc -c -o ../../apps-common/src/deepstream_source_bin.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_source_bin.c
cc -c -o ../../apps-common/src/deepstream_streammux.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_streammux.c
cc -c -o ../../apps-common/src/deepstream_tiled_display_bin.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_tiled_display_bin.c
cc -c -o ../../apps-common/src/deepstream_tracker_bin.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream_tracker_bin.c
g++ -c -o ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.o -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:44:3: error: template with C linkage
   44 |   template<typename... _Elements>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:47:3: error: template with C linkage
   47 |   template<typename _Tp>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:64:3: error: template with C linkage
   64 |   template<typename _Tp, _Tp __v>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:79:3: error: template with C linkage
   79 |   template<typename _Tp, _Tp __v>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:90:3: error: template with C linkage
   90 |   template<bool __v>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:98:3: error: template with C linkage
   98 |   template<bool __v>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:104:3: error: template with C linkage
  104 |   template<bool, typename, typename>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:108:3: error: template with C linkage
  108 |   template <typename _Type>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:112:3: error: template with C linkage
  112 |   template<typename _Tp>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:115:3: error: template with C linkage
  115 |   template<typename...>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:118:3: error: template specialization with C linkage
  118 |   template<>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:123:3: error: template with C linkage
  123 |   template<typename _B1>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:128:3: error: template with C linkage
  128 |   template<typename _B1, typename _B2>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:133:3: error: template with C linkage
  133 |   template<typename _B1, typename _B2, typename _B3, typename... _Bn>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:138:3: error: template with C linkage
  138 |   template<typename...>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~



      ................


/usr/include/c++/11/type_traits:3294:3: error: template with C linkage
 3294 |   template<typename _Tp>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/glib-typeof.h:39,
                 from /usr/include/glib-2.0/glib/gatomic.h:28,
                 from /usr/include/glib-2.0/glib/gthread.h:32,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/gstreamer-1.0/gst/gst.h:27,
                 from ../../apps-common/includes/deepstream_common.h:31,
                 from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
/usr/include/c++/11/type_traits:3300:3: error: template with C linkage
 3300 |   template<typename _Tp>
      |   ^~~~~~~~
In file included from ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.cpp:23:
../../apps-common/includes/deepstream_common.h:27:1: note: ‘extern "C"’ linkage started here
   27 | extern "C"
      | ^~~~~~~~~~
make: *** [Makefile:72: ../../apps-common/src/deepstream-yaml/deepstream_config_yaml.o] Error 1


You should set CUDA_VER varable before executing make, please check the README description for CUDA_VER and the dependency.
Besides, your OS is Ubuntu22.04, please be noted that DeepStream 6.1.1 works with Ubuntu20.04, please refer to the OS compatibility matrix: Quickstart Guide — DeepStream 6.1.1 Release documentation

CUDA_ The VER variable is directly written in the Makefile。
I saw GCC 9.4.0, and I need to try this
There is no problem when I run the deepStream example, but an error occurs when I recompile。

Can you make other samples in dir sources/apps/sample_app?
We didn’t verify DeepStream 6.1.1 on Ubuntu22.04, and have no such setup, so I’m afraid you have to investigate it yourself. Alternatively, you can consider using DeepStream docker on Ubuntu22.04.

It should be successful. I only see warnings, no errors

(base) lxy@lxy:/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test1$ sudo CUDA_VER=11.7 make
cc -c -o deepstream_test1_app.o -I../../../includes -I /usr/local/cuda-11.7/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include deepstream_test1_app.c
deepstream_test1_app.c: In function ‘main’:
deepstream_test1_app.c:276:3: warning: ‘gst_element_get_request_pad’ is deprecated: Use 'gst_element_request_pad_simple' instead [-Wdeprecated-declarations]
  276 |   sinkpad = gst_element_get_request_pad (streammux, pad_name_sink);
      |   ^~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
                 from /usr/include/gstreamer-1.0/gst/gst.h:35,
                 from deepstream_test1_app.c:23:
/usr/include/gstreamer-1.0/gst/gstelement.h:1042:25: note: declared here
 1042 | GstPad*                 gst_element_get_request_pad     (GstElement *element, const gchar *name);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -o deepstream-test1-app deepstream_test1_app.o -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -L/usr/local/cuda-11.7/lib64/ -lcudart -L/opt/nvidia/deepstream/deepstream-6.1/lib/ -lnvdsgst_meta -lnvds_meta -lnvds_yml_parser -lcuda -Wl,-rpath,/opt/nvidia/deepstream/deepstream-6.1/lib/ 
(base) lxy@lxy:/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test1$ ls

deepstream-test1-app  deepstream_test1_app.c  deepstream_test1_app.o  dstest1_config.yml  dstest1_pgie_config.txt  dstest1_pgie_config.yml  Makefile  README

(base) lxy@lxy:/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test1$ 

There should be no warning in ubuntu20.04, should be related with the gcc/g++ version on your host. You can compare the cc/gcc/g++ version on your host with version in the DeepStream docker.

Hello, I looked at the gcc&g++ version of JetsonNano. I tried to install the same version, but this error still occurred.

/usr/include/c++/7/type_traits:2793:3: error: template with C linkage
   template<typename _Fn, typename _Tp>

You are working on Ubuntu 22.04 PC, right?
Please do not mix with Jetson as the toolchain and cuda/cudnn libraries are quite different compared to dGPU host.

As mentioned before, DeepStream 6.1.1 was verified with Ubuntu 20.04, you need to solve the difference of the dependencies in Ubuntu 22.04. You can compare the tool/lib versions with container (DeepStream | NVIDIA NGC) which should be closer than Jetson.

Can I use your direct flush into the system? Not only docker.

What do you mean “direct flush”? Install deepstream directly on your Ubuntu PC?

Yes, the system image on x86 pc

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

You may consider installing it on a Ubuntu20.04, follow the installation steps (Quickstart Guide — DeepStream 6.1.1 Release documentation) should be fine.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.