stephanecharette / DarkPlate

License plate parsing using Darknet and YOLO
MIT License
66 stars 12 forks source link

Make error #9

Closed hurlyburlymarley closed 2 years ago

hurlyburlymarley commented 2 years ago

Hi Stephan,

Love the youtube videos and the projects you have created. I am new and working on a hobby project of mine. I installed all the pre requirements of DarkPlate but when I run sudo make I get the following: cosme@yolo:~/src/darkplate/build$ sudo make Consolidate compiler generated dependencies of target DarkPlate [ 50%] Building CXX object src/CMakeFiles/DarkPlate.dir/main.cpp.o /home/cosme/src/darkplate/src/main.cpp: In function ‘void process_plate(DarkHelp::NN&, cv::Mat&, cv::Mat&)’: /home/cosme/src/darkplate/src/main.cpp:77:25: error: loop variable ‘prediction’ creates a copy from type ‘const DarkHelp::PredictionResult’ [-Werror=range-loop-construct] 77 | for (const auto prediction : results) | ^~~~~~ /home/cosme/src/darkplate/src/main.cpp:77:25: note: use reference type to prevent copying 77 | for (const auto prediction : results) | ^~~~~~ | & cc1plus: all warnings being treated as errors make[2]: [src/CMakeFiles/DarkPlate.dir/build.make:76: src/CMakeFiles/DarkPlate.dir/main.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:98: src/CMakeFiles/DarkPlate.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

Any ideas? My guess is user error :)

Thanks, Cosme

stephanecharette commented 2 years ago

This is not the cause of your error, but why would you run sudo make instead of make? Now you'll get a bunch of files that are owned by root and which will cause you problems.

hurlyburlymarley commented 2 years ago

Hi Stéphane,

Thank you for the quick response. Let me rebuild correctly without sudo. I ran it with sudo because I don’t know any better. Learning and won’t repeat that mistake. Should I close ticketI’m going to sponsor you later today, really like your videos and what you are doing.

Cosme From: Stéphane Charette @.> Sent: Friday, July 8, 2022 2:22 PM To: stephanecharette/DarkPlate @.> Cc: Cosme Marley @.>; Author @.> Subject: Re: [stephanecharette/DarkPlate] Make error (Issue #9)

This is not the cause of your error, but why would you run sudo make instead of make? Now you'll get a bunch of files that owned by root and which will cause you problems.

— Reply to this email directly, view it on GitHubhttps://github.com/stephanecharette/DarkPlate/issues/9#issuecomment-1179254464, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZ7ELKBRXZOX7ODHRMK4BADVTBWUNANCNFSM53BA724A. You are receiving this because you authored the thread.Message ID: @.**@.>>

stephanecharette commented 2 years ago

I'm guessing you are using a newer version of G++, probably through Ubuntu 22.04. I've made the fix required, will push in the next few minutes.

hurlyburlymarley commented 2 years ago

Yes, using a newer version. Thank you very much. I hope you have a great weekend!!

From: Stéphane Charette @.> Sent: Friday, July 8, 2022 2:48 PM To: stephanecharette/DarkPlate @.> Cc: Cosme Marley @.>; Author @.> Subject: Re: [stephanecharette/DarkPlate] Make error (Issue #9)

I'm guessing you are using a newer version of G++, probably through Ubuntu 22.04. I've made the fix required, will push in the next few minutes.

— Reply to this email directly, view it on GitHubhttps://github.com/stephanecharette/DarkPlate/issues/9#issuecomment-1179271892, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZ7ELKCOGHGMNHBIHAWUKDLVTBZU5ANCNFSM53BA724A. You are receiving this because you authored the thread.Message ID: @.**@.>>

stephanecharette commented 2 years ago

Yes, using a newer version.

Fix has been pushed. Thanks for letting know it was broken.

hurlyburlymarley commented 2 years ago

I'm blown away by a few things: 1) How quickly you responded and delivered fix 2) How much I'm shaking my head watching darkplate work, can't believe it. Thanks again!