As there is no prebuild install candidate for ubuntu 20.04 I thought I just build the software from source.
I checked out with git and found out I need OpenCV. So I searched and found a manual to install 3.4.4 on Ubuntu 18.04. Followed the guide and build 3.4.4. Sadly bluecherry won’t install with this error message:
/usr/bin/ld: bc-thread.o: in function cv::String::~String()': /usr/local/include/opencv2/core/cvstd.hpp:648: undefined reference to
cv::String::deallocate()’
/usr/bin/ld: /usr/local/include/opencv2/core/cvstd.hpp:648: undefined reference to cv::String::deallocate()' /usr/bin/ld: bc-thread.o: in function
cv::String::operator=(cv::String const&)’:
/usr/local/include/opencv2/core/cvstd.hpp:656: undefined reference to cv::String::deallocate()' /usr/bin/ld: motion_processor.o: in function
motion_processor::match_ref_frame_opencv(cv::Mat&, cv::Mat&, double, int, int)’:
/usr/src/bluecherry-apps/server/motion_processor.cpp:295: undefined reference to `cv::findContours(cv::_InputOutputArray const&, cv::OutputArray const&, int, int, cv::Point)’
collect2: error: ld returned 1 exit status
make[2]: *** [BCMK:26: bc-server] Error 1
make[2]: Leaving directory ‘/usr/src/bluecherry-apps/server’
make[1]: *** [Makefile:20: server/all] Error 2
make[1]: Leaving directory ‘/usr/src/bluecherry-apps’
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:12: binary] Error 255
Damn! I checked out the latest version for OpenCV (4.3) with git, compiled and installed it. But bluecherry won’t use it as it get’s installed into /usr/local/include/opencv4 and bluecherry want’s opencv2. So renamed the old directory and linked the new to the old name. Then I got this error message:
In file included from bc-thread.cpp:32:
motion_processor.h:5:10: fatal error: opencv2/opencv.hpp: No such file or directory
5 | #include “opencv2/opencv.hpp”
So I got me the latest version for OpenCV in the 3.4 tree. That is 3.4.10 and the opencv_contrib. I build it, installed it and got then this error message:
In file included from /usr/local/include/opencv2/opencv2/core.hpp:3293,
from /usr/local/include/opencv2/opencv.hpp:52,
from motion_processor.h:5,
from bc-thread.cpp:32:
/usr/local/include/opencv2/core/utility.hpp: In instantiation of ‘T cv::CommandLineParser::get(int, bool) const [with T = cv::String]’:
/usr/local/include/opencv2/core/utility.hpp:1072:43: required from here
/usr/local/include/opencv2/core/utility.hpp:922:9: error: cannot convert ‘const cv::Param’ to ‘int’
922 | getByIndex(index, space_delete, ParamType::type, (void*)&val);
| ^~~~~~~~~~
/usr/local/include/opencv2/core/utility.hpp:961:55: note: initializing argument 3 of ‘void cv::CommandLineParser::getByIndex(int, bool, int, void*) const’
961 | void getByIndex(int index, bool space_delete, int type, void* dst) const;
| ^~
/usr/local/include/opencv2/core/utility.hpp: In instantiation of ‘T cv::CommandLineParser::get(const cv::String&, bool) const [with T = cv::String]’:
/usr/local/include/opencv2/core/utility.hpp:1076:42: required from here
/usr/local/include/opencv2/core/utility.hpp:890:9: error: cannot convert ‘const cv::Param’ to ‘int’
890 | getByName(name, space_delete, ParamType::type, (void*)&val);
| ^~~~~~~
/usr/local/include/opencv2/core/utility.hpp:960:63: note: initializing argument 3 of ‘void cv::CommandLineParser::getByName(const cv::String&, bool, int, void*) const’
960 | void getByName(const String& name, bool space_delete, int type, void* dst) const;
| ~~^~
make[2]: *** [: bc-thread.o] Error 1
make[2]: Leaving directory ‘/usr/src/bluecherry-apps/server’
make[1]: *** [Makefile:20: server/all] Error 2
make[1]: Leaving directory ‘/usr/src/bluecherry-apps’
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:12: binary] Error 255
Bummer! Well, then I went a version down to bluecherry 3.01:
wget https://github.com/bluecherrydvr/bluecherry-apps/archive/v3.0.1.zip
mv v3.0.1.zip bluecherry-apps_v3.0.1.zip
unzip bluecherry-apps_v3.0.1.zip
cd bluecherry-apps-3.0.1/
scripts/build_pkg_native.sh
- git submodule foreach --recursive ‘git clean -dxf && git reset --hard’
fatal: not a git repository (or any of the parent directories): .git
And further down to 2.8.1:
wget https://github.com/bluecherrydvr/bluecherry-apps/archive/v2.8.1.zip
mv v2.8.1.zip bluecherry-apps_v2.8.1.zip
cd bluecherry-apps-2.8.1
scripts/build_pkg_native.sh
- git submodule foreach --recursive ‘git clean -dxf && git reset --hard’
fatal: not a git repository (or any of the parent directories): .git
Is there any documentation how to build bluecherry? I could not find anything.