From ec1293113ff5122f542da406524732597a4f3396 Mon Sep 17 00:00:00 2001 From: j842 Date: Tue, 10 Jun 2025 13:00:55 +1200 Subject: [PATCH] json fixed, still errors --- build-base/Dockerfile.dropshell-build-base | 4 ++-- tests/ipdemo/CMakeLists.txt | 19 +++---------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/build-base/Dockerfile.dropshell-build-base b/build-base/Dockerfile.dropshell-build-base index 8a34289..9ebe899 100644 --- a/build-base/Dockerfile.dropshell-build-base +++ b/build-base/Dockerfile.dropshell-build-base @@ -74,8 +74,8 @@ RUN curl -LO https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && make install_sw && \ cd / && rm -rf /tmp/openssl-${OPENSSL_VERSION} /tmp/openssl-${OPENSSL_VERSION}.tar.gz -# Build jsoncpp statically with musl - use latest stable version -ARG JSONCPP_VERSION=1.9.6 +# Build jsoncpp statically with musl - use stable version known to work with Drogon +ARG JSONCPP_VERSION=1.9.5 WORKDIR /tmp RUN curl -LO https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/${JSONCPP_VERSION}.tar.gz && \ tar xzf ${JSONCPP_VERSION}.tar.gz && \ diff --git a/tests/ipdemo/CMakeLists.txt b/tests/ipdemo/CMakeLists.txt index 66a181b..2943f4d 100644 --- a/tests/ipdemo/CMakeLists.txt +++ b/tests/ipdemo/CMakeLists.txt @@ -97,28 +97,15 @@ set(EXTRA_LIBS # Set paths for libraries before finding Drogon -set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} - /usr/local/jsoncpp - /usr/local/openssl-musl - /usr/local/pgsql - /usr/local/mariadb-connector-c - /usr/local/sqlite3 - /usr/local/mysql - /usr/local/cares - /usr/local/curl -) - -# Explicitly set jsoncpp paths for Drogon's FindJsoncpp.cmake -set(JSONCPP_INCLUDE_DIRS /usr/local/jsoncpp/include) -set(JSONCPP_LIBRARIES /usr/local/jsoncpp/lib/libjsoncpp.a) +set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/local) find_package(Drogon CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PRIVATE Drogon::Drogon) # Additional PostgreSQL libraries needed for static linking set(POSTGRESQL_EXTRA_LIBS - /usr/local/pgsql/lib/libpgcommon.a - /usr/local/pgsql/lib/libpgport.a + /usr/local/lib/libpgcommon.a + /usr/local/lib/libpgport.a ) # Link libraries