marcoslucianops / DeepStream-Yolo

NVIDIA DeepStream SDK 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models
MIT License
1.39k stars 344 forks source link

Error compiling deepstream-app c files. #431

Open emad555 opened 10 months ago

emad555 commented 10 months ago

I am trying to make few edits on the c files to print more information, when I compile the files using:

CUDA_VER=10.2 make -C deepstream_app, I got the following error:

cc -c -o deepstream_app.o -DPLATFORM_TEGRA -I./ -I../../apps-common/includes -I../../../includes -DDS_VERSION_MINOR=1 -DDS_VERSION_MAJOR=5 -I /usr/local/cuda-10.2/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include deepstream_app.c
deepstream_app.c:557:34: error: ‘frame_meta’ undeclared here (not in a function); did you mean ‘process_meta’?
 NvOSD_TextParams *text_params = &frame_meta->obj_params[0].text_params[0];
                                  ^~~~~~~~~~
                                  process_meta
deepstream_app.c:558:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->display_text = "Your Custom Text Here";
            ^~
deepstream_app.c:559:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->x_offset = 10;  // X-coordinate of the text
            ^~
deepstream_app.c:560:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->y_offset = 10;  // Y-coordinate of the text
            ^~
deepstream_app.c:580:19: error: redefinition of ‘text_params’
 NvOSD_TextParams *text_params = &frame_meta->obj_params[0].text_params[0];
                   ^~~~~~~~~~~
deepstream_app.c:557:19: note: previous definition of ‘text_params’ was here
 NvOSD_TextParams *text_params = &frame_meta->obj_params[0].text_params[0];
                   ^~~~~~~~~~~
deepstream_app.c:581:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->display_text = "Your Custom Text Here";
            ^~
deepstream_app.c:582:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->x_offset = 10;  // X-coordinate of the text
            ^~
deepstream_app.c:583:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->y_offset = 10;  // Y-coordinate of the text
            ^~
deepstream_app.c:621:19: error: redefinition of ‘text_params’
 NvOSD_TextParams *text_params = &frame_meta->obj_params[0].text_params[0];
                   ^~~~~~~~~~~
deepstream_app.c:557:19: note: previous definition of ‘text_params’ was here
 NvOSD_TextParams *text_params = &frame_meta->obj_params[0].text_params[0];
                   ^~~~~~~~~~~
deepstream_app.c:622:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->display_text = "Your Custom Text Here";
            ^~
deepstream_app.c:623:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->x_offset = 10;  // X-coordinate of the text
            ^~
deepstream_app.c:624:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->y_offset = 10;  // Y-coordinate of the text
            ^~
deepstream_app.c:654:19: error: redefinition of ‘text_params’
 NvOSD_TextParams *text_params = &frame_meta->obj_params[0].text_params[0];
                   ^~~~~~~~~~~
deepstream_app.c:557:19: note: previous definition of ‘text_params’ was here
 NvOSD_TextParams *text_params = &frame_meta->obj_params[0].text_params[0];
                   ^~~~~~~~~~~
deepstream_app.c:655:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->display_text = "Your Custom Text Here";
            ^~
deepstream_app.c:656:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->x_offset = 10;  // X-coordinate of the text
            ^~
deepstream_app.c:657:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->y_offset = 10;  // Y-coordinate of the text
            ^~
deepstream_app.c:687:19: error: redefinition of ‘text_params’
 NvOSD_TextParams *text_params = &frame_meta->obj_params[0].text_params[0];
                   ^~~~~~~~~~~
deepstream_app.c:557:19: note: previous definition of ‘text_params’ was here
 NvOSD_TextParams *text_params = &frame_meta->obj_params[0].text_params[0];
                   ^~~~~~~~~~~
deepstream_app.c:688:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->display_text = "Your Custom Text Here";
            ^~
deepstream_app.c:689:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->x_offset = 10;  // X-coordinate of the text
            ^~
deepstream_app.c:690:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
 text_params->y_offset = 10;  // Y-coordinate of the text
            ^~
Makefile:67: recipe for target 'deepstream_app.o' failed
make: *** [deepstream_app.o] Error 1

Even when I removed my lines I still get the same error.

bongpigeon commented 10 months ago

hello I'm curious about this too. Do you know where the deepstream_app.c file is?

emad555 commented 10 months ago

@bongpigeon

Now I have edited the files and I am getting the following without errors, but nothing happened:

sudo CUDA_VER=10.2 make deepstream-app make: Nothing to be done for 'deepstream-app'.

You can find the folder here: /opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps

bongpigeon commented 10 months ago

So I'm trying to display the objects that are counted, but I can't display it so I tried to edit the deepstream_app_main.c code but nothing happended. Do you know how to?

emad555 commented 10 months ago

I could compile the edited code without errors, but I can't see the changes.

bongpigeon commented 10 months ago

me too.

marcoslucianops commented 10 months ago

This is more specific to the NVIDIA sample code. I recommend you to ask in the NVIDIA forums.