danog / php-libtgvoip

PHP extension that wraps the telegram VoIP library.
https://voip.madelineproto.xyz
GNU Affero General Public License v3.0
24 stars 5 forks source link

Error with make #8

Closed buzz3rs closed 4 years ago

buzz3rs commented 4 years ago

I've seen a closed issue similar to this but it did not help.. when i try the one line command line to install the lib i get this error :


make[1]: Entering directory '/root/TGradio/radio/src/php-libtgvoip/libtgvoip/build'
make  all-am
make[2]: Entering directory '/root/TGradio/radio/src/php-libtgvoip/libtgvoip/build'
  CXX      TgVoip.lo
  CXX      VoIPController.lo
  CXX      controller/net/JitterBuffer.lo
  CXX      tools/logging.lo
In file included from ../VoIPController.h:35:0,
                 from ../TgVoip.cpp:3:
../controller/net/JitterBuffer.h:75:56: error: array must be initialized with a brace-enclosed initializer
  std::array<jitter_packet_t, JITTER_SLOT_COUNT> slots{0};
                                                        ^
Makefile:3852: recipe for target 'TgVoip.lo' failed
make[2]: *** [TgVoip.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../controller/controller/../../VoIPController.h:35:0,
                 from ../controller/controller/../PrivateDefines.cpp:10,
                 from ../controller/controller/PublicAPI.cpp:1,
                 from ../VoIPController.cpp:7:
../controller/controller/../../controller/net/JitterBuffer.h:75:56: error: array must be initialized with a brace-enclosed initializer
  std::array<jitter_packet_t, JITTER_SLOT_COUNT> slots{0};
                                                        ^
In file included from ../VoIPController.h:35:0,
                 from ../tools/logging.cpp:11:
../controller/net/JitterBuffer.h:75:56: error: array must be initialized with a brace-enclosed initializer
  std::array<jitter_packet_t, JITTER_SLOT_COUNT> slots{0};
                                                        ^
In file included from ../VoIPController.h:35:0,
                 from ../controller/net/JitterBuffer.cpp:7:
../controller/net/JitterBuffer.h:75:56: error: array must be initialized with a brace-enclosed initializer
  std::array<jitter_packet_t, JITTER_SLOT_COUNT> slots{0};
                                                        ^
../controller/net/JitterBuffer.cpp: In member function ‘size_t tgvoip::JitterBuffer::HandleOutput(unsigned char*, size_t, int, bool, int&, bool&)’:
../controller/net/JitterBuffer.cpp:240:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (; delay > GetMinPacketCount(); --delay)
                 ^
../controller/net/JitterBuffer.cpp: In member function ‘void tgvoip::JitterBuffer::Tick()’:
../controller/net/JitterBuffer.cpp:418:25: error: ‘clamp’ is not a member of ‘std’
  uint32_t stddevDelay = std::clamp((uint32_t)ceil(stddev * 2 * 1000 / step), minMinDelay, maxMinDelay);
                         ^
../controller/net/JitterBuffer.cpp:422:18: error: ‘clamp’ is not a member of ‘std’
   int32_t diff = std::clamp((int32_t)(stddevDelay - minDelay), -1, 1);
                  ^
In file included from ../VoIPController.cpp:18:0:
../controller/protocol/Protocol.cpp: In member function ‘virtual void tgvoip::VoIPController::ProcessExtraData(tgvoip::Buffer&)’:
../controller/protocol/Protocol.cpp:880:59: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     uint64_t hash = *reinterpret_cast<uint64_t *>(fullHash);
                                                           ^
Makefile:3852: recipe for target 'tools/logging.lo' failed
make[2]: *** [tools/logging.lo] Error 1
Makefile:3852: recipe for target 'controller/net/JitterBuffer.lo' failed
make[2]: *** [controller/net/JitterBuffer.lo] Error 1
Makefile:3852: recipe for target 'VoIPController.lo' failed
make[2]: *** [VoIPController.lo] Error 1
make[2]: Leaving directory '/root/TGradio/radio/src/php-libtgvoip/libtgvoip/build'
Makefile:2108: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/root/TGradio/radio/src/php-libtgvoip/libtgvoip/build'
Makefile:131: recipe for target 'libtgvoip/build/libtgvoip.la' failed
make: *** [libtgvoip/build/libtgvoip.la] Error 2```

my php -v is :
PHP 7.4.5 (cli) (built: Apr 19 2020 07:36:13) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies

my distro info is :
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

Thank you for your time
buzz3rs commented 4 years ago

any help maybe ? @danog