rsocket / rsocket-cpp

C++ implementation of RSocket
http://rsocket.io
Apache License 2.0
253 stars 99 forks source link

make -j report two errors in debian 10, gcc8.3 with vcpkg folly #905

Open abratio opened 3 years ago

abratio commented 3 years ago

I installed folly by vcpkg in debian 10, compile this project with gcc8.3. Here is the error message when make -j:

/home/xqtu/repo/rsocket-cpp/rsocket/transports/tcp/TcpConnectionAcceptor.cpp:46:8: error: ‘void rsocket::TcpConnectionAcceptor::SocketCallback::acceptError(folly::exception_wrapper)’ marked ‘override’, but does not override void acceptError(folly::exception_wrapper ex) noexcept override { ^~~ /home/xqtu/repo/rsocket-cpp/rsocket/transports/tcp/TcpConnectionAcceptor.cpp:46:8: warning: by ‘void rsocket::TcpConnectionAcceptor::SocketCallback::acceptError(folly::exception_wrapper)’ [-Woverloaded-virtual] In file included from /usr/include/c++/8/memory:80, from /home/xqtu/repo/vcpkg/installed/x64-linux/include/folly/IPAddress.h:21, from /home/xqtu/repo/vcpkg/installed/x64-linux/include/folly/SocketAddress.h:26, from /home/xqtu/repo/vcpkg/installed/x64-linux/include/folly/io/async/AsyncServerSocket.h:19, from /home/xqtu/repo/rsocket-cpp/rsocket/transports/tcp/TcpConnectionAcceptor.h:17, from /home/xqtu/repo/rsocket-cpp/rsocket/transports/tcp/TcpConnectionAcceptor.cpp:15: /usr/include/c++/8/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::single_object std::make_unique(_Args&& ...) [with _Tp = rsocket::TcpConnectionAcceptor::SocketCallback; _Args = {std::function<void(std::unique_ptr<rsocket::DuplexConnection, std::default_delete >, folly::EventBase&)>&}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr]’: /home/xqtu/repo/rsocket-cpp/rsocket/transports/tcp/TcpConnectionAcceptor.cpp:83:68: required from here /usr/include/c++/8/bits/unique_ptr.h:831:30: error: invalid new-expression of abstract class type ‘rsocket::TcpConnectionAcceptor::SocketCallback’ { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(args)...)); } ^~~~~~~~~~~ /home/xqtu/repo/rsocket-cpp/rsocket/transports/tcp/TcpConnectionAcceptor.cpp:26:30: note: because the following virtual functions are pure within ‘rsocket::TcpConnectionAcceptor::SocketCallback’: class TcpConnectionAcceptor::SocketCallback ^~~~~~ In file included from /home/xqtu/repo/rsocket-cpp/rsocket/transports/tcp/TcpConnectionAcceptor.h:17, from /home/xqtu/repo/rsocket-cpp/rsocket/transports/tcp/TcpConnectionAcceptor.cpp:15: /home/xqtu/repo/vcpkg/installed/x64-linux/include/folly/io/async/AsyncServerSocket.h:174:18: note: ‘virtual void folly::AsyncServerSocket::AcceptCallback::acceptError(const std::exception&)’ virtual void acceptError(const std::exception& ex) noexcept = 0; ^~~ make[2]: [CMakeFiles/ReactiveSocket.dir/build.make:661: CMakeFiles/ReactiveSocket.dir/rsocket/transports/tcp/TcpConnectionAcceptor.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:1714: CMakeFiles/ReactiveSocket.dir/all] Error 2 make: *** [Makefile:163: all] Error 2

Your Environment

abratio commented 3 years ago

The vcpkg installed folly with the following library versions:

boost-algorithm:x64-linux 1.75.0 Boost algorithm module boost-align:x64-linux 1.75.0 Boost align module boost-any:x64-linux 1.75.0 Boost any module boost-array:x64-linux 1.75.0 Boost array module boost-assert:x64-linux 1.75.0 Boost assert module boost-atomic:x64-linux 1.75.0#1 Boost atomic module boost-bind:x64-linux 1.75.0 Boost bind module boost-build:x64-linux 1.75.0 Boost.Build boost-chrono:x64-linux 1.75.0#1 Boost chrono module boost-compatibility:x64-linux 1.75.0 Boost compatibility module boost-concept-check:x64-linux 1.75.0#2 Boost concept_check module boost-config:x64-linux 1.75.0 Boost config module boost-container-hash:x64-linux 1.75.0 Boost container_hash module boost-container:x64-linux 1.75.0#1 Boost container module boost-context:x64-linux 1.75.0#4 Boost context module boost-conversion:x64-linux 1.75.0 Boost conversion module boost-core:x64-linux 1.75.0 Boost core module boost-crc:x64-linux 1.75.0 Boost crc module boost-date-time:x64-linux 1.75.0#1 Boost date_time module boost-detail:x64-linux 1.75.0 Boost detail module boost-endian:x64-linux 1.75.0 Boost endian module boost-exception:x64-linux 1.75.0#1 Boost exception module boost-filesystem:x64-linux 1.75.0#1 Boost filesystem module boost-foreach:x64-linux 1.75.0 Boost foreach module boost-function-types:x64-linux 1.75.0 Boost function_types module boost-function:x64-linux 1.75.0 Boost function module boost-functional:x64-linux 1.75.0 Boost functional module boost-fusion:x64-linux 1.75.0 Boost fusion module boost-integer:x64-linux 1.75.0 Boost integer module boost-intrusive:x64-linux 1.75.0 Boost intrusive module boost-io:x64-linux 1.75.0 Boost io module boost-iterator:x64-linux 1.75.0 Boost iterator module boost-lambda:x64-linux 1.75.0 Boost lambda module boost-lexical-cast:x64-linux 1.75.0 Boost lexical_cast module boost-math:x64-linux 1.75.0#1 Boost math module boost-modular-build-helper:x64-linux 1.75.0#9 boost-move:x64-linux 1.75.0 Boost move module boost-mp11:x64-linux 1.75.0 Boost mp11 module boost-mpl:x64-linux 1.75.0 Boost mpl module boost-multi-index:x64-linux 1.75.0 Boost multi_index module boost-numeric-conversion:x64-linux 1.75.0 Boost numeric_conversion module boost-optional:x64-linux 1.75.0 Boost optional module boost-phoenix:x64-linux 1.75.0 Boost phoenix module boost-pool:x64-linux 1.75.0 Boost pool module boost-predef:x64-linux 1.75.0 Boost predef module boost-preprocessor:x64-linux 1.75.0 Boost preprocessor module boost-program-options:x64-linux 1.75.0#1 Boost program_options module boost-proto:x64-linux 1.75.0 Boost proto module boost-range:x64-linux 1.75.0 Boost range module boost-ratio:x64-linux 1.75.0 Boost ratio module boost-rational:x64-linux 1.75.0 Boost rational module boost-regex:x64-linux 1.75.0#2 Boost regex module boost-serialization:x64-linux 1.75.0#1 Boost serialization module boost-smart-ptr:x64-linux 1.75.0 Boost smart_ptr module boost-spirit:x64-linux 1.75.0 Boost spirit module boost-static-assert:x64-linux 1.75.0 Boost static_assert module boost-system:x64-linux 1.75.0#1 Boost system module boost-thread:x64-linux 1.75.0#1 Boost thread module boost-throw-exception:x64-linux 1.75.0 Boost throw_exception module boost-tokenizer:x64-linux 1.75.0 Boost tokenizer module boost-tuple:x64-linux 1.75.0 Boost tuple module boost-type-index:x64-linux 1.75.0 Boost type_index module boost-type-traits:x64-linux 1.75.0 Boost type_traits module boost-typeof:x64-linux 1.75.0 Boost typeof module boost-uninstall:x64-linux 1.75.0 boost uninstall port boost-unordered:x64-linux 1.75.0 Boost unordered module boost-utility:x64-linux 1.75.0 Boost utility module boost-variant:x64-linux 1.75.0 Boost variant module boost-vcpkg-helpers:x64-linux 7#2 a set of vcpkg-internal scripts used to modulari... boost-winapi:x64-linux 1.75.0 Boost winapi module double-conversion:x64-linux 3.1.5 Efficient binary-decimal and decimal-binary conv... fmt:x64-linux 7.1.3#4 Formatting library for C++. It can be used as a ... folly:x64-linux 2020.10.19.00 An open-source C++ library developed and used at... folly[zlib]:x64-linux Support zlib for compression gflags:x64-linux 2.2.2-1 A C++ library that implements commandline flags ... glog:x64-linux 0.4.0-3 C++ implementation of the Google logging module libevent:x64-linux 2.1.12#1 An event notification library libevent[thread]:x64-linux Support for thread openssl:x64-linux 1.1.1k#1 OpenSSL is an open source project that provides ... vcpkg-cmake-config:x64-linux 2021-02-26#1 vcpkg-cmake:x64-linux 2021-02-28#2 zlib:x64-linux 1.2.11#10 A compression library