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

Compiling error #15

Open
aitherios opened this issue Aug 13, 2014 · 9 comments
Open

Compiling error #15

aitherios opened this issue Aug 13, 2014 · 9 comments

Comments

@aitherios
Copy link

When compiling I got:

make steam
[ 10%] Building CXX object CMakeFiles/steam++.dir/handlers.cpp.o
/home/aitherios/Sources/SteamPP/handlers.cpp: In member function ‘void Steam::SteamClient::HandleMessage(Steam::EMsg, const unsigned char*, std::size_t, uint64_t)’:
/home/aitherios/Sources/SteamPP/handlers.cpp:159:4: error: ‘CMsgClientUpdateMachineAuth’ was not declared in this scope
    CMsgClientUpdateMachineAuth machine_auth;
    ^
/home/aitherios/Sources/SteamPP/handlers.cpp:159:32: error: expected ‘;’ before ‘machine_auth’
    CMsgClientUpdateMachineAuth machine_auth;
                                ^
/home/aitherios/Sources/SteamPP/handlers.cpp:160:4: error: ‘machine_auth’ was not declared in this scope
    machine_auth.ParseFromArray(data, length);
    ^
/home/aitherios/Sources/SteamPP/handlers.cpp:166:4: error: ‘CMsgClientUpdateMachineAuthResponse’ was not declared in this scope
    CMsgClientUpdateMachineAuthResponse response;
    ^
/home/aitherios/Sources/SteamPP/handlers.cpp:166:40: error: expected ‘;’ before ‘response’
    CMsgClientUpdateMachineAuthResponse response;
                                        ^
/home/aitherios/Sources/SteamPP/handlers.cpp:167:4: error: ‘response’ was not declared in this scope
    response.set_sha_file(sha, 20);
    ^
make[3]: *** [CMakeFiles/steam++.dir/handlers.cpp.o] Error 1
make[2]: *** [CMakeFiles/steam++.dir/all] Error 2
make[1]: *** [CMakeFiles/steam.dir/rule] Error 2
make: *** [steam] Error 2

I did compile this project before but I just updated SteamKit. Could you shed some light? I can spend some time trying to fix it (and pull requesting), I just wanted to understand if I'm doing something stupid (probably)

@seishun
Copy link
Owner

seishun commented Aug 13, 2014

Yeah some protobufs got moved around. It should be a trivial fix.

@aitherios
Copy link
Author

Yes, I compiled without a problem =D. This would be a nice pull request Python1320.

@Alessandro-Barbieri
Copy link

I got the same error of aitherios.

@Xylemon
Copy link

Xylemon commented Jun 13, 2015

Will this ever be worked on again? A Pidgin plugin that doesn't use the mobile protocol for Steam sounds nicer than the other abandoned plugin.

@SeriousMatters
Copy link

Tried to compile https://github.com/Python1320/SteamPP and got the following error.
Roll back 1 commit (Python1320@3393b89) then it compiles fine. No noticeable problem using it either.

$ make steam
[  8%] Running C++ protocol buffer compiler on /home/my-user-id/SteamKit/Resources/Protobufs/steamclient/encrypted_app_ticket.proto
[ 16%] Running C++ protocol buffer compiler on /home/my-user-id/SteamKit/Resources/Protobufs/steamclient/steammessages_clientserver_2.proto
[libprotobuf WARNING google/protobuf/descriptor.cc:5411] Warning: Unused import: "steammessages_clientserver_2.proto" imports "encrypted_app_ticket.proto" which is not used.
[ 25%] Running C++ protocol buffer compiler on /home/my-user-id/SteamKit/Resources/Protobufs/steamclient/steammessages_clientserver.proto
[ 33%] Running C++ protocol buffer compiler on /home/my-user-id/SteamKit/Resources/Protobufs/steamclient/steammessages_base.proto
Scanning dependencies of target steam++
[ 41%] Building CXX object CMakeFiles/steam++.dir/steam++.cpp.o
[ 50%] Building CXX object CMakeFiles/steam++.dir/cmclient.cpp.o
[ 58%] Building CXX object CMakeFiles/steam++.dir/handlers.cpp.o
[ 66%] Building CXX object CMakeFiles/steam++.dir/steammessages_clientserver_2.pb.cc.o
[ 75%] Building CXX object CMakeFiles/steam++.dir/steammessages_clientserver.pb.cc.o
[ 83%] Building CXX object CMakeFiles/steam++.dir/steammessages_base.pb.cc.o
[ 91%] Building CXX object CMakeFiles/steam++.dir/encrypted_app_ticket.pb.cc.o
Linking CXX static library libsteam++.a
[ 91%] Built target steam++
Scanning dependencies of target steam
[100%] Building CXX object CMakeFiles/steam.dir/steampurple.cpp.o
/home/my-user-id/SteamPP/steampurple.cpp: In lambda function:
/home/my-user-id/SteamPP/steampurple.cpp:56:48: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
    purple_debug_info("steam", "read: %i\n", len);
                                                ^
/home/my-user-id/SteamPP/steampurple.cpp: In lambda function:
/home/my-user-id/SteamPP/steampurple.cpp:249:5: warning: deprecated conversion from string constant to ‘gchar* {aka char*}’ [-Wwrite-strings]
     );
     ^
/home/my-user-id/SteamPP/steampurple.cpp: In lambda function:
/home/my-user-id/SteamPP/steampurple.cpp:478:30: error: no match foroperator=’ (operand types are ‘std::function<void(Steam::SteamID, const char*, bool)>’ and ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID, const char*)>’)
   steam->client.onPrivateMsg = [pc](SteamID user, const char* message) {
                              ^
/home/my-user-id/SteamPP/steampurple.cpp:478:30: note: candidates are:
In file included from /home/my-user-id/SteamPP/steam++.h:1:0,
                 from /home/my-user-id/SteamPP/steampurple.cpp:8:
/usr/include/c++/4.9/functional:2241:7: note: std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(const std::function<_Res(_ArgTypes ...)>&) [with _Res = void; _ArgTypes = {Steam::SteamID, const char*, bool}]
       operator=(const function& __x)
       ^
/usr/include/c++/4.9/functional:2241:7: note:   no known conversion for argument 1 from ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID, const char*)>’ to ‘const std::function<void(Steam::SteamID, const char*, bool)>&’
/usr/include/c++/4.9/functional:2259:7: note: std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(std::function<_Res(_ArgTypes ...)>&&) [with _Res = void; _ArgTypes = {Steam::SteamID, const char*, bool}]
       operator=(function&& __x)
       ^
/usr/include/c++/4.9/functional:2259:7: note:   no known conversion for argument 1 from ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID, const char*)>’ to ‘std::function<void(Steam::SteamID, const char*, bool)>&&’
/usr/include/c++/4.9/functional:2273:7: note: std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(std::nullptr_t) [with _Res = void; _ArgTypes = {Steam::SteamID, const char*, bool}; std::nullptr_t = std::nullptr_t]
       operator=(nullptr_t)
       ^
/usr/include/c++/4.9/functional:2273:7: note:   no known conversion for argument 1 from ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID, const char*)>’ to ‘std::nullptr_t’
/usr/include/c++/4.9/functional:2302:2: note: template<class _Functor> std::function<_Res(_ArgTypes ...)>::_Requires<std::__and_<std::__not_<std::is_same<typename std::decay<_Tp>::type, std::function<_Res(_ArgTypes ...)> > >, std::__or_<std::is_void<_Tp>, std::is_convertible<std::function<_Res(_ArgTypes ...)>::_Invoke<typename std::decay<_Tp>::type>, _Res> > >, std::function<_Res(_ArgTypes ...)>&> std::function<_Res(_ArgTypes ...)>::operator=(_Functor&&) [with _Functor = _Functor; _Res = void; _ArgTypes = {Steam::SteamID, const char*, bool}]
  operator=(_Functor&& __f)
  ^
/usr/include/c++/4.9/functional:2302:2: note:   template argument deduction/substitution failed:
/usr/include/c++/4.9/functional:2311:2: note: template<class _Functor> std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(std::reference_wrapper<_Tp>) [with _Functor = _Functor; _Res = void; _ArgTypes = {Steam::SteamID, const char*, bool}]
  operator=(reference_wrapper<_Functor> __f) noexcept
  ^
/usr/include/c++/4.9/functional:2311:2: note:   template argument deduction/substitution failed:
/home/my-user-id/SteamPP/steampurple.cpp:478:30: note:   ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID, const char*)>’ is not derived from ‘std::reference_wrapper<_Tp>’
   steam->client.onPrivateMsg = [pc](SteamID user, const char* message) {
                              ^
/home/my-user-id/SteamPP/steampurple.cpp:484:26: error: no match foroperator=’ (operand types are ‘std::function<void(Steam::SteamID, bool)>’ and ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID)>’)
   steam->client.onTyping = [pc](SteamID user) {
                          ^
/home/my-user-id/SteamPP/steampurple.cpp:484:26: note: candidates are:
In file included from /home/my-user-id/SteamPP/steam++.h:1:0,
                 from /home/my-user-id/SteamPP/steampurple.cpp:8:
/usr/include/c++/4.9/functional:2241:7: note: std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(const std::function<_Res(_ArgTypes ...)>&) [with _Res = void; _ArgTypes = {Steam::SteamID, bool}]
       operator=(const function& __x)
       ^
/usr/include/c++/4.9/functional:2241:7: note:   no known conversion for argument 1 from ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID)>’ to ‘const std::function<void(Steam::SteamID, bool)>&’
/usr/include/c++/4.9/functional:2259:7: note: std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(std::function<_Res(_ArgTypes ...)>&&) [with _Res = void; _ArgTypes = {Steam::SteamID, bool}]
       operator=(function&& __x)
       ^
/usr/include/c++/4.9/functional:2259:7: note:   no known conversion for argument 1 from ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID)>’ to ‘std::function<void(Steam::SteamID, bool)>&&’
/usr/include/c++/4.9/functional:2273:7: note: std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(std::nullptr_t) [with _Res = void; _ArgTypes = {Steam::SteamID, bool}; std::nullptr_t = std::nullptr_t]
       operator=(nullptr_t)
       ^
/usr/include/c++/4.9/functional:2273:7: note:   no known conversion for argument 1 from ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID)>’ to ‘std::nullptr_t’
/usr/include/c++/4.9/functional:2302:2: note: template<class _Functor> std::function<_Res(_ArgTypes ...)>::_Requires<std::__and_<std::__not_<std::is_same<typename std::decay<_Tp>::type, std::function<_Res(_ArgTypes ...)> > >, std::__or_<std::is_void<_Tp>, std::is_convertible<std::function<_Res(_ArgTypes ...)>::_Invoke<typename std::decay<_Tp>::type>, _Res> > >, std::function<_Res(_ArgTypes ...)>&> std::function<_Res(_ArgTypes ...)>::operator=(_Functor&&) [with _Functor = _Functor; _Res = void; _ArgTypes = {Steam::SteamID, bool}]
  operator=(_Functor&& __f)
  ^
/usr/include/c++/4.9/functional:2302:2: note:   template argument deduction/substitution failed:
/usr/include/c++/4.9/functional:2311:2: note: template<class _Functor> std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(std::reference_wrapper<_Tp>) [with _Functor = _Functor; _Res = void; _ArgTypes = {Steam::SteamID, bool}]
  operator=(reference_wrapper<_Functor> __f) noexcept
  ^
/usr/include/c++/4.9/functional:2311:2: note:   template argument deduction/substitution failed:
/home/my-user-id/SteamPP/steampurple.cpp:484:26: note:   ‘<lambda(PurpleAccount*)>::<lambda(Steam::SteamID)>’ is not derived from ‘std::reference_wrapper<_Tp>’
   steam->client.onTyping = [pc](SteamID user) {
                          ^
CMakeFiles/steam.dir/build.make:54: recipe for target 'CMakeFiles/steam.dir/steampurple.cpp.o' failed
make[3]: *** [CMakeFiles/steam.dir/steampurple.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/steam.dir/all' failed
make[2]: *** [CMakeFiles/steam.dir/all] Error 2
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/steam.dir/rule' failed
make[1]: *** [CMakeFiles/steam.dir/rule] Error 2
Makefile:110: recipe for target 'steam' failed
make: *** [steam] Error 2

@Xylemon
Copy link

Xylemon commented Jun 24, 2015

I can't get it to compile at all, just keeps telling me:

make[3]: *** No rule to make target /Resources/Protobufs/steamclient/encrypted_app_ticket.proto', needed byencrypted_app_ticket.pb.cc'. Stop.
make[2]: *** [CMakeFiles/steam++.dir/all] Error 2
make[1]: *** [CMakeFiles/steam.dir/rule] Error 2
make: *** [steam] Error 2

@AshleighAdams
Copy link

@Xylemon, You need to clone SteamKit, set the STEAMKIT variable to where you cloned it in cmake-gui, click "Configure", then click "Generate"; make should now compile it:

screenshot from 2015-06-24 16-03-03

@SeriousMatters, I get same my end too..

@VictorGladys
Copy link

This problem may be playing again, SteamKit moved some protofiles around again.

It was fixed for me by adding
#include "steammessages_clientserver_2.pb.h"
#include "steammessages_clientserver_friends.pb.h"
#include "steammessages_clientserver_login.pb.h"
to the includes in cmclient.h

and editing CMakeLists.txt to also include the corresponding libraries when compiling

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

8 participants