Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile at CentOs 7 #94

Open
GribanovIvan opened this issue Jul 13, 2022 · 23 comments
Open

Can't compile at CentOs 7 #94

GribanovIvan opened this issue Jul 13, 2022 · 23 comments

Comments

@GribanovIvan
Copy link

CMake Error in core/CMakeLists.txt:
Target "Anime4KCPPCore" INTERFACE_INCLUDE_DIRECTORIES property contains
path:

"/tmp/Anime4KCPP/core/"

which is prefixed in the source directory.
for more recent versions used cmake from cmake.org and llvm-toolset-7.
/opt/rh/devtoolset-7/root/bin/c++ linked to /usr/bin/c++

@GribanovIvan
Copy link
Author

same at CentOs 8

@GribanovIvan
Copy link
Author

Cmake finishes fine on "release" source code. But make throws this.

[ 93%] Building CXX object CLI/CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o cd /tmp/Anime4KCPP-2.5.0/build/CLI && /usr/bin/c++ -DCOMPILER=\"GNU\" -I/tmp/Anime4KCPP-2.5.0/Anime4KCore/include -I/tmp/Anime4KCPP-2.5.0/CLI/include -I/tmp/Anime4KCPP-2.5.0/ThirdParty/include -isystem /usr/include/opencv -fopenmp -lpthread -O3 -DNDEBUG -std=gnu++17 -MD -MT CLI/CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o -MF CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o.d -o CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o -c /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp In file included from /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:13: /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:18: error: ‘cmdline’ does not name a type; did you mean ‘cvLine’? Config(const cmdline::parser& parser = cmdline::parser()) ^~~~~~~ cvLine /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:33: error: expected unqualified-id before ‘&’ token Config(const cmdline::parser& parser = cmdline::parser()) ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:33: error: expected ‘)’ before ‘&’ token Config(const cmdline::parser& parser = cmdline::parser()) ~ ^ ) /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:33: error: constructors may not be ref-qualified /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:33: error: expected ‘;’ at end of member declaration Config(const cmdline::parser& parser = cmdline::parser()) ^ ; /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:35: error: ‘parser’ does not name a type; did you mean ‘strsep’? Config(const cmdline::parser& parser = cmdline::parser()) ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:56:5: error: ‘cmdline’ does not name a type; did you mean ‘cvLine’? cmdline::parser& getParser() ^~~~~~~ cvLine /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:151:5: error: ‘cmdline’ does not name a type; did you mean ‘cvLine’? cmdline::parser parser; ^~~~~~~ cvLine /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp: In member function ‘T Config::get(const string&)’: /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:192:24: error: ‘parser’ was not declared in this scope const T& tmp = parser.get<T>(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:192:24: note: suggested alternative: ‘strsep’ const T& tmp = parser.get<T>(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:192:36: error: expected primary-expression before ‘>’ token const T& tmp = parser.get<T>(key); ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:199:24: error: ‘parser’ was not declared in this scope const T& tmp = parser.get<T>(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:199:24: note: suggested alternative: ‘strsep’ const T& tmp = parser.get<T>(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:199:36: error: expected primary-expression before ‘>’ token const T& tmp = parser.get<T>(key); ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp: In member function ‘T Config::get(const string&) [with T = std::__cxx11::basic_string<char>; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:214:34: error: ‘parser’ was not declared in this scope const std::string& tmp = parser.get<std::string>(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:214:34: note: suggested alternative: ‘strsep’ const std::string& tmp = parser.get<std::string>(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:214:56: error: expected primary-expression before ‘>’ token const std::string& tmp = parser.get<std::string>(key); ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:221:34: error: ‘parser’ was not declared in this scope const std::string& tmp = parser.get<std::string>(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:221:34: note: suggested alternative: ‘strsep’ const std::string& tmp = parser.get<std::string>(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:221:56: error: expected primary-expression before ‘>’ token const std::string& tmp = parser.get<std::string>(key); ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp: In member function ‘T Config::get(const string&) [with T = bool; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:233:20: error: ‘parser’ was not declared in this scope bool tmp = parser.exist(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:233:20: note: suggested alternative: ‘strsep’ bool tmp = parser.exist(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:240:20: error: ‘parser’ was not declared in this scope bool tmp = parser.exist(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:240:20: note: suggested alternative: ‘strsep’ bool tmp = parser.exist(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp: In function ‘int main(int, char**)’: /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:146:24: error: ‘class Config’ has no member named ‘getParser’ auto& opt = config.getParser(); ^~~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:148:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("input", 'i', "File for loading", false, "./pic/p1.png"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:149:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("output", 'o', "File for outputting", false, "output.png"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:150:13: error: expected primary-expression before ‘int’ opt.add<int>("passes", 'p', "Passes for processing", false, 2); ^~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:151:13: error: expected primary-expression before ‘int’ opt.add<int>("pushColorCount", 'n', "Limit the number of color pushes", false, 2); ^~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:152:13: error: expected primary-expression before ‘double’ opt.add<double>("strengthColor", 'c', "Strength for pushing color,range 0 to 1,higher for thinner", false, 0.3, cmdline::range(0.0, 1.0)); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:153:13: error: expected primary-expression before ‘double’ opt.add<double>("strengthGradient", 'g', "Strength for pushing gradient,range 0 to 1,higher for sharper", false, 1.0, cmdline::range(0.0, 1.0)); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:154:13: error: expected primary-expression before ‘double’ opt.add<double>("zoomFactor", 'z', "zoom factor for resizing", false, 2.0); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:155:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("threads", 't', "Threads count for video processing", false, std::thread::hardware_concurrency(), cmdline::range(1, int(32 * std::thread::hardware_concurrency()))); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:159:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("start", 'S', "Specify the start frame number for video previewing", false, 0); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:162:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("preFilters", 'r', ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:167:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("postFilters", 'e', ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:177:13: error: expected primary-expression before ‘int’ opt.add<int>("HDNLevel", 'L', "Set HDN level", false, 1, cmdline::range(1, 3)); ^~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:179:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("platformID", 'h', "Specify the platform ID", false, 0); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:180:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("deviceID", 'd', "Specify the device ID", false, 0); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:181:13: error: expected primary-expression before ‘int’ opt.add<int>("OpenCLQueueNumber", 'Q', "Specify the number of command queues for OpenCL, this may affect performance of video processing for OpenCL", false, 1); ^~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:183:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("codec", 'C', "Specify the codec for encoding from mp4v(recommended in Windows), dxva(for Windows), avc1(H264, recommended in Linux), vp09(very slow), " ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:185:9: error: ‘cmdline’ has not been declared cmdline::oneof<std::string>("mp4v", "dxva", "avc1", "vp09", "hevc", "av01", "other")); ^~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:185:35: error: expected primary-expression before ‘>’ token cmdline::oneof<std::string>("mp4v", "dxva", "avc1", "vp09", "hevc", "av01", "other")); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:187:13: error: expected primary-expression before ‘double’ opt.add<double>("forceFps", 'F', "Set output video fps to the specifying number, 0 to disable", false, 0.0); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:192:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("GPGPUModel", 'M', "Specify the GPGPU model for processing", false, "opencl"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:194:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("configTemplate", '\000', "Generate config template", false, "./config"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:204:44: error: expected primary-expression before ‘>’ token std::string input = opt.get<std::string>("input"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:205:45: error: expected primary-expression before ‘>’ token std::string output = opt.get<std::string>("output"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:212:39: error: expected primary-expression before ‘unsigned’ unsigned int frameStart = opt.get<unsigned int>("start"); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:241:54: error: expected primary-expression before ‘>’ token const std::string& path = opt.get<std::string>("configTemplate"); ^ make[2]: *** [CLI/CMakeFiles/Anime4KCPP_CLI.dir/build.make:79: CLI/CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o] Error 1 make[2]: Leaving directory '/tmp/Anime4KCPP-2.5.0/build' make[1]: *** [CMakeFiles/Makefile2:253: CLI/CMakeFiles/Anime4KCPP_CLI.dir/all] Error 2 make[1]: Leaving directory '/tmp/Anime4KCPP-2.5.0/build' make: *** [Makefile:139: all] Error 2 [root@vm3710527 build]# make /usr/bin/cmake -S/tmp/Anime4KCPP-2.5.0 -B/tmp/Anime4KCPP-2.5.0/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /tmp/Anime4KCPP-2.5.0/build/CMakeFiles /tmp/Anime4KCPP-2.5.0/build//CMakeFiles/progress.marks make -f CMakeFiles/Makefile2 all make[1]: Entering directory '/tmp/Anime4KCPP-2.5.0/build' make -f Anime4KCore/CMakeFiles/Anime4KCPPCore.dir/build.make Anime4KCore/CMakeFiles/Anime4KCPPCore.dir/depend make[2]: Entering directory '/tmp/Anime4KCPP-2.5.0/build' cd /tmp/Anime4KCPP-2.5.0/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/Anime4KCPP-2.5.0 /tmp/Anime4KCPP-2.5.0/Anime4KCore /tmp/Anime4KCPP-2.5.0/build /tmp/Anime4KCPP-2.5.0/build/Anime4KCore /tmp/Anime4KCPP-2.5.0/build/Anime4KCore/CMakeFiles/Anime4KCPPCore.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target Anime4KCPPCore make[2]: Leaving directory '/tmp/Anime4KCPP-2.5.0/build' make -f Anime4KCore/CMakeFiles/Anime4KCPPCore.dir/build.make Anime4KCore/CMakeFiles/Anime4KCPPCore.dir/build make[2]: Entering directory '/tmp/Anime4KCPP-2.5.0/build' make[2]: Nothing to be done for 'Anime4KCore/CMakeFiles/Anime4KCPPCore.dir/build'. make[2]: Leaving directory '/tmp/Anime4KCPP-2.5.0/build' [ 87%] Built target Anime4KCPPCore make -f CLI/CMakeFiles/Anime4KCPP_CLI.dir/build.make CLI/CMakeFiles/Anime4KCPP_CLI.dir/depend make[2]: Entering directory '/tmp/Anime4KCPP-2.5.0/build' cd /tmp/Anime4KCPP-2.5.0/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/Anime4KCPP-2.5.0 /tmp/Anime4KCPP-2.5.0/CLI /tmp/Anime4KCPP-2.5.0/build /tmp/Anime4KCPP-2.5.0/build/CLI /tmp/Anime4KCPP-2.5.0/build/CLI/CMakeFiles/Anime4KCPP_CLI.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target Anime4KCPP_CLI make[2]: Leaving directory '/tmp/Anime4KCPP-2.5.0/build' make -f CLI/CMakeFiles/Anime4KCPP_CLI.dir/build.make CLI/CMakeFiles/Anime4KCPP_CLI.dir/build make[2]: Entering directory '/tmp/Anime4KCPP-2.5.0/build' [ 93%] Building CXX object CLI/CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o cd /tmp/Anime4KCPP-2.5.0/build/CLI && /usr/bin/c++ -DCOMPILER=\"GNU\" -I/tmp/Anime4KCPP-2.5.0/Anime4KCore/include -I/tmp/Anime4KCPP-2.5.0/CLI/include -I/tmp/Anime4KCPP-2.5.0/ThirdParty/include -isystem /usr/include/opencv -fopenmp -lpthread -O3 -DNDEBUG -std=gnu++17 -MD -MT CLI/CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o -MF CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o.d -o CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o -c /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp In file included from /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:13: /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:18: error: ‘cmdline’ does not name a type; did you mean ‘cvLine’? Config(const cmdline::parser& parser = cmdline::parser()) ^~~~~~~ cvLine /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:33: error: expected unqualified-id before ‘&’ token Config(const cmdline::parser& parser = cmdline::parser()) ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:33: error: expected ‘)’ before ‘&’ token Config(const cmdline::parser& parser = cmdline::parser()) ~ ^ ) /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:33: error: constructors may not be ref-qualified /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:33: error: expected ‘;’ at end of member declaration Config(const cmdline::parser& parser = cmdline::parser()) ^ ; /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:53:35: error: ‘parser’ does not name a type; did you mean ‘strsep’? Config(const cmdline::parser& parser = cmdline::parser()) ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:56:5: error: ‘cmdline’ does not name a type; did you mean ‘cvLine’? cmdline::parser& getParser() ^~~~~~~ cvLine /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:151:5: error: ‘cmdline’ does not name a type; did you mean ‘cvLine’? cmdline::parser parser; ^~~~~~~ cvLine /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp: In member function ‘T Config::get(const string&)’: /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:192:24: error: ‘parser’ was not declared in this scope const T& tmp = parser.get<T>(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:192:24: note: suggested alternative: ‘strsep’ const T& tmp = parser.get<T>(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:192:36: error: expected primary-expression before ‘>’ token const T& tmp = parser.get<T>(key); ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:199:24: error: ‘parser’ was not declared in this scope const T& tmp = parser.get<T>(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:199:24: note: suggested alternative: ‘strsep’ const T& tmp = parser.get<T>(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:199:36: error: expected primary-expression before ‘>’ token const T& tmp = parser.get<T>(key); ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp: In member function ‘T Config::get(const string&) [with T = std::__cxx11::basic_string<char>; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:214:34: error: ‘parser’ was not declared in this scope const std::string& tmp = parser.get<std::string>(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:214:34: note: suggested alternative: ‘strsep’ const std::string& tmp = parser.get<std::string>(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:214:56: error: expected primary-expression before ‘>’ token const std::string& tmp = parser.get<std::string>(key); ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:221:34: error: ‘parser’ was not declared in this scope const std::string& tmp = parser.get<std::string>(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:221:34: note: suggested alternative: ‘strsep’ const std::string& tmp = parser.get<std::string>(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:221:56: error: expected primary-expression before ‘>’ token const std::string& tmp = parser.get<std::string>(key); ^ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp: In member function ‘T Config::get(const string&) [with T = bool; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:233:20: error: ‘parser’ was not declared in this scope bool tmp = parser.exist(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:233:20: note: suggested alternative: ‘strsep’ bool tmp = parser.exist(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:240:20: error: ‘parser’ was not declared in this scope bool tmp = parser.exist(key); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/include/Config.hpp:240:20: note: suggested alternative: ‘strsep’ bool tmp = parser.exist(key); ^~~~~~ strsep /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp: In function ‘int main(int, char**)’: /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:146:24: error: ‘class Config’ has no member named ‘getParser’ auto& opt = config.getParser(); ^~~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:148:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("input", 'i', "File for loading", false, "./pic/p1.png"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:149:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("output", 'o', "File for outputting", false, "output.png"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:150:13: error: expected primary-expression before ‘int’ opt.add<int>("passes", 'p', "Passes for processing", false, 2); ^~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:151:13: error: expected primary-expression before ‘int’ opt.add<int>("pushColorCount", 'n', "Limit the number of color pushes", false, 2); ^~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:152:13: error: expected primary-expression before ‘double’ opt.add<double>("strengthColor", 'c', "Strength for pushing color,range 0 to 1,higher for thinner", false, 0.3, cmdline::range(0.0, 1.0)); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:153:13: error: expected primary-expression before ‘double’ opt.add<double>("strengthGradient", 'g', "Strength for pushing gradient,range 0 to 1,higher for sharper", false, 1.0, cmdline::range(0.0, 1.0)); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:154:13: error: expected primary-expression before ‘double’ opt.add<double>("zoomFactor", 'z', "zoom factor for resizing", false, 2.0); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:155:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("threads", 't', "Threads count for video processing", false, std::thread::hardware_concurrency(), cmdline::range(1, int(32 * std::thread::hardware_concurrency()))); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:159:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("start", 'S', "Specify the start frame number for video previewing", false, 0); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:162:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("preFilters", 'r', ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:167:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("postFilters", 'e', ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:177:13: error: expected primary-expression before ‘int’ opt.add<int>("HDNLevel", 'L', "Set HDN level", false, 1, cmdline::range(1, 3)); ^~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:179:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("platformID", 'h', "Specify the platform ID", false, 0); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:180:13: error: expected primary-expression before ‘unsigned’ opt.add<unsigned int>("deviceID", 'd', "Specify the device ID", false, 0); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:181:13: error: expected primary-expression before ‘int’ opt.add<int>("OpenCLQueueNumber", 'Q', "Specify the number of command queues for OpenCL, this may affect performance of video processing for OpenCL", false, 1); ^~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:183:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("codec", 'C', "Specify the codec for encoding from mp4v(recommended in Windows), dxva(for Windows), avc1(H264, recommended in Linux), vp09(very slow), " ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:185:9: error: ‘cmdline’ has not been declared cmdline::oneof<std::string>("mp4v", "dxva", "avc1", "vp09", "hevc", "av01", "other")); ^~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:185:35: error: expected primary-expression before ‘>’ token cmdline::oneof<std::string>("mp4v", "dxva", "avc1", "vp09", "hevc", "av01", "other")); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:187:13: error: expected primary-expression before ‘double’ opt.add<double>("forceFps", 'F', "Set output video fps to the specifying number, 0 to disable", false, 0.0); ^~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:192:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("GPGPUModel", 'M', "Specify the GPGPU model for processing", false, "opencl"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:194:24: error: expected primary-expression before ‘>’ token opt.add<std::string>("configTemplate", '\000', "Generate config template", false, "./config"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:204:44: error: expected primary-expression before ‘>’ token std::string input = opt.get<std::string>("input"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:205:45: error: expected primary-expression before ‘>’ token std::string output = opt.get<std::string>("output"); ^ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:212:39: error: expected primary-expression before ‘unsigned’ unsigned int frameStart = opt.get<unsigned int>("start"); ^~~~~~~~ /tmp/Anime4KCPP-2.5.0/CLI/src/main.cpp:241:54: error: expected primary-expression before ‘>’ token const std::string& path = opt.get<std::string>("configTemplate"); ^ make[2]: *** [CLI/CMakeFiles/Anime4KCPP_CLI.dir/build.make:79: CLI/CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o] Error 1 make[2]: Leaving directory '/tmp/Anime4KCPP-2.5.0/build' make[1]: *** [CMakeFiles/Makefile2:253: CLI/CMakeFiles/Anime4KCPP_CLI.dir/all] Error 2 make[1]: Leaving directory '/tmp/Anime4KCPP-2.5.0/build' make: *** [Makefile:139: all] Error 2

@TianZerL
Copy link
Owner

I wonder your cmake's version and options, I failed to repeat this error with cmake V3.22.0.

@GribanovIvan
Copy link
Author

3.20.2 On CentOs8 and 3.23.2 on CentOs7 (self-compilled)

on options, just cmake ..

Builds fine on ArchLinux with ALHP repo, cmake 3.23.2, native optimization, SSE42, AVX, AVX2 and even GUI

@GribanovIvan
Copy link
Author

UPD: i tried "release" only on CentOs8

@TianZerL
Copy link
Owner

I believe this is caused by cmake v3. 20. #88 also got this issue with cmake v3. 20 on windows10.
Will figure it out later. For now just uses the newer version of cmake.

@GribanovIvan
Copy link
Author

3.23.2 on CentOs7 but not on ArchLinux keeps throwing same error. Probably, version of cmake it's not only problem in this puzzle..

cmake on CentOs7 without any redhat patches or something, compiled from sources

@TianZerL
Copy link
Owner

TianZerL commented Aug 3, 2022

This error happens at cmake generate phase, and it seems you can ignore this error and just use make to build.

@GribanovIvan
Copy link
Author

Seems no. After cmake error i get
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.

And that's true
[ 68%] Building CXX object core/CMakeFiles/Anime4KCPPCore.dir/src/VideoIO.cpp.o cd /tmp/Anime4KCPP/build/core && /opt/rh/devtoolset-7/root/bin/c++ -DANIME4KCPP_CORE_BUILD_DATE=\"2022-08-04\" -DANIME4KCPP_CORE_COMPILER=\"GNU\" -DANIME4KCPP_CORE_PARALLEL_LIBRARY=\"OpenMP\" -DANIME4KCPP_CORE_VERSION=\"2.6.0\" -DANIME4KCPP_CORE_VERSION_MAJOR=2 -DANIME4KCPP_CORE_VERSION_MINOR=6 -DANIME4KCPP_CORE_VERSION_PATCH=0 -DANIME4KCPP_CORE_VERSION_STATUS=\"dev\" -DBUILT_IN_KERNEL -DENABLE_IMAGE_IO -DENABLE_OPENCL -DENABLE_PREVIEW_GUI -DENABLE_VIDEO -DUSE_OPENMP -I/usr/include/opencv -I/tmp/Anime4KCPP/core/include -I/tmp/Anime4KCPP/build/core -I/tmp/Anime4KCPP/core/usr/include/opencv -I/tmp/Anime4KCPP/ThirdParty/include/opencl -O3 -DNDEBUG -pthread -fopenmp -std=c++1z -MD -MT core/CMakeFiles/Anime4KCPPCore.dir/src/VideoIO.cpp.o -MF CMakeFiles/Anime4KCPPCore.dir/src/VideoIO.cpp.o.d -o CMakeFiles/Anime4KCPPCore.dir/src/VideoIO.cpp.o -c /tmp/Anime4KCPP/core/src/VideoIO.cpp /tmp/Anime4KCPP/core/src/VideoIO.cpp: In member function ‘bool Anime4KCPP::Video::VideoIO::openWriter(const string&, Anime4KCPP::Codec, const Size&, double, bool)’: /tmp/Anime4KCPP/core/src/VideoIO.cpp:38:30: error: ‘CAP_PROP_FPS’ is not a member of ‘cv’ fps = reader.get(cv::CAP_PROP_FPS); ^~~~~~~~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:56:34: error: ‘CAP_FFMPEG’ is not a member of ‘cv’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('m', 'p', '4', 'v'), fps, size); ^~~~~~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:56:63: error: ‘fourcc’ is not a member of ‘cv::VideoWriter’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('m', 'p', '4', 'v'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:61:51: error: ‘fourcc’ is not a member of ‘cv::VideoWriter’ writer.open(dstFile, cv::VideoWriter::fourcc('m', 'p', '4', 'v'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:94:34: error: ‘CAP_FFMPEG’ is not a member of ‘cv’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('a', 'v', 'c', '1'), fps, size); ^~~~~~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:94:63: error: ‘fourcc’ is not a member of ‘cv::VideoWriter’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('a', 'v', 'c', '1'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:99:51: error: ‘fourcc’ is not a member of ‘cv::VideoWriter’ writer.open(dstFile, cv::VideoWriter::fourcc('a', 'v', 'c', '1'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:113:34: error: ‘CAP_FFMPEG’ is not a member of ‘cv’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('v', 'p', '0', '9'), fps, size); ^~~~~~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:113:63: error: ‘fourcc’ is not a member of ‘cv::VideoWrite’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('v', 'p', '0', '9'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:118:51: error: ‘fourcc’ is not a member of ‘cv::VideoWrite’ writer.open(dstFile, cv::VideoWriter::fourcc('v', 'p', '0', '9'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:132:34: error: ‘CAP_FFMPEG’ is not a member of ‘cv’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('h', 'e', 'v', '1'), fps, size); ^~~~~~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:132:63: error: ‘fourcc’ is not a member of ‘cv::VideoWrite’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('h', 'e', 'v', '1'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:137:51: error: ‘fourcc’ is not a member of ‘cv::VideoWrite’ writer.open(dstFile, cv::VideoWriter::fourcc('h', 'e', 'v', '1'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:151:34: error: ‘CAP_FFMPEG’ is not a member of ‘cv’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('a', 'v', '0', '1'), fps, size); ^~~~~~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:151:63: error: ‘fourcc’ is not a member of ‘cv::VideoWrite’ writer.open(dstFile, cv::CAP_FFMPEG, cv::VideoWriter::fourcc('a', 'v', '0', '1'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:156:51: error: ‘fourcc’ is not a member of ‘cv::VideoWrite’ writer.open(dstFile, cv::VideoWriter::fourcc('a', 'v', '0', '1'), fps, size); ^~~~~~ /tmp/Anime4KCPP/core/src/VideoIO.cpp:168:47: error: ‘fourcc’ is not a member of ‘cv::VideoWrite’ writer.open(dstFile, cv::VideoWriter::fourcc('m', 'p', '4', 'v'), fps, size); ^~~~~~ make[2]: *** [core/CMakeFiles/Anime4KCPPCore.dir/src/VideoIO.cpp.o] Error 1 make[2]: Leaving directory /tmp/Anime4KCPP/build'
make[1]: *** [core/CMakeFiles/Anime4KCPPCore.dir/all] Error 2
make[1]: Leaving directory /tmp/Anime4KCPP/build' make: *** [all] Error 2
when make

@TianZerL
Copy link
Owner

TianZerL commented Aug 6, 2022

opencv version?

@GribanovIvan
Copy link
Author

opencv-2.4.5-3.el7.src.rpm

@TianZerL
Copy link
Owner

TianZerL commented Aug 6, 2022

opencv-2.4.5-3.el7.src.rpm

That's outdated. OpenCV3.2 should be the earliest version which could pass the building. OpenCV4 is recommended.

@GribanovIvan
Copy link
Author

Please, force cmake warn about it

@TianZerL
Copy link
Owner

TianZerL commented Aug 6, 2022

Well, I did this check inside the code via macros, but to my surprise, opencv2 does not seem to include that version checking macro...

@GribanovIvan
Copy link
Author

`-- Failed to complie has_filesystem.cpp, will use boost::filesystem instead of std::filesystem
Change Dir: /tmp/Anime4KCPP/build/tmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_932f9/fast && /usr/bin/gmake -f CMakeFiles/cmTC_932f9.dir/build.make CMakeFiles/cmTC_932f9.dir/build
gmake[1]: Entering directory /tmp/Anime4KCPP/build/tmp/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_932f9.dir/has_filesystem.cpp.o /opt/rh/devtoolset-7/root/bin/c++ -mavx -std=c++1z -o CMakeFiles/cmTC_932f9.dir/has_filesystem.cpp.o -c /tmp/Anime4KCPP/cmake/DetectionSample/has_filesystem.cpp /tmp/Anime4KCPP/cmake/DetectionSample/has_filesystem.cpp:1:10: fatal error: filesystem: No such file or directory #include <filesystem> ^~~~~~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_932f9.dir/has_filesystem.cpp.o] Error 1 gmake[1]: Leaving directory /tmp/Anime4KCPP/build/tmp/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_932f9/fast] Error 2`

when cmake with opencv4.6

and 96%] Building CXX object CLI/CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o cd /tmp/Anime4KCPP/build/CLI && /opt/rh/devtoolset-7/root/bin/c++ -DANIME4KCPP_CORE_BUILD_DATE=\"2022-08-06\" -DANIME4KCPP_CORE_COMPILER=\"GNU\" -DANIME4KCPP_CORE_PARALLEL_LIBRARY=\"OpenMP\" -DANIME4KCPP_CORE_VERSION=\"2.6.0\" -DANIME4KCPP_CORE_VERSION_MAJOR=2 -DANIME4KCPP_CORE_VERSION_MINOR=6 -DANIME4KCPP_CORE_VERSION_PATCH=0 -DANIME4KCPP_CORE_VERSION_STATUS=\"dev\" -DENABLE_IMAGE_IO -DENABLE_OPENCL -DENABLE_PREVIEW_GUI -DENABLE_VIDEO -DUSE_BOOST_FILESYSTEM -DUSE_OPENMP -I/tmp/Anime4KCPP/CLI/include -I/tmp/Anime4KCPP/ThirdParty/include/cmdline -I/tmp/Anime4KCPP/ThirdParty/include/ini17 -I/tmp/Anime4KCPP/core/include -I/tmp/Anime4KCPP/build/core -isystem /usr/local/include/opencv4 -mavx -O3 -DNDEBUG -Ofast -pthread -fopenmp -std=c++1z -MD -MT CLI/CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o -MF CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o.d -o CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o -c /tmp/Anime4KCPP/CLI/src/main.cpp /tmp/Anime4KCPP/CLI/src/main.cpp: In function ‘int main(int, char**)’: /tmp/Anime4KCPP/CLI/src/main.cpp:408:45: error: no matching function for call to ‘boost::filesystem::path::path(std::basic_string_view<char>&)’ filesystem::path path(*pathCheck); ^ In file included from /usr/include/boost/filesystem.hpp:16:0, from /tmp/Anime4KCPP/CLI/src/main.cpp:5: /usr/include/boost/filesystem/path.hpp:172:5: note: candidate: template<class InputIterator> boost::filesystem::path::path(InputIterator, InputIterator, const codecvt_type&) path(InputIterator begin, InputIterator end, const codecvt_type& cvt) ^~~~ /usr/include/boost/filesystem/path.hpp:172:5: note: template argument deduction/substitution failed: /tmp/Anime4KCPP/CLI/src/main.cpp:408:45: note: candidate expects 3 arguments, 1 provided filesystem::path path(*pathCheck); ^ In file included from /usr/include/boost/filesystem.hpp:16:0, from /tmp/Anime4KCPP/CLI/src/main.cpp:5: /usr/include/boost/filesystem/path.hpp:161:5: note: candidate: template<class InputIterator> boost::filesystem::path::path(InputIterator, InputIterator) path(InputIterator begin, InputIterator end) ^~~~ /usr/include/boost/filesystem/path.hpp:161:5: note: template argument deduction/substitution failed: /tmp/Anime4KCPP/CLI/src/main.cpp:408:45: note: candidate expects 2 arguments, 1 provided filesystem::path path(*pathCheck); ^ In file included from /usr/include/boost/filesystem.hpp:16:0, from /tmp/Anime4KCPP/CLI/src/main.cpp:5: /usr/include/boost/filesystem/path.hpp:154:5: note: candidate: template<class Source> boost::filesystem::path::path(const Source&, const codecvt_type&) path(Source const& source, const codecvt_type& cvt) ^~~~ /usr/include/boost/filesystem/path.hpp:154:5: note: template argument deduction/substitution failed: /tmp/Anime4KCPP/CLI/src/main.cpp:408:45: note: candidate expects 2 arguments, 1 provided filesystem::path path(*pathCheck); ^ In file included from /usr/include/boost/filesystem.hpp:16:0, from /tmp/Anime4KCPP/CLI/src/main.cpp:5: /usr/include/boost/filesystem/path.hpp:151:5: note: candidate: boost::filesystem::path::path(const std::basic_string<char>&) path(const std::basic_string<value_type>& s) : m_pathname(s) {} ^~~~ /usr/include/boost/filesystem/path.hpp:151:5: note: no known conversion for argument 1 from ‘std::basic_string_view<char>’ to ‘const std::basic_string<char>&’ /usr/include/boost/filesystem/path.hpp:150:5: note: candidate: boost::filesystem::path::path(const value_type*) path(const value_type* s) : m_pathname(s) {} ^~~~ /usr/include/boost/filesystem/path.hpp:150:5: note: no known conversion for argument 1 from ‘std::basic_string_view<char>’ to ‘const value_type* {aka const char*}’ /usr/include/boost/filesystem/path.hpp:135:5: note: candidate: template<class Source> boost::filesystem::path::path(const Source&, typename boost::enable_if<boost::filesystem::path_traits::is_pathable<typename boost::decay<Source>::type> >::type*) path(Source const& source, ^~~~ /usr/include/boost/filesystem/path.hpp:135:5: note: template argument deduction/substitution failed: /usr/include/boost/filesystem/path.hpp: In substitution of ‘template<class Source> boost::filesystem::path::path(const Source&, typename boost::enable_if<boost::filesystem::path_traits::is_pathable<typename boost::decay<Source>::type> >::type*) [with Source = std::basic_string_view<char>]’: /tmp/Anime4KCPP/CLI/src/main.cpp:408:45: required from here /usr/include/boost/filesystem/path.hpp:135:5: error: no type named ‘type’ in ‘struct boost::enable_if<boost::filesystem::path_traits::is_pathable<std::basic_string_view<char> >, void>’ /usr/include/boost/filesystem/path.hpp:132:5: note: candidate: boost::filesystem::path::path(const boost::filesystem::path&) path(const path& p) : m_pathname(p.m_pathname) {} ^~~~ /usr/include/boost/filesystem/path.hpp:132:5: note: no known conversion for argument 1 from ‘std::basic_string_view<char>’ to ‘const boost::filesystem::path&’ /usr/include/boost/filesystem/path.hpp:130:5: note: candidate: boost::filesystem::path::path() path(){} ^~~~ /usr/include/boost/filesystem/path.hpp:130:5: note: candidate expects 0 arguments, 1 provided /tmp/Anime4KCPP/CLI/src/main.cpp:411:84: error: ‘class boost::filesystem::path’ has no member named ‘lexically_normal’ << (path.is_absolute() ? path : (filesystem::current_path() / path.lexically_normal())) ^~~~~~~~~~~~~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:691:35: error: ‘begin’ was not declared in this scope for (auto& file : currDir) ^~~~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:691:35: note: suggested alternative: In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:51:0, from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/locale_classes.h:40, from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:41, from /opt/rh/devtoolset-7/root/usr/include/c++/7/ios:42, from /opt/rh/devtoolset-7/root/usr/include/c++/7/ostream:38, from /opt/rh/devtoolset-7/root/usr/include/c++/7/iostream:39, from /tmp/Anime4KCPP/CLI/src/main.cpp:1: /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/range_access.h:105:37: note: ‘std::begin’ template<typename _Tp> const _Tp* begin(const valarray<_Tp>&); ^~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:691:35: error: ‘end’ was not declared in this scope for (auto& file : currDir) ^~~~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:691:35: note: suggested alternative: In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:51:0, from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/locale_classes.h:40, from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:41, from /opt/rh/devtoolset-7/root/usr/include/c++/7/ios:42, from /opt/rh/devtoolset-7/root/usr/include/c++/7/ostream:38, from /opt/rh/devtoolset-7/root/usr/include/c++/7/iostream:39, from /tmp/Anime4KCPP/CLI/src/main.cpp:1: /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/range_access.h:107:37: note: ‘std::end’ template<typename _Tp> const _Tp* end(const valarray<_Tp>&); ^~~ /tmp/Anime4KCPP/CLI/src/main.cpp:747:79: error: ‘class boost::filesystem::path’ has no member named ‘lexically_normal’ outputPath : (filesystem::current_path() / outputPath.lexically_normal())) ^~~~~~~~~~~~~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:792:83: error: ‘class boost::filesystem::path’ has no member named ‘lexically_normal’ outputPath : (filesystem::current_path() / outputPath.lexically_normal())) ^~~~~~~~~~~~~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:926:39: error: ‘begin’ was not declared in this scope for (auto& file : currDir) ^~~~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:926:39: note: suggested alternative: In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:51:0, from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/locale_classes.h:40, from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:41, from /opt/rh/devtoolset-7/root/usr/include/c++/7/ios:42, from /opt/rh/devtoolset-7/root/usr/include/c++/7/ostream:38, from /opt/rh/devtoolset-7/root/usr/include/c++/7/iostream:39, from /tmp/Anime4KCPP/CLI/src/main.cpp:1: /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/range_access.h:105:37: note: ‘std::begin’ template<typename _Tp> const _Tp* begin(const valarray<_Tp>&); ^~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:926:39: error: ‘end’ was not declared in this scope for (auto& file : currDir) ^~~~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:926:39: note: suggested alternative: In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:51:0, from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/locale_classes.h:40, from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:41, from /opt/rh/devtoolset-7/root/usr/include/c++/7/ios:42, from /opt/rh/devtoolset-7/root/usr/include/c++/7/ostream:38, from /opt/rh/devtoolset-7/root/usr/include/c++/7/iostream:39, from /tmp/Anime4KCPP/CLI/src/main.cpp:1: /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/range_access.h:107:37: note: ‘std::end’ template<typename _Tp> const _Tp* end(const valarray<_Tp>&); ^~~ /tmp/Anime4KCPP/CLI/src/main.cpp:1004:83: error: ‘class boost::filesystem::path’ has no member named ‘lexically_normal’ outputPath : (filesystem::current_path() / outputPath.lexically_normal())) ^~~~~~~~~~~~~~~~ /tmp/Anime4KCPP/CLI/src/main.cpp:1051:83: error: ‘class boost::filesystem::path’ has no member named ‘lexically_normal’ outputPath : (filesystem::current_path() / outputPath.lexically_normal())) ^~~~~~~~~~~~~~~~ make[2]: *** [CLI/CMakeFiles/Anime4KCPP_CLI.dir/src/main.cpp.o] Error 1 make[2]: Leaving directory /tmp/Anime4KCPP/build'
make[1]: *** [CLI/CMakeFiles/Anime4KCPP_CLI.dir/all] Error 2
make[1]: Leaving directory /tmp/Anime4KCPP/build' make: *** [all] Error 2 when make

@TianZerL
Copy link
Owner

TianZerL commented Aug 6, 2022

Use the newer version of boost::filesystem library, your current one should be earlier than 1.6.
Or upgrade your compiler to which has better c++17 support (gcc8 should be ok, gcc9 or newer is better). You are using gcc7 that does not support std::filesystem, so we need the alternative one from boost.

I have posted the necessary version of libraries and tools for building, you may check it on wiki

@GribanovIvan
Copy link
Author

yeah, boost-1.53.0-28.el7.src.rpm..
with gcc and other tools 11 version... [100%] Built target Anime4KCPP_CLI
but thats not all.
[root@vpsq3vzl build]# bin/Anime4KCPP_CLI -i /root/Downloads/Monster\ [DVDRip\ 720p]/[null]\ Monster\ -\ 25\ (R2J\ DVDrip\ 960x720\ x264\ AC3)v2.mkv -a -b -c 0.1 -v -z 1.5 -C avc1

Welcome to Anime4KCPP

Checking ffmpeg...
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
configuration: --arch=x86_64 --bindir=/usr/bin --datadir=/usr/share/ffmpeg --disable-debug --disable-static --disable-stripping --enable-avfilter --enable-avresample --enable-bzlib --enable-cuda --enable-cuvid --disable-libnpp --enable-doc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gpl --enable-iconv --enable-libass --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libebur128 --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libkvazaar --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxvid --enable-libzvbi --enable-lzma --enable-nonfree --enable-openal --enable-opencl --enable-nvenc --enable-opengl --enable-postproc --enable-pthreads --enable-sdl2 --enable-shared --enable-version3 --enable-x11grab --enable-xlib --enable-zlib --extra-cflags='-I/usr/include/nvenc -I/usr/include/cuda' --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --prefix=/usr --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100

An error occurred.

Error type: IO

Error message:
Failed to load file: file doesn't not exist or decoder isn't installed.

ffmpeg -i /root/Downloads/Monster\ \[DVDRip\ 720p\]/\[null\]\ Monster\ -\ 25\ \(R2J\ DVDrip\ 960x720\ x264\ AC3\)v2.mkv -c copy -c:v h264 /tmp/1.mkv decodes and encodes fine

@TianZerL
Copy link
Owner

TianZerL commented Aug 6, 2022

Try using quotes to surround path instead of lots of escaping. This should be a path analyzing issue of opencv.

@GribanovIvan
Copy link
Author

Same. Also tried symlink video to 1.mkv in build folder - same

@GribanovIvan
Copy link
Author

opencv-3.4.6-7.el8.src.rpm on CentOs8 also is too old. Target "Anime4KCPPCore" INTERFACE_INCLUDE_DIRECTORIES property contains gone when i compilled opencv 4.6.0. The other problem - cmake failed to find OpenCL - fixed with -DOpenCL_LIBRARY=/lib64/libOpenCL.so.1.0.0

but even on CentOs8 Failed to load file: file doesn't not exist or decoder isn't installed. still

@TianZerL
Copy link
Owner

TianZerL commented Aug 7, 2022

has your opencv built with ffmpeg module?

@GribanovIvan
Copy link
Author

yaeh, installing ffmpeg-devel before cmaking opencv fixed problem even without recompiling Anime4KCPP
please, make your project also check this

@Daijobou
Copy link

Daijobou commented Sep 1, 2022

With Ubuntu WSL (Windows 11) it is very easy to compile.
With AlmaLinux 8.6 WSL (Windows 11) I got many errors. Has anyone got it compiled with AlmaLinux (CentOS) and can share the steps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants