PaulCombal / SamRewritten

Steam Achievement Manager For Linux. Rewritten in C++.
GNU General Public License v3.0
341 stars 32 forks source link

Cannot compile on arch #8

Closed xnuken closed 5 years ago

xnuken commented 5 years ago

I have installed yajl but it still will not compile

[mint@core:SamRewritten|master]$ ./make.sh 
SAM.Picker/SteamAppDAO.cpp: In static member function ‘static void SteamAppDAO::parse_app_names_v2()’:
SAM.Picker/SteamAppDAO.cpp:93:5: error: ‘yajl_val’ was not declared in this scope
   93 |     yajl_val node;
      |     ^~~~~~~~
SAM.Picker/SteamAppDAO.cpp:115:5: error: ‘node’ was not declared in this scope
  115 |     node = yajl_tree_parse((const char *) fileData, errbuf, sizeof(errbuf));
      |     ^~~~
SAM.Picker/SteamAppDAO.cpp:115:12: error: ‘yajl_tree_parse’ was not declared in this scope
  115 |     node = yajl_tree_parse((const char *) fileData, errbuf, sizeof(errbuf));
      |            ^~~~~~~~~~~~~~~
SAM.Picker/SteamAppDAO.cpp:130:13: error: expected ‘;’ before ‘v’
  130 |     yajl_val v = yajl_tree_get(node, path, yajl_t_array);
      |             ^~
      |             ;
SAM.Picker/SteamAppDAO.cpp:131:9: error: ‘v’ was not declared in this scope
  131 |     if (v == NULL) {
      |         ^
SAM.Picker/SteamAppDAO.cpp:136:29: error: ‘v’ was not declared in this scope
  136 |     unsigned array_length = v->u.array.len;
      |                             ^
SAM.Picker/SteamAppDAO.cpp:140:17: error: expected ‘;’ before ‘obj’
  140 |         yajl_val obj = v->u.array.values[i];
      |                 ^~~~
      |                 ;
SAM.Picker/SteamAppDAO.cpp:142:21: error: ‘obj’ was not declared in this scope
  142 |         tmp_appid = obj->u.object.values[0]->u.number.i;
      |                     ^~~
SAM.Picker/SteamAppDAO.cpp:147:5: error: ‘yajl_tree_free’ was not declared in this scope
  147 |     yajl_tree_free(node);
      |     ^~~~~~~~~~~~~~
SAM.Picker/SteamAppDAO.cpp:129:18: warning: unused variable ‘path’ [-Wunused-variable]
  129 |     const char * path[] = { "applist", "apps", (const char*)0 };
      |                  ^~~~
common/Downloader.cpp: In member function ‘void Downloader::download_file_async(const string&, const string&, const long unsigned int&)’:
common/Downloader.cpp:50:103: warning: ignoring return value of ‘std::future<typename std::__invoke_result<typename std::decay<_Tp>::type, typename std::decay<_Args>::type ...>::type> std::async(_Fn&&, _Args&& ...) [with _Fn = Downloader::download_file_async(const string&, const string&, const long unsigned int&)::<lambda()>; _Args = {}; typename std::__invoke_result<typename std::decay<_Tp>::type, typename std::decay<_Args>::type ...>::type = void]’, declared with attribute nodiscard [-Wunused-result]
   50 |     std::async([this, file_url, local_path, dl_id]{this->download_file(file_url, local_path, dl_id);});
      |                                                                                                       ^
In file included from common/Downloader.h:6,
                 from common/Downloader.cpp:1:
/usr/include/c++/9.1.0/future:1740:5: note: declared here
 1740 |     async(_Fn&& __fn, _Args&&... __args)
      |     ^~~~~
If there wasn't any compilation error, you can launch the manager with ./bin/launch.sh
PaulCombal commented 5 years ago

Can you give me your g++ version? $ g++ --version

I just tried on Manjaro, and it works well.. that's weird

xnuken commented 5 years ago

g++ (GCC) 9.1.0

PaulCombal commented 5 years ago

Can you tell me what OS you are using and its version, as well as the yajl package name and version you have installed so that I can try to reproduce this in a virtual machine?

xnuken commented 5 years ago

I am running arch and i am using the latest yajl from arch

PaulCombal commented 5 years ago

That's weird, I just installed an Arch VM with Gnome and yajl, and there were no error finding yajl. If you have any idea what could have went wrong, tell me so that I can try to investigate, but at this point I believe there is something wrongly configured on your machine.

wgpierce commented 5 years ago

Works fine for me on Arch. Closing this issue, let us know if you encounter any other problems.