Skip to content

Compile failed #9

@cucrui

Description

@cucrui

I follow README.md instruction and try to run in a single device, it comes out some compiles error as below.

../src/inference_engine_helper.c: In function ‘draw_object_boxes’:
../src/inference_engine_helper.c:372:4: warning: implicit declaration of function ‘get_region_boxes’; did you mean ‘get_network_boxes’? [-Wimplicit-function-declaration]
    get_region_boxes(l, im.w, im.h, net.w, net.h, thresh, probs, boxes, masks, 0, 0, hier_thresh, 1);
    ^~~~~~~~~~~~~~~~
    get_network_boxes
../src/inference_engine_helper.c:373:25: warning: passing argument 1 of ‘do_nms_sort’ from incompatible pointer type [-Wincompatible-pointer-types]
    if (nms) do_nms_sort(boxes, probs, l.w*l.h*l.n, l.classes, nms);
                         ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:753:6: note: expected ‘detection * {aka struct detection *}’ but argument is of type ‘box * {aka struct <anonymous> *}’
 void do_nms_sort(detection *dets, int total, int classes, float thresh);
      ^~~~~~~~~~~
../src/inference_engine_helper.c:373:32: warning: passing argument 2 of ‘do_nms_sort’ makes integer from pointer without a cast [-Wint-conversion]
    if (nms) do_nms_sort(boxes, probs, l.w*l.h*l.n, l.classes, nms);
                                ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:753:6: note: expected ‘int’ but argument is of type ‘float **’
 void do_nms_sort(detection *dets, int total, int classes, float thresh);
      ^~~~~~~~~~~
../src/inference_engine_helper.c:373:13: error: too many arguments to function ‘do_nms_sort’
    if (nms) do_nms_sort(boxes, probs, l.w*l.h*l.n, l.classes, nms);
             ^~~~~~~~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:753:6: note: declared here
 void do_nms_sort(detection *dets, int total, int classes, float thresh);
      ^~~~~~~~~~~
../src/inference_engine_helper.c:374:24: warning: passing argument 2 of ‘draw_detections’ makes pointer from integer without a cast [-Wint-conversion]
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                        ^
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘detection * {aka struct detection *}’ but argument is of type ‘intvoid draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:45: error: incompatible type for argument 4 of ‘draw_detections’
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                                             ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘float’ but argument is of type ‘box * {aka struct <anonymous> *}’
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:52: warning: passing argument 5 of ‘draw_detections’ from incompatible pointer type [-Wincompatible-pointer-types]
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                                                    ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘char **’ but argument is of type ‘float **’
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:59: warning: passing argument 6 of ‘draw_detections’ from incompatible pointer type [-Wincompatible-pointer-types]
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                                                           ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘image ** {aka struct <anonymous> **}’ but argument is of type ‘float **’
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:66: warning: passing argument 7 of ‘draw_detections’ makes integer from pointer without a cast [-Wint-conversion]
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                                                                  ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘int’ but argument is of type ‘char **’
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:4: error: too many arguments to function ‘draw_detections’
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
    ^~~~~~~~~~~~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: declared here
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
Makefile:64: recipe for target 'obj/inference_engine_helper.o' failed
make: *** [obj/inference_engine_helper.o] Error 1

Maybe I think the above errors due to the different version of Darknet? And could you tell me which version of darknet you use?

Another question is in examples/Makefile, should I change DARKNET={darknet path in my pc}, thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions