Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error: 'mutex' in namespace 'std' does not name a type

Status
Not open for further replies.

amandeepgautam

Programmer
Dec 21, 2017
8
US
I am trying to compile grpc on AIX. After fixing a few GCC8 warnings, I run into the following error:

[tt]In file included from include/grpcpp/impl/codegen/call.h:30,
from include/grpcpp/impl/call.h:22,
from include/grpcpp/channel.h:25,
from src/cpp/client/insecure_credentials.cc:23:
include/grpcpp/impl/codegen/client_context.h:419:8: error: 'mutex' in namespace 'std' does not name a type
std::mutex mu_;
^~~~~
include/grpcpp/impl/codegen/client_context.h:419:3: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
include/grpcpp/impl/codegen/client_context.h:53:1:
+#include <mutex>

include/grpcpp/impl/codegen/client_context.h:419:3:
std::mutex mu_;
^~~
[/tt]

The following stackoverflow post gives some context:
However I am not sure why this is happening on AIX. Is it because of a similar problem? Is there a known workaround?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top