empiredan opened a new issue, #1647: URL: https://github.com/apache/incubator-pegasus/issues/1647
According to https://github.com/apache/incubator-pegasus/pull/1640#issuecomment-1767531204, for v2.5, MacOS compilation failed due to "no member named 'make_unique' in namespace 'std'" as below: ``` [ 33%] Built target dsn_runtime [ 33%] Building CXX object src/aio/test/CMakeFiles/dsn_aio_test.dir/aio.cpp.o [ 33%] Building CXX object src/block_service/test/CMakeFiles/dsn_block_service_test.dir/block_service_manager_test.cpp.o [ 33%] Building CXX object src/base/test/CMakeFiles/base_test.dir/main.cpp.o [ 34%] Building CXX object src/base/test/CMakeFiles/base_test.dir/utils_test.cpp.o /Users/runner/work/incubator-pegasus/incubator-pegasus/src/aio/test/aio.cpp:177:21: error: no member named 'make_unique' in namespace 'std' auto err = std::make_unique<dsn::error_code>(); ~~~~~^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/aio/test/aio.cpp:177:48: error: expected '(' for function-style cast or type construction auto err = std::make_unique<dsn::error_code>(); ~~~~~~~~~~~~~~~^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/aio/test/aio.cpp:177:50: error: expected expression auto err = std::make_unique<dsn::error_code>(); ^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/aio/test/aio.cpp:178:23: error: no member named 'make_unique' in namespace 'std' auto count = std::make_unique<size_t>(); ~~~~~^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/aio/test/aio.cpp:178:35: error: unexpected type name 'size_t': expected expression auto count = std::make_unique<size_t>(); ^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/aio/test/aio.cpp:178:43: error: expected expression auto count = std::make_unique<size_t>(); ^ 6 errors generated. make[2]: *** [src/aio/test/CMakeFiles/dsn_aio_test.dir/aio.cpp.o] Error 1 make[1]: *** [src/aio/test/CMakeFiles/dsn_aio_test.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 35%] Building CXX object src/block_service/test/CMakeFiles/dsn_block_service_test.dir/fds_service_test.cpp.o [ 35%] Building CXX object src/base/test/CMakeFiles/base_test.dir/value_manager_test.cpp.o In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/test/block_service_manager_test.cpp:29: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/local/local_service.h:24: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/block_service.h:32: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/common/serialization_helper/thrift_helper.h:30: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/rpc/rpc_host_port.h:31: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/utils/errors.h:36: /Users/runner/work/incubator-pegasus/incubator-pegasus/src/utils/smart_pointers.h:110:60: error: cannot define or redeclare 'make_unique' here because namespace 'dsn' does not enclose namespace 'std' typename memory_internal::MakeUniqueResult<T>::scalar std::make_unique(Args &&... args) ~~~~~^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/utils/smart_pointers.h:120:59: error: cannot define or redeclare 'make_unique' here because namespace 'dsn' does not enclose namespace 'std' typename memory_internal::MakeUniqueResult<T>::array std::make_unique(size_t n) ~~~~~^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/utils/smart_pointers.h:129:6: error: cannot define or redeclare 'make_unique' here because namespace 'dsn' does not enclose namespace 'std' std::make_unique(Args &&... /* args */) = delete; ~~~~~^ In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/test/fds_service_test.cpp:18: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/fds/fds_service.h:29: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/block_service.h:32: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/rpc/serialization.h:32: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/common/serialization_helper/thrift_helper.h:30: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/rpc/rpc_host_port.h:31: /Users/runner/work/incubator-pegasus/incubator-pegasus/src/utils/errors.h:165:21: error: no matching function for call to 'make_unique' _info = std::make_unique<error_info>(rhs._info->code, rhs._info->msg); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/test/fds_service_test.cpp:18: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/fds/fds_service.h:29: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/block_service.h:34: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/serverlet.h:29: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/rpc/rpc_holder.h:28: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/client/partition_resolver.h:40: /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/task/async_calls.h:133:10: error: initialized lambda captures are a C++14 extension [-Werror,-Wc++14-extensions] [cb_fwd = std::move(callback)]( ^ In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/test/fds_service_test.cpp:18: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/fds/fds_service.h:29: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/block_service/block_service.h:34: In file included from /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/serverlet.h:29: /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/rpc/rpc_holder.h:171:15: error: initialized lambda captures are a C++14 extension [-Werror,-Wc++14-extensions] [ cb_fwd = std::forward<TCallback>(callback), ^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/rpc/rpc_holder.h:172:15: error: initialized lambda captures are a C++14 extension [-Werror,-Wc++14-extensions] rpc = *this ](error_code err, message_ex * req, message_ex * resp) mutable { ^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/rpc/rpc_holder.h:203:15: error: initialized lambda captures are a C++14 extension [-Werror,-Wc++14-extensions] [ cb_fwd = std::forward<TCallback>(callback), ^ /Users/runner/work/incubator-pegasus/incubator-pegasus/src/runtime/rpc/rpc_holder.h:204:15: error: initialized lambda captures are a C++14 extension [-Werror,-Wc++14-extensions] rpc = *this ](error_code err, message_ex * req, message_ex * resp) mutable { ^ 9 errors generated. make[2]: *** [src/block_service/test/CMakeFiles/dsn_block_service_test.dir/fds_service_test.cpp.o] Error 1 make[1]: *** [src/block_service/test/CMakeFiles/dsn_block_service_test.dir/all] Error 2 make: *** [all] Error 2 Error: Process completed with exit code 2. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
