Open er1cthe0ne opened 4 years ago
Hi @HuaqingTu - let me give you the answers here:
Note that we have switched from kafka to pulsar as our message queue solution. Therefore, all kafka code is consider is legacy. We have two options: a. still fix up the kakfa dependencies in case if we want to use it in the future b. remove kafka dependencies, also need to change the source code to remove all kafka includes and references
the gRPC and protobuf CMake references are in the lower sessions in /src/CMakeLists.txt, please see the usages below:
# Find Protobuf installation
# Looks for protobuf-config.cmake file installed by Protobuf's cmake installation.
set(protobuf_MODULE_COMPATIBLE TRUE)
find_package(Protobuf CONFIG REQUIRED)
message(STATUS "Using protobuf ${protobuf_VERSION}")
find_package(gRPC CONFIG REQUIRED) message(STATUS "Using gRPC ${gRPC_VERSION}")
set(_GRPC_GRPCPP_UNSECURE gRPC::grpc++_unsecure)
set(_GRPC_CPP_PLUGIN_EXECUTABLE $
Hi, Eric. I've checked the github website of cppkafka to find the CMake options about static library. I think modifying find_library or target_link_libraries can make the use of static libraries first. But for proto and gRPC, it use find_package. I don't know how to modify the code to use static libraries first.
Hi, Eric. I've checked the github website of cppkafka to find the CMake options about static library. I think modifying find_library or target_link_libraries can make the use of static libraries first. But for proto and gRPC, it use find_package. I don't know how to modify the code to use static libraries first.
Hi, Eric. Since the gRPC team said that ISSUE is not for asking problems, I've ask question about static library at grpc.io mailing list. They haven't responded yet. I encountered some problems when modifying /src/CMakeLists.txt to statically link dependencies. Below I take pulsar as an example to illustrate how I try to statically link dependencies.
I changed the code
FIND_LIBRARY(PULSAR pulsar /usr/lib NO_DEFAULT_PATH)
target_link_libraries(AlcorControlAgent pulsar)
to
FIND_LIBRARY(PULSAR libpulsar.a /usr/lib NO_DEFAULT_PATH)
target_link_libraries(AlcorControlAgent libpulsar.a)
But it still link with libpulsar.so.2.6.1.
Then I changed it to
target_link_libraries(AlcorControlAgent /usr/lib/libpulsar.a)
Still not work.
Then according to https://cmake.org/pipermail/cmake/2011-June/045222.html, I added some code and changed it to
ADD_LIBRARY(pulsar STATIC IMPORTED)
SET_TARGET_PROPERTIES(pulsar PROPERTIES IMPORTED_LOCATION /usr/lib/libpulsar.a)
target_link_libraries(AlcorControlAgent pulsar)
Still not work.
I'm not sure where the problem is.
@HuaqingTu - please take a look at the pulsar documentation which should provide some background information: https://pulsar.apache.org/docs/en/client-libraries-cpp/
You can also work with @lly00 who added the pulsar support. I am hoping @lly00 can give you some hint on how to deal with the pulsar dependency.
Hi, Eric. I've added a section for manual rules constructions in the design document. And about this issue, I am afraid that I do not have confidence to finish this job.
@er1cthe0ne Can you or @kiran1048 take on this item as well, along with the one-box setup?
@xieus - this is more of a trial and error task. I can work with @kiran1048 on it. I think the first step is the remove the old kafka code and dependencies. And work with @lly00 to get the right pulsar dependency into ACA.
Context
Current ACA deployment model requires going to the targeted machine to:
We want to improve the process to use a machine with same linux os as targeted machine:
Action Item
In order to improve the process, we need to go through all the ACA dependencies