AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only

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

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

    Posted Tue October 02, 2018 10:51 AM

    Originally posted by: amandeepgautam


    I am trying to compile grpc on AIX. After fixing a few GCC8 warnings, I run into the following error:

    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_;
    ^~~



    The following stackoverflow post gives some context: https://stackoverflow.com/questions/14191566/c-mut...

    However I am not sure why this is happening on AIX. Is it because of a similar problem? Is there a known workaround?