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

Several build errors, problem with generated CPP code #496

Open
Qiaolin-Yu opened this issue Apr 22, 2022 · 0 comments
Open

Several build errors, problem with generated CPP code #496

Qiaolin-Yu opened this issue Apr 22, 2022 · 0 comments

Comments

@Qiaolin-Yu
Copy link

What I want to do

I want to import fbthift dependencies into my rocksdb project

How I built fbthrift

Following the top-level README, I built fbthrift with a custom --scratch-path.

./build/fbcode_builder/getdeps.py install-system-deps --recursive fbthrift
./build/fbcode_builder/getdeps.py --allow-system-packages build --scratch-path=/my/custom/path

What I tried to build

I added this in CMakeLists.txt

include_directories(/my/custom/path/installed/fbthrift/include)
link_directories(/my/custom/path/installed/fbthrift/lib)

Error

/path/to/gen-cpp2/remote_compaction_service.cpp: In member function ‘virtual apache::thrift::AsyncProcessorFactory::CreateMethodMetadataResult THRIFT_NAMESPACE::cpp2::remote_compaction_serviceSvIf::createMethodMetadata()’:
/path/to/gen-cpp2/remote_compaction_service.cpp:19:105: error: too few arguments to function ‘apache::thrift::AsyncProcessorFactory::MethodMetadataMap apache::thrift::detail::ap::createMethodMetadataMap(const ServiceRequestInfoMap&) [with Processor = THRIFT_NAMESPACE::cpp2::remote_compaction_serviceAsyncProcessor; apache::thrift::AsyncProcessorFactory::MethodMetadataMap = folly::F14FastMap<std::__cxx11::basic_string<char>, std::shared_ptr<const apache::thrift::AsyncProcessorFactory::MethodMetadata> >; apache::thrift::ServiceRequestInfoMap = folly::F14ValueMap<std::__cxx11::basic_string<char>, apache::thrift::ServiceRequestInfo>]’
   19 | ft::detail::ap::createMethodMetadataMap<remote_compaction_serviceAsyncProcessor>();
      |                                                                                  ^
/path/to/gen-cpp2/remote_compaction_service.tcc:23:18:
error: cannot convert ‘<unresolved overloaded function type>’ to ‘apache::thrift::GeneratedAsyncProcessor::ExecuteFunc<THRIFT_NAMESPACE::cpp2::remote_compaction_serviceAsyncProcessor>’ {aka ‘void (THRIFT_NAMESPACE::cpp2::remote_compaction_serviceAsyncProcessor::*)(apache::thrift::ServerRequest&&)’}
   23 |   processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &remote_compaction_serviceAsyncProcessor::process_OpenAndCompact<ProtocolIn_, ProtocolOut_>, this);
      |   ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/gen-cpp2/remote_compaction_service.cpp:101:132: error: no matching function for call to ‘process(THRIFT_NAMESPACE::cpp2::remote_compaction_serviceAsyncProcessor*, std::remove_reference<std::unique_ptr<apache::thrift::ResponseChannelRequest, apache::thrift::RequestsRegistry::Deleter>&>::type, std::remove_reference<apache::thrift::SerializedCompressedRequest&>::type, const apache::thrift::AsyncProcessorFactory::MethodMetadata&, apache::thrift::protocol::PROTOCOL_TYPES&, apache::thrift::Cpp2RequestContext*&, folly::EventBase*&, apache::thrift::concurrency::ThreadManager*&)’
  101 |   apache::thrift::detail::ap::process(this, std::move(req), std::move(serializedRequest), methodMetadata, protType, context, eb, tm);

The problem seems to be caused by the generated CPP code.
Have I done anything wrong in the build process?

@Qiaolin-Yu Qiaolin-Yu changed the title Error: too few arguments to function, problem with generated CPP code Several build errors, problem with generated CPP code Apr 22, 2022
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