weixu000 / libtorch-yolov3-deepsort

MIT License
237 stars 77 forks source link

Error when building with "make" on Ubuntu 18.04 #30

Open andikra opened 3 years ago

andikra commented 3 years ago

Hello all,

I need a bit of help with building the repository. My specifications are as follows:

Ubuntu 18.04 libtorch v.1.0.0 OpenCV 3.2

I cloned the repo, created a build folder and used cmake .. , which went well. When I use make, it gives me the following error: cmake .. -- Configuring done -- Generating done -- Build files have been written to: /home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/build andik@andik-VirtualBox:~/Schreibtisch/ML/libtorch-yolov3-deepsort/build$ make ..andik@andik-VirtualBox:~/Schreibtisch/ML/libtorch-yolov3-deepsort/build$ make Scanning dependencies of target detection [ 5%] Building CXX object detection/CMakeFiles/detection.dir/src/Darknet.cpp.o /home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/detection/src/Darknet.cpp:63:53: error: ‘torch::IntArrayRef’ has not been declared torch::Tensor forward(torch::Tensor prediction, torch::IntArrayRef inp_dim) { ^~~~~ /home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/detection/src/Darknet.cpp: In member function ‘at::Tensor DetectionLayerImpl::forward(at::Tensor, int)’: /home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/detection/src/Darknet.cpp:72:38: error: invalid types ‘int[int]’ for array subscript int64_t stride[] = {inp_dim[0] / grid_size[0], inp_dim[1] / grid_size[1]}; ^ /home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/detection/src/Darknet.cpp:72:65: error: invalid types ‘int[int]’ for array subscript int64_t stride[] = {inp_dim[0] / grid_size[0], inp_dim[1] / grid_size[1]}; ^ detection/CMakeFiles/detection.dir/build.make:62: recipe for target 'detection/CMakeFiles/detection.dir/src/Darknet.cpp.o' failed make[2]: [detection/CMakeFiles/detection.dir/src/Darknet.cpp.o] Error 1 CMakeFiles/Makefile2:85: recipe for target 'detection/CMakeFiles/detection.dir/all' failed make[1]: [detection/CMakeFiles/detection.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Has anyone experienced the same error? Best regards Andi

andikra commented 3 years ago

When I use "make -j12", the complete error log is different, I attached it in the txt file. make_error_report.txt