This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new ecb6684  add Q&A for CPP Compile (#302)
ecb6684 is described below

commit ecb66843d57a02e0af8f40463bc3452b699404d1
Author: CritasWang <[email protected]>
AuthorDate: Mon Aug 5 19:17:31 2024 +0800

    add Q&A for CPP Compile (#302)
---
 src/UserGuide/Master/API/Programming-Cpp-Native-API.md    | 10 ++++++++--
 src/UserGuide/V0.13.x/API/Programming-Cpp-Native-API.md   |  2 +-
 src/UserGuide/V1.0.x/API/Programming-Cpp-Native-API.md    |  2 +-
 src/UserGuide/V1.1.x/API/Programming-Cpp-Native-API.md    |  2 +-
 src/UserGuide/latest/API/Programming-Cpp-Native-API.md    | 10 ++++++++--
 src/zh/UserGuide/Master/API/Programming-Cpp-Native-API.md |  8 +++++++-
 src/zh/UserGuide/latest/API/Programming-Cpp-Native-API.md | 10 ++++++++--
 7 files changed, 34 insertions(+), 10 deletions(-)

diff --git a/src/UserGuide/Master/API/Programming-Cpp-Native-API.md 
b/src/UserGuide/Master/API/Programming-Cpp-Native-API.md
index 41b9f8c..022fbdd 100644
--- a/src/UserGuide/Master/API/Programming-Cpp-Native-API.md
+++ b/src/UserGuide/Master/API/Programming-Cpp-Native-API.md
@@ -77,7 +77,7 @@
   To install all dependencies, run:
 
     ```shell
-    sudo apt-get install gcc-9 g++-9 libstdc++-9-dev bison flex 
libboost-all-dev libssl-dev zlib1g-dev
+    sudo apt-get install gcc-10 g++-10 libstdc++-10-dev bison flex 
libboost-all-dev libssl-dev zlib1g-dev
     ```
 
 
@@ -141,6 +141,12 @@ If the compilation finishes successfully, the packaged zip 
file will be placed u
 
 ### Compile Q&A
 
+Q: What are the requirements for the environment on Linux?
+
+A:
+- Recommend `glibc-2.33` or above version. In some scenarios, it is known that 
`glibc-2.31` cannot be compiled successfully. Please refer to [document]( 
https://www.gnu.org/software/gnulib/manual/html_node/_005f_005flibc_005fsingle_005fthreaded.html
 ).
+- Recommend `gcc 10` or above.
+
 Q:How to deal with compile error`undefined reference to '_libc_sinle_thread'`?
 
 A:
@@ -694,7 +700,7 @@ void executeNonQueryStatement(const std::string &sql);
 The sample code of using these interfaces is in:
 
 - `example/client-cpp-example/src/SessionExample.cpp`
-- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(使用对齐时间序列)
+- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(Aligned Timeseries)
 
 If the compilation finishes successfully, the example project will be placed 
under `example/client-cpp-example/target`
 
diff --git a/src/UserGuide/V0.13.x/API/Programming-Cpp-Native-API.md 
b/src/UserGuide/V0.13.x/API/Programming-Cpp-Native-API.md
index a346674..0fdd0e5 100644
--- a/src/UserGuide/V0.13.x/API/Programming-Cpp-Native-API.md
+++ b/src/UserGuide/V0.13.x/API/Programming-Cpp-Native-API.md
@@ -383,7 +383,7 @@ void executeNonQueryStatement(const std::string &sql);
 The sample code of using these interfaces is in:
 
 - `example/client-cpp-example/src/SessionExample.cpp`
-- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(使用对齐时间序列)
+- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(Aligned Timeseries)
 
 If the compilation finishes successfully, the example project will be placed 
under `example/client-cpp-example/target`
 
diff --git a/src/UserGuide/V1.0.x/API/Programming-Cpp-Native-API.md 
b/src/UserGuide/V1.0.x/API/Programming-Cpp-Native-API.md
index e13fad6..94a4530 100644
--- a/src/UserGuide/V1.0.x/API/Programming-Cpp-Native-API.md
+++ b/src/UserGuide/V1.0.x/API/Programming-Cpp-Native-API.md
@@ -383,7 +383,7 @@ void executeNonQueryStatement(const std::string &sql);
 The sample code of using these interfaces is in:
 
 - `example/client-cpp-example/src/SessionExample.cpp`
-- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(使用对齐时间序列)
+- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(Aligned Timeseries)
 
 If the compilation finishes successfully, the example project will be placed 
under `example/client-cpp-example/target`
 
diff --git a/src/UserGuide/V1.1.x/API/Programming-Cpp-Native-API.md 
b/src/UserGuide/V1.1.x/API/Programming-Cpp-Native-API.md
index 1add31b..9dd9671 100644
--- a/src/UserGuide/V1.1.x/API/Programming-Cpp-Native-API.md
+++ b/src/UserGuide/V1.1.x/API/Programming-Cpp-Native-API.md
@@ -383,7 +383,7 @@ void executeNonQueryStatement(const std::string &sql);
 The sample code of using these interfaces is in:
 
 - `example/client-cpp-example/src/SessionExample.cpp`
-- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(使用对齐时间序列)
+- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(Aligned Timeseries)
 
 If the compilation finishes successfully, the example project will be placed 
under `example/client-cpp-example/target`
 
diff --git a/src/UserGuide/latest/API/Programming-Cpp-Native-API.md 
b/src/UserGuide/latest/API/Programming-Cpp-Native-API.md
index 41b9f8c..022fbdd 100644
--- a/src/UserGuide/latest/API/Programming-Cpp-Native-API.md
+++ b/src/UserGuide/latest/API/Programming-Cpp-Native-API.md
@@ -77,7 +77,7 @@
   To install all dependencies, run:
 
     ```shell
-    sudo apt-get install gcc-9 g++-9 libstdc++-9-dev bison flex 
libboost-all-dev libssl-dev zlib1g-dev
+    sudo apt-get install gcc-10 g++-10 libstdc++-10-dev bison flex 
libboost-all-dev libssl-dev zlib1g-dev
     ```
 
 
@@ -141,6 +141,12 @@ If the compilation finishes successfully, the packaged zip 
file will be placed u
 
 ### Compile Q&A
 
+Q: What are the requirements for the environment on Linux?
+
+A:
+- Recommend `glibc-2.33` or above version. In some scenarios, it is known that 
`glibc-2.31` cannot be compiled successfully. Please refer to [document]( 
https://www.gnu.org/software/gnulib/manual/html_node/_005f_005flibc_005fsingle_005fthreaded.html
 ).
+- Recommend `gcc 10` or above.
+
 Q:How to deal with compile error`undefined reference to '_libc_sinle_thread'`?
 
 A:
@@ -694,7 +700,7 @@ void executeNonQueryStatement(const std::string &sql);
 The sample code of using these interfaces is in:
 
 - `example/client-cpp-example/src/SessionExample.cpp`
-- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(使用对齐时间序列)
+- `example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp` 
(Aligned Timeseries)
 
 If the compilation finishes successfully, the example project will be placed 
under `example/client-cpp-example/target`
 
diff --git a/src/zh/UserGuide/Master/API/Programming-Cpp-Native-API.md 
b/src/zh/UserGuide/Master/API/Programming-Cpp-Native-API.md
index 681d00c..972a4fd 100644
--- a/src/zh/UserGuide/Master/API/Programming-Cpp-Native-API.md
+++ b/src/zh/UserGuide/Master/API/Programming-Cpp-Native-API.md
@@ -71,7 +71,7 @@
     使用以下命令安装所有依赖:
 
     ```shell
-    sudo apt-get install gcc-9 g++-9 libstdc++-9-dev bison flex 
libboost-all-dev libssl-dev zlib1g-dev
+    sudo apt-get install gcc-10 g++-10 libstdc++-10-dev bison flex 
libboost-all-dev libssl-dev zlib1g-dev
     ```
 
 
@@ -134,6 +134,12 @@ git checkout rel/0.13
 
 ### 编译 Q&A
 
+Q:Linux 上的环境有哪些要求呢?
+
+A:
+- 推荐 `glibc-2.33` 或以上版本,部分场景下已知 `glibc-2.31` 
无法编译成功,参考[文档](https://www.gnu.org/software/gnulib/manual/html_node/_005f_005flibc_005fsingle_005fthreaded.html)。
+- 推荐 `gcc 10` 以上版本。
+
 Q:编译报错`undefined reference to '_libc_sinle_thread'`如何处理?
 
 A:
diff --git a/src/zh/UserGuide/latest/API/Programming-Cpp-Native-API.md 
b/src/zh/UserGuide/latest/API/Programming-Cpp-Native-API.md
index 681d00c..09270c6 100644
--- a/src/zh/UserGuide/latest/API/Programming-Cpp-Native-API.md
+++ b/src/zh/UserGuide/latest/API/Programming-Cpp-Native-API.md
@@ -71,7 +71,7 @@
     使用以下命令安装所有依赖:
 
     ```shell
-    sudo apt-get install gcc-9 g++-9 libstdc++-9-dev bison flex 
libboost-all-dev libssl-dev zlib1g-dev
+    sudo apt-get install gcc-10 g++-10 libstdc++-10-dev bison flex 
libboost-all-dev libssl-dev zlib1g-dev
     ```
 
 
@@ -134,6 +134,12 @@ git checkout rel/0.13
 
 ### 编译 Q&A
 
+Q:Linux 上的环境有哪些要求呢?
+
+A:
+- 推荐 `glibc-2.33` 或以上版本,部分场景下已知 `glibc-2.31` 
无法编译成功,参考[文档](https://www.gnu.org/software/gnulib/manual/html_node/_005f_005flibc_005fsingle_005fthreaded.html)。
+- 推荐 `gcc 10` 以上版本。
+
 Q:编译报错`undefined reference to '_libc_sinle_thread'`如何处理?
 
 A:
@@ -440,7 +446,7 @@ A:
     </profiles>
 </project>
 ```
-- 再次执行 mvn clean package -P with-cpp -pl iotdb-client/client-cpp -am 
-DskipTests,成功build
+- 再次执行 `mvn clean package -P with-cpp -pl iotdb-client/client-cpp -am 
-DskipTests`,成功build
 
 
 ## 基本接口说明

Reply via email to