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

Cannot compile on Ubunutu 20.04 #12

Open
ghost opened this issue Jul 4, 2022 · 1 comment
Open

Cannot compile on Ubunutu 20.04 #12

ghost opened this issue Jul 4, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 4, 2022

I followed the instructions as per https://github.com/ivanenko/cloud_storage#installation i.e.

sudo apt-get install g++ libssl-dev
git clone https://github.com/ivanenko/cloud_storage.git
cd cloud_storage
mkdir cmake-build-release
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release . -Bcmake-build-release
cmake --build cmake-build-release --target cloud_storage -- -j 2

I get the following returned and the compiling fails

Consolidate compiler generated dependencies of target cloud_storage
[ 10%] Building CXX object CMakeFiles/cloud_storage.dir/library.cpp.o
[ 20%] Building CXX object CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o
In file included from /home/xxx/Installs/cloud_storage/plugin_utils.h:25,
                 from /home/xxx/Installs/cloud_storage/plugin_utils.cpp:32:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: At global scope:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type; did you mean ‘to_string’?
   68 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
      |                   to_string
/home/xxx/Installs/cloud_storage/plugin_utils.cpp: In function ‘nlohmann::json& get_connection_config(nlohmann::json&, std::string&)’:
/home/xxx/Installs/cloud_storage/plugin_utils.cpp:141:12: warning: reference to local variable ‘j_null’ returned [-Wreturn-local-addr]
  141 |     return j_null;
      |            ^~~~~~
/home/xxx/Installs/cloud_storage/plugin_utils.cpp:140:20: note: declared here
  140 |     nlohmann::json j_null(nlohmann::json::value_t::null);
      |                    ^~~~~~
In file included from /home/xxx/Installs/cloud_storage/plugin_utils.h:25,
                 from /home/xxx/Installs/cloud_storage/library.cpp:30:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/xxx/Installs/cloConsolidate compiler generated dependencies of target cloud_storage
[ 10%] Building CXX object CMakeFiles/cloud_storage.dir/library.cpp.o
[ 20%] Building CXX object CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o
In file included from /home/xxx/Installs/cloud_storage/plugin_utils.h:25,
                 from /home/xxx/Installs/cloud_storage/plugin_utils.cpp:32:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: At global scope:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type; did you mean ‘to_string’?
   68 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
      |                   to_string
/home/xxx/Installs/cloud_storage/plugin_utils.cpp: In function ‘nlohmann::json& get_connection_config(nlohmann::json&, std::string&)’:
/home/xxx/Installs/cloud_storage/plugin_utils.cpp:141:12: warning: reference to local variable ‘j_null’ returned [-Wreturn-local-addr]
  141 |     return j_null;
      |            ^~~~~~
/home/xxx/Installs/cloud_storage/plugin_utils.cpp:140:20: note: declared here
  140 |     nlohmann::json j_null(nlohmann::json::value_t::null);
      |                    ^~~~~~
In file included from /home/xxx/Installs/cloud_storage/plugin_utils.h:25,
                 from /home/xxx/Installs/cloud_storage/library.cpp:30:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: At global scope:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type; did you mean ‘to_string’?
   68 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
      |                   to_string
gmake[3]: *** [CMakeFiles/cloud_storage.dir/build.make:90: CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: *** [CMakeFiles/cloud_storage.dir/build.make:76: CMakeFiles/cloud_storage.dir/library.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/cloud_storage.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/cloud_storage.dir/rule] Error 2
gmake: *** [Makefile:124: cloud_storage] Error 2ud_storage/service_clients/service_client.h: At global scope:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type; did you mean ‘to_string’?
   68 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
      |                   to_string
gmake[3]: *** [CMakeFiles/cloud_storage.dir/build.make:90: CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: *** [CMakeFiles/cloud_storage.dir/build.make:76: CMakeFiles/cloud_storage.dir/library.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/cloud_storage.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/cloud_storage.dir/rule] Error 2
gmake: *** [Makefile:124: cloud_storage] Error 2

OS details:

  • Linux xxx 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Distributor ID: Ubuntu
  • Description: Ubuntu 22.04 LTS
  • Release: 22.04
  • Codename: jammy
@beotiger
Copy link

beotiger commented Oct 6, 2022

You can change std::__cxx11::string to std::string and it will build and work as usual.

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

1 participant