Compiling the source code of TiKV's client-c, the default compilation generates something like libclient.a, but adding the test compilation option results in an error

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 编译tikv的client-c的源码,默认编译通过有生成类似libclient.a,加上test编译选项编译报错问题

| username: TiDBer_CozPRH8J

【TiDB Environment】Test Environment
【TiDB Version】
【Encountered Problem】Compiling the source code of tikv’s client-c (GitHub - tikv/client-c: The C++ TiKV client used by TiFlash.), the default compilation generates something like libclient.a, but compiling with the test option results in errors.
【Reproduction Path】Running cmake … in the build directory works fine, but switching to cmake -DENABLE_TESTS=ON … results in a bunch of grpc-related errors, as shown below:


【Problem Phenomenon and Impact】

【Attachments】

Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: yilong | Original post link

May I ask which document this cmake -DENABLE_TESTS is based on?

| username: TiDBer_CozPRH8J | Original post link

In the Makefile, unit tests require this to be added; otherwise, it only generates a static library.

| username: Min_Chen | Original post link

Can I ask a question on the GitHub issue?

| username: TiDBer_CozPRH8J | Original post link

I have already submitted a GitHub issue.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.