Bladeren bron

build: add yyjson build + runtime dependency (phase A scaffolding)

fszontagh 2 maanden geleden
bovenliggende
commit
4762b56be4
3 gewijzigde bestanden met toevoegingen van 7 en 2 verwijderingen
  1. 2 1
      packaging/Dockerfile.base
  2. 1 1
      packaging/deb/templates/control.server
  3. 4 0
      service/CMakeLists.txt

+ 2 - 1
packaging/Dockerfile.base

@@ -26,6 +26,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
     nlohmann-json3-dev \
     libspdlog-dev \
     libfmt-dev \
+    libyyjson-dev \
     dpkg-dev \
     && rm -rf /var/lib/apt/lists/*
 
@@ -36,4 +37,4 @@ ENV CCACHE_COMPRESSLEVEL=6
 
 WORKDIR /build
 
-RUN echo "smartbotic-db-build-base:debian13:v3" > /etc/smartbotic-db-build-base
+RUN echo "smartbotic-db-build-base:debian13:v4" > /etc/smartbotic-db-build-base

+ 1 - 1
packaging/deb/templates/control.server

@@ -14,5 +14,5 @@ License: proprietary
 Provides: shadowman-database, callerai-storage
 Conflicts: shadowman-database, callerai-storage
 Replaces: shadowman-database, callerai-storage
-Depends: libsmartbotic-db-client (= {{VERSION}}), libssl3t64, liblz4-1, libsystemd0, libjemalloc2
+Depends: libsmartbotic-db-client (= {{VERSION}}), libssl3t64, liblz4-1, libsystemd0, libjemalloc2, libyyjson0
 Installed-Size: {{INSTALLED_SIZE}}

+ 4 - 0
service/CMakeLists.txt

@@ -7,6 +7,7 @@ find_package(OpenSSL REQUIRED)
 find_package(PkgConfig)
 if(PKG_CONFIG_FOUND)
     pkg_check_modules(LZ4 QUIET liblz4)
+    pkg_check_modules(yyjson REQUIRED yyjson)
     # v1.9.4 — jemalloc replaces glibc malloc for the smartbotic-database
     # binary. The fragmentation pattern from per-RPC nlohmann::json node
     # churn (107k 33-byte allocations observed on Zoe) defeats glibc's
@@ -81,6 +82,9 @@ if(LZ4_FOUND)
     target_include_directories(smartbotic-database PRIVATE ${LZ4_INCLUDE_DIRS})
 endif()
 
+target_include_directories(smartbotic-database PRIVATE ${yyjson_INCLUDE_DIRS})
+target_link_libraries(smartbotic-database PRIVATE ${yyjson_LIBRARIES})
+
 # v1.9.4 — jemalloc allocator (overrides glibc malloc/free)
 if(JEMALLOC_FOUND)
     target_compile_definitions(smartbotic-database PRIVATE HAVE_JEMALLOC)