# Can't make a bird detection project

**URL:** <https://forum.core-electronics.com.au/t/cant-make-a-bird-detection-project/19857>\
**Category:** Raspberry Pi\
**Created:** [3 May 2024 17:31 UTC](https://forum.core-electronics.com.au/t/cant-make-a-bird-detection-project/19857 "2024-05-03T17:31:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AryanKamal270819](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AryanKamal270819](https://forum.core-electronics.com.au/u/AryanKamal270819)\
**Post date:** [3 May 2024 17:31 UTC](https://forum.core-electronics.com.au/t/cant-make-a-bird-detection-project/19857/1 "2024-05-03T17:31:55Z")

</div>

OS: Raspberry Pi Bookworm (32 Bit)

Tutorial Followed: [[Object and Animal Recognition With Raspberry Pi and OpenCV - Tutorial Australia](https://core-electronics.com.au/guides/object-identify-raspberry-pi/#Set)]([Object and Animal Recognition With Raspberry Pi and OpenCV - Tutorial Australia](https://core-electronics.com.au/guides/object-identify-raspberry-pi/)

Target: To detect birds using OpenCV

Library: All libraries installed except libpng12-dev, replaced by other latest one.

Problem faced after providing “make -j $(nproc)” command. Everything followed to the point.

Last Output: [36%] Linking CXX shared library …/…/lib/libopencv\_tracking.so [36%] Built target opencv\_tracking make: \*\*\*\*\* [Makefile:166: all] Error 2

I used 32-bit instead of 64-bit because it was giving more errors Kindly help me in making this.

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/e/eb05b25d63fd70129c2d436a6abfd747c7afb2b0.jpeg)

---

<div class="post-metadata">

**Author:** ![Pixmusix](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/pixmusix/32/9719_2.png) [@Pixmusix](https://forum.core-electronics.com.au/u/Pixmusix)\
**Post date:** [4 May 2024 06:14 UTC](https://forum.core-electronics.com.au/t/cant-make-a-bird-detection-project/19857/2 "2024-05-04T06:14:59Z")

</div>

> [@AryanKamal270819](#):
>
> [Makefile:166: all] Error 2

Hi @AryanKamal270819  
Welcome to the forums.

I’ve seen this `[Makefile 16x: all] Error 2` error before.  
This was the thread where it came up.  
Hopefully it woks for you.

> <https://github.com/opencv/opencv/issues/7652>
>
> \---
> 
> \*\*STOP READING NOW\*\*
> 
> If you get the error message from the caption, be…cause it is useless and too generic (are you sure that you build OpenCV library and not other make project?).
> Reason of your build problem is somewhere above this line, you need to grab it instead.
> To get right error message you should run "make" in verbose mode:
> \`\`\`
> $ make VERBOSE=1
> \`\`\`
> (without any -j options to prevent message lines mess)
> 
> \---
> 
> 
> \##### System information (version)
> \- OpenCV =\> 3.1
> \- Operating System / Platform =\> Elementary OS (Loki)
> \- Compiler =\> make
> 
> \##### Detailed description
> \* When I did just \`\`\`cmake -D CMAKE\_BUILD\_TYPE=Release -D CMAKE\_INSTALL\_PREFIX=/usr/local ..\`\`\`, \`\`\`make -j4\`\`\` worked all right\`\`\`
> \* When I tried to \`\`\`make -j4 VERBOSE=1\`\`\` with Examples and Modules, I got this error
> \`\`\`
> ...
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> cd /home/flipswitch/Programs/anaconda3/pkgs/opencv/build && /usr/bin/cmake -E cmake\_depends "Unix Makefiles" /home/flipswitch/Programs/anaconda3/pkgs/opencv /home/flipswitch/Programs/anaconda3/pkgs/opencv\_contrib/modules/surface\_matching /home/flipswitch/Programs/anaconda3/pkgs/opencv/build /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/surface\_matching /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/surface\_matching/CMakeFiles/opencv\_surface\_matching.dir/DependInfo.cmake --color=
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make -f modules/surface\_matching/CMakeFiles/opencv\_surface\_matching.dir/build.make modules/surface\_matching/CMakeFiles/opencv\_surface\_matching.dir/build
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make\[2\]: Nothing to be done for 'modules/surface\_matching/CMakeFiles/opencv\_surface\_matching.dir/build'.
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> \[28%\] Built target opencv\_surface\_matching
> make -f modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_load\_match.dir/build.make modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_load\_match.dir/depend
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> cd /home/flipswitch/Programs/anaconda3/pkgs/opencv/build && /usr/bin/cmake -E cmake\_depends "Unix Makefiles" /home/flipswitch/Programs/anaconda3/pkgs/opencv /home/flipswitch/Programs/anaconda3/pkgs/opencv\_contrib/modules/surface\_matching /home/flipswitch/Programs/anaconda3/pkgs/opencv/build /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/surface\_matching /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_load\_match.dir/DependInfo.cmake --color=
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make -f modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_load\_match.dir/build.make modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_load\_match.dir/build
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make\[2\]: Nothing to be done for 'modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_load\_match.dir/build'.
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> \[28%\] Built target example\_surface\_matching\_ppf\_load\_match
> make -f modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_normal\_computation.dir/build.make modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_normal\_computation.dir/depend
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> cd /home/flipswitch/Programs/anaconda3/pkgs/opencv/build && /usr/bin/cmake -E cmake\_depends "Unix Makefiles" /home/flipswitch/Programs/anaconda3/pkgs/opencv /home/flipswitch/Programs/anaconda3/pkgs/opencv\_contrib/modules/surface\_matching /home/flipswitch/Programs/anaconda3/pkgs/opencv/build /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/surface\_matching /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_normal\_computation.dir/DependInfo.cmake --color=
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make -f modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_normal\_computation.dir/build.make modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_normal\_computation.dir/build
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make\[2\]: Nothing to be done for 'modules/surface\_matching/CMakeFiles/example\_surface\_matching\_ppf\_normal\_computation.dir/build'.
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> \[28%\] Built target example\_surface\_matching\_ppf\_normal\_computation
> make -f modules/video/CMakeFiles/opencv\_video.dir/build.make modules/video/CMakeFiles/opencv\_video.dir/depend
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> cd /home/flipswitch/Programs/anaconda3/pkgs/opencv/build && /usr/bin/cmake -E cmake\_depends "Unix Makefiles" /home/flipswitch/Programs/anaconda3/pkgs/opencv /home/flipswitch/Programs/anaconda3/pkgs/opencv/modules/video /home/flipswitch/Programs/anaconda3/pkgs/opencv/build /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/video /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/video/CMakeFiles/opencv\_video.dir/DependInfo.cmake --color=
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make -f modules/video/CMakeFiles/opencv\_video.dir/build.make modules/video/CMakeFiles/opencv\_video.dir/build
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make\[2\]: Nothing to be done for 'modules/video/CMakeFiles/opencv\_video.dir/build'.
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> \[29%\] Built target opencv\_video
> make -f modules/video/CMakeFiles/opencv\_test\_video.dir/build.make modules/video/CMakeFiles/opencv\_test\_video.dir/depend
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> cd /home/flipswitch/Programs/anaconda3/pkgs/opencv/build && /usr/bin/cmake -E cmake\_depends "Unix Makefiles" /home/flipswitch/Programs/anaconda3/pkgs/opencv /home/flipswitch/Programs/anaconda3/pkgs/opencv/modules/video /home/flipswitch/Programs/anaconda3/pkgs/opencv/build /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/video /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/video/CMakeFiles/opencv\_test\_video.dir/DependInfo.cmake --color=
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make -f modules/video/CMakeFiles/opencv\_test\_video.dir/build.make modules/video/CMakeFiles/opencv\_test\_video.dir/build
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make\[2\]: Nothing to be done for 'modules/video/CMakeFiles/opencv\_test\_video.dir/build'.
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> \[30%\] Built target opencv\_test\_video
> make -f modules/video/CMakeFiles/opencv\_perf\_video.dir/build.make modules/video/CMakeFiles/opencv\_perf\_video.dir/depend
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> cd /home/flipswitch/Programs/anaconda3/pkgs/opencv/build && /usr/bin/cmake -E cmake\_depends "Unix Makefiles" /home/flipswitch/Programs/anaconda3/pkgs/opencv /home/flipswitch/Programs/anaconda3/pkgs/opencv/modules/video /home/flipswitch/Programs/anaconda3/pkgs/opencv/build /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/video /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/video/CMakeFiles/opencv\_perf\_video.dir/DependInfo.cmake --color=
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make -f modules/video/CMakeFiles/opencv\_perf\_video.dir/build.make modules/video/CMakeFiles/opencv\_perf\_video.dir/build
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make\[2\]: Nothing to be done for 'modules/video/CMakeFiles/opencv\_perf\_video.dir/build'.
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> \[31%\] Built target opencv\_perf\_video
> make -f modules/dnn/CMakeFiles/opencv\_dnn.dir/build.make modules/dnn/CMakeFiles/opencv\_dnn.dir/depend
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> cd /home/flipswitch/Programs/anaconda3/pkgs/opencv/build && /usr/bin/cmake -E cmake\_depends "Unix Makefiles" /home/flipswitch/Programs/anaconda3/pkgs/opencv /home/flipswitch/Programs/anaconda3/pkgs/opencv\_contrib/modules/dnn /home/flipswitch/Programs/anaconda3/pkgs/opencv/build /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/dnn /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/dnn/CMakeFiles/opencv\_dnn.dir/DependInfo.cmake --color=
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make -f modules/dnn/CMakeFiles/opencv\_dnn.dir/build.make modules/dnn/CMakeFiles/opencv\_dnn.dir/build
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make\[2\]: Nothing to be done for 'modules/dnn/CMakeFiles/opencv\_dnn.dir/build'.
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> \[33%\] Built target opencv\_dnn
> make -f modules/dnn/CMakeFiles/example\_dnn\_fcn\_semsegm.dir/build.make modules/dnn/CMakeFiles/example\_dnn\_fcn\_semsegm.dir/depend
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> cd /home/flipswitch/Programs/anaconda3/pkgs/opencv/build && /usr/bin/cmake -E cmake\_depends "Unix Makefiles" /home/flipswitch/Programs/anaconda3/pkgs/opencv /home/flipswitch/Programs/anaconda3/pkgs/opencv\_contrib/modules/dnn /home/flipswitch/Programs/anaconda3/pkgs/opencv/build /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/dnn /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/dnn/CMakeFiles/example\_dnn\_fcn\_semsegm.dir/DependInfo.cmake --color=
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> make -f modules/dnn/CMakeFiles/example\_dnn\_fcn\_semsegm.dir/build.make modules/dnn/CMakeFiles/example\_dnn\_fcn\_semsegm.dir/build
> make\[2\]: Entering directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> \[33%\] Linking CXX executable ../../bin/example\_dnn\_fcn\_semsegm
> cd /home/flipswitch/Programs/anaconda3/pkgs/opencv/build/modules/dnn && /usr/bin/cmake -E cmake\_link\_script CMakeFiles/example\_dnn\_fcn\_semsegm.dir/link.txt --verbose=1
> /usr/bin/c++ -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -Wno-shadow -Wno-parentheses -Wno-maybe-uninitialized -Wno-sign-promo -Wno-missing-declarations -O3 -DNDEBUG -DNDEBUG CMakeFiles/example\_dnn\_fcn\_semsegm.dir/samples/fcn\_semsegm.cpp.o -o ../../bin/example\_dnn\_fcn\_semsegm -rdynamic ../../lib/libopencv\_dnn.so.3.1.0 ../../lib/libopencv\_highgui.so.3.1.0 ../../lib/libopencv\_videoio.so.3.1.0 ../../lib/libopencv\_imgcodecs.so.3.1.0 ../../lib/libopencv\_imgproc.so.3.1.0 ../../lib/libopencv\_core.so.3.1.0 -Wl,-rpath,/home/flipswitch/Programs/anaconda3/pkgs/opencv/build/lib 
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::DescriptorPool::FindFileByName(std::\_\_cxx11::basic\_string\<char, std::char\_traits\<char\>, std::allocator\<char\> \> const&) const'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const\*, void (\*)(std::\_\_cxx11::basic\_string\<char, std::char\_traits\<char\>, std::allocator\<char\> \> const&))'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::\_\_cxx11::basic\_string\<char, std::char\_traits\<char\>, std::allocator\<char\> \> const&, google::protobuf::io::CodedOutputStream\*)'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream\*, std::\_\_cxx11::basic\_string\<char, std::char\_traits\<char\>, std::allocator\<char\> \>\*)'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::Message::GetTypeName\[abi:cxx11\]() const'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::\_\_cxx11::basic\_string\<char, std::char\_traits\<char\>, std::allocator\<char\> \> const&, unsigned char\*)'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::Message::InitializationErrorString\[abi:cxx11\]() const'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::internal::empty\_string\_\[abi:cxx11\]'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::\_\_cxx11::basic\_string\<char, std::char\_traits\<char\>, std::allocator\<char\> \> const&, google::protobuf::io::CodedOutputStream\*)'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::internal::WireFormatLite::WriteString(int, std::\_\_cxx11::basic\_string\<char, std::char\_traits\<char\>, std::allocator\<char\> \> const&, google::protobuf::io::CodedOutputStream\*)'
> ../../lib/libopencv\_dnn.so.3.1.0: undefined reference to \`google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::\_\_cxx11::basic\_string\<char, std::char\_traits\<char\>, std::allocator\<char\> \> const\*, google::protobuf::internal::ArenaStringPtr)'
> collect2: error: ld returned 1 exit status
> modules/dnn/CMakeFiles/example\_dnn\_fcn\_semsegm.dir/build.make:100: recipe for target 'bin/example\_dnn\_fcn\_semsegm' failed
> make\[2\]: \*\*\* \[bin/example\_dnn\_fcn\_semsegm\] Error 1
> make\[2\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> CMakeFiles/Makefile2:3094: recipe for target 'modules/dnn/CMakeFiles/example\_dnn\_fcn\_semsegm.dir/all' failed
> make\[1\]: \*\*\* \[modules/dnn/CMakeFiles/example\_dnn\_fcn\_semsegm.dir/all\] Error 2
> make\[1\]: Leaving directory '/home/flipswitch/Programs/anaconda3/pkgs/opencv/build'
> Makefile:160: recipe for target 'all' failed
> make: \*\*\* \[all\] Error 2
> 
> 
> \`\`\`
> 
> \##### Steps to reproduce
> \* Downloaded opencv and opencv\_contrib
> \* Then \`\`\`cmake -D CMAKE\_BUILD\_TYPE=Release -D CMAKE\_INSTALL\_PREFIX=/usr/local -D OPENCV\_EXTRA\_MODULES\_PATH=~/Programs/anaconda3/pkgs/opencv\_contrib/modules -D INSTALL\_C\_EXAMPLES=OFF -D INSTALL\_PYTHON\_EXAMPLES=ON -D BUILD\_EXAMPLES=ON -D WITH\_IPP=OFF ..\`\`\`
> \* Followed by \`\`\`make -j4 VERBOSE=1\`\`\`
> \* First time I tried without using \`\`\`WITH\_IPP=OFF\`\`\`, it reached 50% and errored out with the same error.
> \* Next time I tried with it and it errored out at 23%

Pix ❣
