sergrt / CameraAiDetector

AI-powered detection/notification system for cameras and video files
MIT License
16 stars 1 forks source link

make problem #11

Closed motogon closed 2 months ago

motogon commented 2 months ago

/1/CameraAiDetector/src/uid_utils.h:5:10: fatal error: format: No such file or directory 5 | #include | ^~~~ compilation terminated. make[2]: [src/CMakeFiles/CameraAiDetector.dir/build.make:90: src/CMakeFiles/CameraAiDetector.dir/core.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:98: src/CMakeFiles/CameraAiDetector.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

Debian GNU/Linux 12 (bookworm) cmake version 3.25.1 c++ (GCC) 13.3.0

please advise how to solve this problem thank you

sergrt commented 2 months ago

Looks like something related to c++20 headers, I am not sure how to fix this on Debian. Complete working set of commands for Ubuntu can be found in .github/workflows/cmake-multi-platform.yml, maybe that will help.

motogon commented 2 months ago

Switched to ubuntu - but there are new problems :(

изображение
`[ 7%] Building CXX object src/CMakeFiles/CameraAiDetector.dir/telegram_messages_sender.cpp.o /home/dend/video2tg/CameraAiDetector/src/telegram_messages_sender.cpp: In member function ‘void telegram::MessagesSender::operator()(const telegram::messages::TextMessage&)’: /home/dend/video2tg/CameraAiDetector/src/telegram_messages_sender.cpp:90:65: error: cannot convert ‘bool’ to ‘TgBot::LinkPreviewOptions::Ptr’ {aka ‘std::shared_ptr’} 90 if (!bot_->getApi().sendMessage(user, message.text, false, 0, nullptr, "HTML")) ^~~~~
bool
In file included from /home/dend/video2tg/CameraAiDetector/3rdparty/tgbot-cpp/include/tgbot/tgbot.h:4, from /home/dend/video2tg/CameraAiDetector/src/telegram_messages_sender.h:5, from /home/dend/video2tg/CameraAiDetector/src/telegram_messages_sender.cpp:1: /home/dend/video2tg/CameraAiDetector/3rdparty/tgbot-cpp/include/tgbot/Api.h:180:54: note: initializing argument 3 of ‘TgBot::Message::Ptr TgBot::Api::sendMessage(boost::variant<long int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, const std::string&, TgBot::LinkPreviewOptions::Ptr, TgBot::ReplyParameters::Ptr, TgBot::GenericReply::Ptr, const std::string&, bool, const std::vector<std::shared_ptr >&, int32_t, bool, const std::string&) const’ 180 LinkPreviewOptions::Ptr linkPreviewOptions = nullptr, ~~~~~~^~~~~~ /home/dend/video2tg/CameraAiDetector/src/telegram_messages_sender.cpp: In member function ‘void telegram::MessagesSender::operator()(const telegram::messages::Menu&)’: /home/dend/video2tg/CameraAiDetector/src/telegram_messages_sender.cpp:201:89: error: cannot convert ‘bool’ to ‘TgBot::LinkPreviewOptions::Ptr’ {aka ‘std::shared_ptr’} 201 if (!bot_->getApi().sendMessage(message.recipient, translation::menu::kCaption, false, 0, startmenu, "HTML")) ^~~~~
bool

/home/dend/video2tg/CameraAiDetector/3rdparty/tgbot-cpp/include/tgbot/Api.h:180:54: note: initializing argument 3 of ‘TgBot::Message::Ptr TgBot::Api::sendMessage(boost::variant<long int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, const std::string&, TgBot::LinkPreviewOptions::Ptr, TgBot::ReplyParameters::Ptr, TgBot::GenericReply::Ptr, const std::string&, bool, const std::vector<std::shared_ptr >&, int32_t, bool, const std::string&) const’ 180 | LinkPreviewOptions::Ptr linkPreviewOptions = nullptr, | ~~~~~~^~~~~~`

sergrt commented 2 months ago

Maybe you've checked out tgbot-cpp manually, not with --recurse-submodules?

motogon commented 2 months ago

I don't think so, no. only 2 actions :)

cmake . make

sergrt commented 2 months ago

Update from master, I just updated the code to reflect latest tgbot-cpp changes

motogon commented 2 months ago
изображение

without error thank