TelepathyIM / telepathy-morse

Telegram connection manager for the Telepathy framework
GNU General Public License v2.0
62 stars 10 forks source link

Error on build #50

Closed ItachiSan closed 7 years ago

ItachiSan commented 7 years ago

Good afternoon, I am the packager of the Archlinux Git version of telepathy-morse.

As written in the README, I am using the proper dependencies: telegram-qt-0.1.0-2 telepathy-qt-0.9.7-1

However, I am having issues during the build:

...
[ 10%] Built target telepathy-morse_autogen
Scanning dependencies of target telepathy-morse
[ 30%] Building CXX object CMakeFiles/telepathy-morse.dir/main.cpp.o
[ 30%] Building CXX object CMakeFiles/telepathy-morse.dir/connection.cpp.o
In file included from /build/telepathy-morse-git/src/telepathy-morse/connection.hpp:29:0,
                 from /build/telepathy-morse-git/src/telepathy-morse/connection.cpp:20:
/build/telepathy-morse-git/src/telepathy-morse/identifier.hpp:38:5: error: ‘Telegram’ does not name a type
     Telegram::Peer toPeer() const;
     ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/identifier.hpp:39:43: error: ‘Telegram’ does not name a type
     static MorseIdentifier fromPeer(const Telegram::Peer &peer);
                                           ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/identifier.hpp:39:58: error: expected unqualified-id before ‘&’ token
     static MorseIdentifier fromPeer(const Telegram::Peer &peer);
                                                          ^
/build/telepathy-morse-git/src/telepathy-morse/identifier.hpp:39:58: error: expected ‘)’ before ‘&’ token
/build/telepathy-morse-git/src/telepathy-morse/identifier.hpp:39:58: error: static member function ‘static MorseIdentifier MorseIdentifier::fromPeer(...)’ cannot have ref-qualifier
/build/telepathy-morse-git/src/telepathy-morse/identifier.hpp:39:58: error: expected ‘;’ at end of member declaration
/build/telepathy-morse-git/src/telepathy-morse/identifier.hpp:39:59: error: ‘peer’ does not name a type
     static MorseIdentifier fromPeer(const Telegram::Peer &peer);
                                                           ^~~~
In file included from /build/telepathy-morse-git/src/telepathy-morse/connection.cpp:20:0:
/build/telepathy-morse-git/src/telepathy-morse/connection.hpp:75:36: error: ‘Telegram’ does not name a type; did you mean ‘CTelegramCore’?
     void whenMessageReceived(const Telegram::Message &message);
                                    ^~~~~~~~
                                    CTelegramCore
/build/telepathy-morse-git/src/telepathy-morse/connection.hpp:75:54: error: expected unqualified-id before ‘&’ token
     void whenMessageReceived(const Telegram::Message &message);
                                                      ^
/build/telepathy-morse-git/src/telepathy-morse/connection.hpp:75:54: error: expected ‘)’ before ‘&’ token
/build/telepathy-morse-git/src/telepathy-morse/connection.hpp:75:54: error: expected ‘;’ at end of member declaration
/build/telepathy-morse-git/src/telepathy-morse/connection.hpp:75:55: error: ‘message’ does not name a type
     void whenMessageReceived(const Telegram::Message &message);
                                                       ^~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.hpp:153:5: error: ‘Telegram’ does not name a type; did you mean ‘CTelegramCore’?
     Telegram::PasswordInfo *m_passwordInfo;
     ^~~~~~~~
     CTelegramCore
In file included from /build/telepathy-morse-git/src/telepathy-morse/connection.cpp:22:0:
/build/telepathy-morse-git/src/telepathy-morse/textchannel.hpp:69:36: error: ‘Telegram’ does not name a type; did you mean ‘CTelegramCore’?
     void whenMessageReceived(const Telegram::Message &message, uint contactHandle);
                                    ^~~~~~~~
                                    CTelegramCore
/build/telepathy-morse-git/src/telepathy-morse/textchannel.hpp:69:54: error: expected unqualified-id before ‘&’ token
     void whenMessageReceived(const Telegram::Message &message, uint contactHandle);
                                                      ^
/build/telepathy-morse-git/src/telepathy-morse/textchannel.hpp:69:54: error: expected ‘)’ before ‘&’ token
/build/telepathy-morse-git/src/telepathy-morse/textchannel.hpp:69:54: error: expected ‘;’ at end of member declaration
/build/telepathy-morse-git/src/telepathy-morse/textchannel.hpp:69:55: error: ‘message’ does not name a type
     void whenMessageReceived(const Telegram::Message &message, uint contactHandle);
                                                       ^~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/textchannel.hpp:75:30: error: ‘Telegram’ has not been declared
     void setMessageInboxRead(Telegram::Peer peer, quint32 messageId);
                              ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/textchannel.hpp:75:45: error: expected ‘,’ or ‘...’ before ‘peer’
     void setMessageInboxRead(Telegram::Peer peer, quint32 messageId);
                                             ^~~~
/build/telepathy-morse-git/src/telepathy-morse/textchannel.hpp:76:31: error: ‘Telegram’ has not been declared
     void setMessageOutboxRead(Telegram::Peer peer, quint32 messageId);
                               ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/textchannel.hpp:76:46: error: expected ‘,’ or ‘...’ before ‘peer’
     void setMessageOutboxRead(Telegram::Peer peer, quint32 messageId);
                                              ^~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: In constructor ‘MorseConnection::MorseConnection(const QDBusConnection&, const QString&, const QString&, const QVariantMap&)’:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:117:5: error: class ‘MorseConnection’ does not have any field named ‘m_passwordInfo’
     m_passwordInfo(0),
     ^~~~~~~~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: In member function ‘void MorseConnection::doConnect(Tp::DBusError*)’:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:224:58: error: no matching function for call to ‘CAppInformation::CAppInformation(CTelegramCore*&)’
     CAppInformation *appInfo = new CAppInformation(m_core);
                                                          ^
In file included from /usr/include/telegram-qt5/TelegramQt/CAppInformation:1:0,
                 from /build/telepathy-morse-git/src/telepathy-morse/connection.cpp:28:
/usr/include/telegram-qt5/TelegramQt/CAppInformation.hpp:28:5: note: candidate: CAppInformation::CAppInformation(const CAppInformation*)
     CAppInformation(const CAppInformation *anotherInfo = 0);
     ^~~~~~~~~~~~~~~
/usr/include/telegram-qt5/TelegramQt/CAppInformation.hpp:28:5: note:   no known conversion for argument 1 from ‘CTelegramCore*’ to ‘const CAppInformation*’
/usr/include/telegram-qt5/TelegramQt/CAppInformation.hpp:25:25: note: candidate: CAppInformation::CAppInformation(const CAppInformation&)
 class TELEGRAMQT_EXPORT CAppInformation
                         ^~~~~~~~~~~~~~~
/usr/include/telegram-qt5/TelegramQt/CAppInformation.hpp:25:25: note:   no known conversion for argument 1 from ‘CTelegramCore*’ to ‘const CAppInformation&’
/usr/include/telegram-qt5/TelegramQt/CAppInformation.hpp:25:25: note: candidate: CAppInformation::CAppInformation(CAppInformation&&)
/usr/include/telegram-qt5/TelegramQt/CAppInformation.hpp:25:25: note:   no known conversion for argument 1 from ‘CTelegramCore*’ to ‘CAppInformation&&’
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: In member function ‘void MorseConnection::whenAuthenticated()’:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:323:9: error: ‘m_passwordInfo’ was not declared in this scope
     if (m_passwordInfo) {
         ^~~~~~~~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:324:16: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
         delete m_passwordInfo;
                ^~~~~~~~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: In member function ‘void MorseConnection::onPasswordInfoReceived(quint64)’:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:427:5: error: ‘m_passwordInfo’ was not declared in this scope
     m_passwordInfo = new Telegram::PasswordInfo();
     ^~~~~~~~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:427:26: error: ‘Telegram’ does not name a type; did you mean ‘CTelegramCore’?
     m_passwordInfo = new Telegram::PasswordInfo();
                          ^~~~~~~~
                          CTelegramCore
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: In member function ‘void MorseConnection::startMechanismWithData_password(const QString&, const QByteArray&, Tp::DBusError*)’:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:510:25: error: ‘m_passwordInfo’ was not declared in this scope
     m_core->tryPassword(m_passwordInfo->currentSalt(), data);
                         ^~~~~~~~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: In member function ‘Tp::ContactInfoFieldList MorseConnection::getUserInfo(quint32) const’:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:790:5: error: ‘Telegram’ has not been declared
     Telegram::UserInfo userInfo;
     ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:791:31: error: ‘userInfo’ was not declared in this scope
     if (!m_core->getUserInfo(&userInfo, userId)) {
                               ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:791:31: note: suggested alternative: ‘userId’
     if (!m_core->getUserInfo(&userInfo, userId)) {
                               ^~~~~~~~
                               userId
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:796:10: error: ‘userInfo’ was not declared in this scope
     if (!userInfo.userName().isEmpty()) {
          ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:796:10: note: suggested alternative: ‘userId’
     if (!userInfo.userName().isEmpty()) {
          ^~~~~~~~
          userId
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:802:10: error: ‘userInfo’ was not declared in this scope
     if (!userInfo.phone().isEmpty()) {
          ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:802:10: note: suggested alternative: ‘userId’
     if (!userInfo.phone().isEmpty()) {
          ^~~~~~~~
          userId
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:815:20: error: ‘userInfo’ was not declared in this scope
     QString name = userInfo.firstName() + QLatin1Char(' ') + userInfo.lastName();
                    ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:815:20: note: suggested alternative: ‘userId’
     QString name = userInfo.firstName() + QLatin1Char(' ') + userInfo.lastName();
                    ^~~~~~~~
                    userId
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: In member function ‘QString MorseConnection::getAlias(uint)’:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:884:5: error: ‘Telegram’ has not been declared
     Telegram::UserInfo info;
     ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:885:26: error: ‘info’ was not declared in this scope
     m_core->getUserInfo(&info, identifier.userId());
                          ^~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:885:26: note: suggested alternative: ‘ynf’
     m_core->getUserInfo(&info, identifier.userId());
                          ^~~~
                          ynf
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: In member function ‘void MorseConnection::updateContactsStatus(const QVector<MorseIdentifier>&)’:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1011:13: error: ‘Telegram’ has not been declared
             Telegram::UserInfo info;
             ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1012:34: error: ‘info’ was not declared in this scope
             m_core->getUserInfo(&info, identifier.userId());
                                  ^~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1012:34: note: suggested alternative: ‘ynf’
             m_core->getUserInfo(&info, identifier.userId());
                                  ^~~~
                                  ynf
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: At global scope:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1076:49: error: ‘Telegram’ does not name a type; did you mean ‘CTelegramCore’?
 void MorseConnection::whenMessageReceived(const Telegram::Message &message)
                                                 ^~~~~~~~
                                                 CTelegramCore
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1076:67: error: expected unqualified-id before ‘&’ token
 void MorseConnection::whenMessageReceived(const Telegram::Message &message)
                                                                   ^
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1076:67: error: expected ‘)’ before ‘&’ token
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1076:68: error: expected initializer before ‘message’
 void MorseConnection::whenMessageReceived(const Telegram::Message &message)
                                                                    ^~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp: In member function ‘void MorseConnection::whenGotRooms()’:
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1216:9: error: ‘Telegram’ has not been declared
         Telegram::GroupChat chatInfo;
         ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1226:34: error: ‘chatInfo’ was not declared in this scope
         if (m_core->getChatInfo(&chatInfo, chatId)) {
                                  ^~~~~~~~
/build/telepathy-morse-git/src/telepathy-morse/connection.cpp:1226:34: note: suggested alternative: ‘chatID’
         if (m_core->getChatInfo(&chatInfo, chatId)) {
                                  ^~~~~~~~
                                  chatID
make[2]: *** [CMakeFiles/telepathy-morse.dir/build.make:87: CMakeFiles/telepathy-morse.dir/connection.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/telepathy-morse.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
...

It seems that the namespace is not defined properly.

Kaffeine commented 7 years ago

I am using the proper dependencies:

The dependencies are proper for the 0.1.0 release. To build the Telepathy-Morse from the master branch (which is a WIP of 0.2.0), you need to use TelegramQt from the master branch (a similar WIP of 0.2.0).

The project builds fine for Sailfish OS: https://build.merproject.org/project/monitor/home:Kaffeine:morse

Kaffeine commented 7 years ago

The issue is not valid, though I'll update README sometime soon.

ItachiSan commented 7 years ago

Perfect, thank you :)