deepstream_source_bin.c using the wrong DEBUG category NVDS_APP

deepstream_source_bin.c is referencing NVDS_APP forcing the client to define GST_DEBUG_CATEGORY(NVDS_APP);

MESSAGE: Entering directory `/home/rjhowell44/Public/CanAmMex/deepstream-sever'
/bin/sh -c 'make'
----------Building project:[ deepstream-server - Debug ]----------
g++ -c -o src/DsdMain.o -DPLATFORM_TEGRA -I/opt/nvidia/deepstream/deepstream-4.0/sources/includes -I/opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/includes -I/opt/include -I/opt/nvidia/deepstream/deepstream-4.0/sources/includes -I/usr/include -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/include/glib-2.0/glib -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 -DDS_CONFIG_DIR='"/opt/nvidia/deepstream/deepstream-4.0/samples/configs/deepstream-app"' -DDSD_LOGGER_IMP='"DsdLog4cxx.h"' `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 gstreamer-rtsp-server-1.0 x11` src/DsdMain.cpp
/opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_tracker_bin.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_primary_gie_bin.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_source_bin.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_config_file_parser.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_common.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_sink_bin.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_perf.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_dewarper_bin.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_dsexample.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_secondary_gie_bin.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_tiled_display_bin.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_osd_bin.c /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_streammux.c ./src/DsdDriver.cpp ./src/DsdConfig.cpp ./src/DsdMain.cpp ./src/DsdLog4cxx.cpp ./src/DsdPipeline.cpp
g++ -o ds-server /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_tracker_bin.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_primary_gie_bin.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_source_bin.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_config_file_parser.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_common.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_sink_bin.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_perf.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_dewarper_bin.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_dsexample.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_secondary_gie_bin.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_tiled_display_bin.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_osd_bin.o /opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_streammux.o ./src/DsdDriver.o ./src/DsdConfig.o ./src/DsdMain.o ./src/DsdLog4cxx.o ./src/DsdPipeline.o -L/opt/nvidia/deepstream/deepstream-4.0/lib -llog4cxx -laprutil-1 -lapr-1 -lX11 -L/usr/lib/aarch64-linux-gnu -lnvdsgst_meta -lnvds_meta -lnvdsgst_helper -lnvds_utils -lglib-2.0 -lgstreamer-1.0 -Lgstreamer-video-1.0 -Lgstreamer-rtsp-server-1.0 -Wl,-rpath,/opt/nvidia/deepstream/deepstream-4.0/lib `pkg-config --libs gstreamer-1.0 gstreamer-video-1.0 gstreamer-rtsp-server-1.0 x11`
/opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_tracker_bin.o: In function `create_tracking_bin':
deepstream_tracker_bin.c:(.text+0x2e8): undefined reference to `NVDS_APP'
deepstream_tracker_bin.c:(.text+0x2ec): undefined reference to `NVDS_APP'
/opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_source_bin.o: In function `set_camera_csi_params(NvDsSourceConfig*, NvDsSrcBin*)':
deepstream_source_bin.c:(.text+0x7c): undefined reference to `NVDS_APP'
deepstream_source_bin.c:(.text+0x80): undefined reference to `NVDS_APP'
/opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_source_bin.o: In function `set_camera_v4l2_params(NvDsSourceConfig*, NvDsSrcBin*)':
deepstream_source_bin.c:(.text+0x15c): undefined reference to `NVDS_APP'
/opt/nvidia/deepstream/deepstream-4.0/sources/apps/apps-common/src/deepstream_source_bin.o:deepstream_source_bin.c:(.text+0x160): more undefined references to `NVDS_APP' follow
collect2: error: ld returned 1 exit status
Makefile:105: recipe for target 'ds-server' failed
make: *** [ds-server] Error 1
====7 errors, 0 warnings====

Hi,
We don’t reproduce the error. FYI.

nvidia@nvidia-desktop:~/deepstream_sdk_v4.0_jetson/sources/apps/sample_apps/deepstream-app$ make
cc -c -o deepstream_app.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` deepstream_app.c
cc -c -o deepstream_app_main.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` deepstream_app_main.c
cc -c -o deepstream_app_config_parser.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` deepstream_app_config_parser.c
cc -c -o ../../apps-common/src/deepstream_tracker_bin.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_tracker_bin.c
cc -c -o ../../apps-common/src/deepstream_primary_gie_bin.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_primary_gie_bin.c
cc -c -o ../../apps-common/src/deepstream_source_bin.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_source_bin.c
cc -c -o ../../apps-common/src/deepstream_config_file_parser.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_config_file_parser.c
cc -c -o ../../apps-common/src/deepstream_common.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_common.c
cc -c -o ../../apps-common/src/deepstream_sink_bin.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_sink_bin.c
cc -c -o ../../apps-common/src/deepstream_perf.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_perf.c
cc -c -o ../../apps-common/src/deepstream_dewarper_bin.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_dewarper_bin.c
cc -c -o ../../apps-common/src/deepstream_dsexample.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_dsexample.c
cc -c -o ../../apps-common/src/deepstream_secondary_gie_bin.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_secondary_gie_bin.c
cc -c -o ../../apps-common/src/deepstream_tiled_display_bin.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_tiled_display_bin.c
cc -c -o ../../apps-common/src/deepstream_osd_bin.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_osd_bin.c
cc -c -o ../../apps-common/src/deepstream_streammux.o -DPLATFORM_TEGRA -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=4 `pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 x11` ../../apps-common/src/deepstream_streammux.c
cc -o deepstream-app deepstream_app.o deepstream_app_main.o deepstream_app_config_parser.o ../../apps-common/src/deepstream_tracker_bin.o ../../apps-common/src/deepstream_primary_gie_bin.o ../../apps-common/src/deepstream_source_bin.o ../../apps-common/src/deepstream_config_file_parser.o ../../apps-common/src/deepstream_common.o ../../apps-common/src/deepstream_sink_bin.o ../../apps-common/src/deepstream_perf.o ../../apps-common/src/deepstream_dewarper_bin.o ../../apps-common/src/deepstream_dsexample.o ../../apps-common/src/deepstream_secondary_gie_bin.o ../../apps-common/src/deepstream_tiled_display_bin.o ../../apps-common/src/deepstream_osd_bin.o ../../apps-common/src/deepstream_streammux.o -L/opt/nvidia/deepstream/deepstream-4.0/lib/ -lnvdsgst_meta -lnvds_meta -lnvdsgst_helper -lnvds_utils -lm -lgstrtspserver-1.0 -Wl,-rpath,/opt/nvidia/deepstream/deepstream-4.0/lib/ `pkg-config --libs gstreamer-1.0 gstreamer-video-1.0 x11`
nvidia@nvidia-desktop:~/deepstream_sdk_v4.0_jetson/sources/apps/sample_apps/deepstream-app$

That’s because your building with the deepstream-app which defines the dbug flag.
For those of us using DS4.0 without the deepstream-app, we are forced to define the NVDS_APP in the client software.

It’s a minor issue, but something that should have been caught by your unit testing which of course would not use the app.

All other files in DS use their own debug flag, and not the APP’s flag

Robert.

Hi,

deepstream_sdk_v4.0_jetson\sources\apps\sample_apps\deepstream-app\Makefile

Could you share a patch on the Makefile so that we can reproduce the failure? Not sure what debug flag is in the Makefile.

Hi Robert,

Could you share a patch on the Makefile so that we can reproduce the failure?

Thanks

If someone is still facing the issue, then plz add

GST_DEBUG_CATEGORY (NVDS_APP);

at the top of your .c file