Commit faba002
authored
Refactor/cpp client sdk (#17801)
* Refactor client-cpp build to single CMake entry with portable third-party cache
Move C++ client dependency resolution and compilation into one top-level
CMakeLists with Fetch* modules, cache tarballs under third-party/<os>/ for
offline copy-the-repo workflows, and slim the Maven POM to a CMake wrapper.
Skip server CI when only client-cpp changes; gate multi-language-client jobs
by language via paths-filter.
* Fix macOS client-cpp CI bison version and add source-build workflow
Install Homebrew bison on macOS package/IT runners so Thrift 0.21.0 builds
(%code requires Bison 2.4+). Add client-cpp-source-build workflow that uses a
minimal toolchain and online CMake fetch to verify zero-to-build compilation.
* Fix client-cpp-source-build: install clang-format-17 on all runners
Align Linux/macOS/Windows toolchain setup with client-cpp-package so
Spotless clang-format check during mvn package succeeds.
* Skip Spotless in client-cpp-source-build; drop clang-format install
Source-build workflow focuses on minimal-toolchain CMake fetch; pass
-Dspotless.skip=true instead of installing clang-format on runners.
* Refactor C++ client SDK: isolate Thrift and ship Windows DLL.
Reorganize sources into include/session/rpc with PIMPL so public headers no longer pull in Thrift or Boost. Embed Thrift in iotdb_session on all platforms; on Windows build a /MD shared library with import lib. Update examples, CI verification, and documentation for the slimmer SDK layout.
* fix(client-cpp): include ctime for std::tm in Common.h
Fixes Linux CI build where convertToTimestamp/int32ToDate declarations require std::tm from <ctime> (C++11).
* fix(client-cpp): CMake 4 Thrift policy and Session.cpp cstring
Pass CMAKE_POLICY_VERSION_MINIMUM=3.5 when configuring Thrift 0.21 on CMake 4.x (VS2026 CI). Include <cstring> in Session.cpp for memcpy/strlen/strstr on strict Linux builds.
* fix(client-cpp): Linux Thrift link and default Boost 1.84
Drop --whole-archive on Linux to avoid libgcc morestack duplicate symbols; build Thrift with -fno-split-stack. Bump default Boost to 1.84.0 for modern Clang on macOS CI.
* fix(client-cpp): Linux Thrift link and macOS Boost 1.84
Linux: keep --whole-archive for Thrift in libiotdb_session.so but add --allow-multiple-definition to avoid libgcc morestack duplicate symbols. macOS: default BOOST_VERSION to 1.84.0 for modern Clang enum checks (other platforms stay on 1.60.0).
* ci(client-cpp): multi-toolchain package matrix for release zips
Add per-classifier SDK packages (glibc 2.17 on CentOS 7, Windows VS2015-2026), workflow_dispatch variant filter, and documentation for choosing the right zip.
* fix(ci): write windows_matrix to GITHUB_OUTPUT without invalid format
* fix(ci): scope C++ triggers, glibc231 arm64, CentOS7 and VS2015 boost
- paths-ignore C++ workflows/scripts on Java IT jobs; narrow C++ path filters (no root pom.xml)
- aarch64 package on Ubuntu 20.04 container (linux-aarch64-glibc231)
- CentOS7 script: vault repos, Adoptium API JDK, devtoolset deps
- VS2015/2017: pin boost-msvc-14.2/14.1 versions instead of missing boost-msvc-14.0
* fix(ci): docker-based glibc builds, CMake 3.28 on arm64, drop VS2015
- glibc217/aarch64: checkout on host, build inside docker (fixes CentOS7 + Node 24)
- aarch64: install Kitware CMake 3.28 (ARCHIVE_EXTRACT needs 3.18+)
- Remove VS2015 package matrix and related docs
* fix(client-cpp): flatten package zip name and layout
- Zip: client-cpp-<version>-<classifier>.zip (remove redundant -cpp- segment)
- Root folder client-cpp-<version>-<classifier>/ with include/ and lib/ inside
- Update examples (strip one dir on unpack), distribution assembly, CI artifact paths
- CentOS7 SCLo vault mirror fix; chown workspace after docker builds
* fix(ci): pin CentOS7 SCLo repos to vault 7.9.2009 for glibc217
centos-sclo-sclo baseurl with releasever=7 404s on vault; rewrite SCLo repo files and refresh yum cache before devtoolset-8 install.
* fix(ci): build glibc217 in manylinux2014 job container
Replace docker run on ubuntu-22.04 with job-level container quay.io/pypa/manylinux2014_x86_64 and checkout@v4, matching PyPA manylinux CI style.
* fix(ci): host checkout + docker manylinux2014 for glibc217
Job container cannot run Node-based actions on glibc 2.17. Run checkout/cache on ubuntu-latest and build inside manylinux2014 via docker run; use preinstalled devtoolset-10 in the image.
* fix(ci): avoid SIGPIPE 141 from head/tail under pipefail
Replace ldd | head -1 with sed -n 1p and find | head -1 with find -quit so glibc checks do not fail after a successful build.
* fix(client-cpp): force x64 for Visual Studio Windows packages
VS2017 generator defaults to Win32; pass -DCMAKE_GENERATOR_PLATFORM=x64 on Windows via Maven profile. Add CI PE check that iotdb_session.dll is x64.
* fix(ci): build linux-aarch64 glibc217 with manylinux2014
Use manylinux2014_aarch64 and the shared packaging script instead of Ubuntu 20.04 glibc231. Extend the script for aarch64 CMake/JDK arch and classifier auto-detection. Update docs and remove the obsolete ubuntu20-arm script.
* fix(client-cpp): PR review follow-ups for SDK branch
Guard checkTemplateExists against a null dataset, document DataIterator lifetime, correct README Maven vs CMake option names, drop unused IotdbResolveTarball.cmake, and skip server CI when only multi-language-client workflow changes.
* chore(ci): slim manylinux glibc217 package path
Rename the Linux packaging helper to a manylinux-specific script, drop unused CentOS7 fallback branches, and keep only build plus GLIBC<=2.17 verification steps. Also add concise C++ workflow comments and unify client-cpp CMake minimum version to 3.15.
* refactor(client-cpp): rename IoTDBDate and move tests
Rename public Date type from IoTdbDate to IoTDBDate across headers, RPC/session code, and ITs. Move tests from src/test to a top-level test directory and update CMake, Maven, and README paths accordingly.
* example: merge C Session demos into client-cpp-example
Move tree_example.c and table_example.c into client-cpp-example, build them from the shared CMake entry, and update EN/ZH docs. Remove the standalone client-c-example module and drop it from the with-cpp profile.
* style(client-cpp): apply spotless to C examples
* fix(ci): use curl for downloads in manylinux glibc217 script
* fix(ci): use curl directly in manylinux glibc217 script
* fix(client-cpp): centralize SessionConfig defaults and align fetchSize with Java
* ci(client-cpp): add glibc224 packages with explicit CXX11 ABI on manylinux_2_24
Add linux-*-glibc224 zips built on manylinux_2_24 with -D_GLIBCXX_USE_CXX11_ABI=1 wired through Session and Thrift. Document glibc224 as recommended over glibc217 for modern distros.
* fix(client-cpp): correct glibc224 CXX11 ABI check and Maven flag wiring
* fix(client-cpp): use CMake ABI tag file instead of nm for glibc224 CI
* ci(client-cpp): remove source-build workflow
Drop client-cpp-source-build.yml; packaging is covered by client-cpp-package.yml.
* fix(ci): harden glibc checks and drop removed source-build workflow refs
Fail manylinux package scripts when GLIBC symbols cannot be parsed, and remove stale client-cpp-source-build.yml path triggers left after that workflow was deleted.
* fix(client-cpp): flatten package zip layout and add SHA512 checksums
Unpack directly to include/ and lib/ at zip root, generate .sha512 via checksum-maven-plugin, and upload checksums from the package workflow.
* fix sessionIT.cpp compilation
* fix(client-cpp): download Catch2 at build time instead of vendoring
Maven wget in generate-test-resources; CMake file(DOWNLOAD) fallback; remove test/catch2/catch.hpp from source tree.
* fix(client-cpp): download Catch2 before CMake compile phase
Run wget in generate-resources (not generate-test-resources, which runs after compile). CMake also downloads catch.hpp when the header is still missing.
* refactor(client-cpp): move SessionPool implementation into session sources
Place SessionPool.cpp under src/session to align with the existing source layout while keeping public headers in src/include.
* refactor(client-cpp): ship SDK tarballs with cmake/pkgconfig and bundled examples
Rename packages to iotdb-session-cpp-* classifiers, move examples into
client-cpp, drop glibc2.24 release matrix, and add CI smoke tests that build
and run examples against a standalone IoTDB server.
* fix(ci): normalize RUNNER_TEMP for Windows tar extract in cpp package smoke test
Git Bash on Windows runners passes D:\a\_temp to tar -C, which MSYS tar cannot
open; convert via cygpath -u before unpack and example build paths.
* chore(client-cpp): trim examples README and formatDatetime dead code
Simplify the SDK layout note in examples README and drop unused-parameter
casts for precision/zoneId in formatDatetime.
* fix(ci): locate Windows standalone scripts under sbin/windows in cpp smoke test
Distribution packages start/stop batch files at sbin/windows/, matching
client-cpp pom.xml; normalize GITHUB_WORKSPACE via cygpath for find on Windows.
* fix(ci): start IoTDB on Windows with cmd //c and wait for RPC port 6667
Git Bash mangles cmd.exe /c so start-standalone.bat never ran; use //c with
quoted paths and poll Test-NetConnection before running packaged examples.
* fix(ci): upload cpp SDK tarball before packaged example smoke tests
Resolve and upload artifacts on macOS and Windows immediately after packaging
so failed verify steps still retain the tarball; reuse pkg path in verify step.
* refactor(client-cpp): use zip for SDK release packages instead of tar.gz
Align Maven assembly, distribution bundle, CI resolve/upload, smoke-test
unpack (unzip), and docs on iotdb-session-cpp-<version>-<classifier>.zip.
* fix(ci): correct Git Bash quoting when starting IoTDB on Windows
Nested escaped quotes made cmd.exe treat the bat path as the command name; use //c with a single quoted path. Add a local script to replay verify steps.
* fix(ci): build packaged examples as x64 for VS2017 on Windows
Visual Studio 15/16 generators default to Win32 while the SDK is x64, causing LNK1112. Pass -A x64 in the verify step and set CMAKE_GENERATOR_PLATFORM in examples CMakeLists.
* Improve C++ session package documentation
* Set CXX11 ABI for glibc217 C++ package
* Fix C++ SDK CXX11 ABI propagation
* Fix C++ SDK package ABI verification
* Fix glibc217 C++ client ABI build
* Use link test for glibc217 C++ ABI check
* Rebuild C++ client when ABI changes
* Fail C++ client build on ABI mismatch
* Use old libstdc++ ABI for glibc217 package
* Use manylinux_2_28 for C++ client packages
* chore(ci): remove unused local Windows C++ example debug scripts
These scripts were one-off helpers for VS2017 x64 CI fixes; verification
logic already lives inline in client-cpp-package.yml.
* Fix MSVC debug C++ client build
* Document C++ client debug builds
* Address C++ client packaging review comments1 parent 3d98ea5 commit faba002
109 files changed
Lines changed: 6269 additions & 20613 deletions
File tree
- .github
- scripts
- workflows
- distribution
- src/assembly
- example
- client-c-example
- src
- client-cpp-example
- src
- iotdb-client/client-cpp
- cmake
- examples
- src
- assembly
- package-metadata/third_party
- include
- main
- rpc
- session
- test
- catch2
- test
- catch2
- cpp
- third-party
- linux
- mac
- windows
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
0 commit comments