Infactum / tg2sip

Telegram <-> SIP voice gateway
GNU General Public License v2.0
281 stars 104 forks source link

Debian build #9

Closed SimonTheCat closed 5 years ago

SimonTheCat commented 5 years ago

Please add build for debian os

Infactum commented 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.

SimonTheCat commented 5 years ago

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
Infactum commented 5 years ago

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

SimonTheCat commented 5 years ago

not only std::clamp . variant optional and others

Infactum commented 5 years ago

Resolved by adding AppImage builds.