Closed SimonTheCat closed 5 years ago
C++17 supported compiler is required to build TG2SIP. AFAIK stable debian buils doesn't include GCC 7 support, thats why there is no sopprt for this distro now. Maybe LLVM-6 package from Debian 9 backports would be enough to build, but I'm not totally sure.
i am very sad. Only unstable repo gcc 7 or build from source compiler. LLVM-6 not work
Scanning dependencies of target gen_db
[ 0%] Building CXX object CMakeFiles/gen_db.dir/tg2sip/gen_db.cpp.o
[ 0%] Building CXX object CMakeFiles/gen_db.dir/tg2sip/settings.cpp.o
/root/src/tg2sip/settings.cpp:30:31: error: no member named 'clamp' in namespace 'std'
console_min_level_ = std::clamp(static_cast<int>(reader.GetInteger("logging", "console_min_level", 0)), 0, 6);
~~~~~^
/root/src/tg2sip/settings.cpp:31:28: error: no member named 'clamp' in namespace 'std'
file_min_level_ = std::clamp(static_cast<int>(reader.GetInteger("logging", "file_min_level", 0)), 0, 6);
~~~~~^
/root/src/tg2sip/settings.cpp:32:23: error: no member named 'clamp' in namespace 'std'
log_level_ = std::clamp(static_cast<int>(reader.GetInteger("logging", "core", 2)), 0, 6);
~~~~~^
/root/src/tg2sip/settings.cpp:33:29: error: no member named 'clamp' in namespace 'std'
tdlib_log_level_ = std::clamp(static_cast<int>(reader.GetInteger("logging", "tdlib", 3)), 0, 6);
~~~~~^
/root/src/tg2sip/settings.cpp:34:30: error: no member named 'clamp' in namespace 'std'
tgvoip_log_level_ = std::clamp(static_cast<int>(reader.GetInteger("logging", "tgvoip", 5)), 0, 6);
~~~~~^
/root/src/tg2sip/settings.cpp:35:29: error: no member named 'clamp' in namespace 'std'
pjsip_log_level_ = std::clamp(static_cast<int>(reader.GetInteger("logging", "pjsip", 2)), 0, 6);
~~~~~^
6 errors generated.
CMakeFiles/gen_db.dir/build.make:86: recipe for target 'CMakeFiles/gen_db.dir/tg2sip/settings.cpp.o' failed
make[2]: *** [CMakeFiles/gen_db.dir/tg2sip/settings.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/gen_db.dir/all' failed
make[1]: *** [CMakeFiles/gen_db.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
If missing std::clamp
is the only problem, than you could make a shim for it.
Examples can be found here: https://en.cppreference.com/w/cpp/algorithm/clamp
not only std::clamp . variant optional and others
Please add build for debian os