From 8a35d586e0fc40dad265f01cee0a6f66948eaa83 Mon Sep 17 00:00:00 2001 From: Dominik Charousset Date: Sat, 4 May 2024 18:08:57 +0200 Subject: [PATCH] Fix build on Win, Alpine, Fedora and CentOS 9 --- ZeekBundle.cmake | 9 ++++++--- ci/alpine/Dockerfile | 3 ++- ci/centos-stream-9/Dockerfile | 1 + ci/fedora-38/Dockerfile | 1 + ci/fedora-39/Dockerfile | 1 + ci/windows/Dockerfile | 3 ++- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ZeekBundle.cmake b/ZeekBundle.cmake index 7eaa3cec..8450bf0a 100644 --- a/ZeekBundle.cmake +++ b/ZeekBundle.cmake @@ -44,7 +44,8 @@ function(ZeekBundle_Build name srcDir binDir) ERROR_FILE "${binDir}/cmake.err" RESULT_VARIABLE cmakeResult) if (NOT cmakeResult EQUAL 0) - message(FATAL_ERROR "Failed to configure external project: ${srcDir}!\nSee ${binDir}/cmake.out and ${binDir}/cmake.err for details.") + file(READ "${binDir}/cmake.err" cmakeErr) + message(FATAL_ERROR "Failed to configure external project ${name}:\n\n${cmakeErr}") endif () # Build the external project. message(STATUS "Building bundled project: ${name}") @@ -57,7 +58,8 @@ function(ZeekBundle_Build name srcDir binDir) ERROR_FILE "${binDir}/build.err" RESULT_VARIABLE buildResult) if (NOT buildResult EQUAL 0) - message(FATAL_ERROR "Failed to build external project: ${srcDir}!\nSee ${binDir}/build.out and ${binDir}/build.err for details.") + file(READ "${binDir}/build.err" cmakeErr) + message(FATAL_ERROR "Failed to configure external project ${name}:\n\n${cmakeErr}") endif () # Install the external project. message(STATUS "Installing bundled project: ${name}") @@ -71,7 +73,8 @@ function(ZeekBundle_Build name srcDir binDir) ERROR_FILE "${binDir}/install.err" RESULT_VARIABLE installResult) if (NOT installResult EQUAL 0) - message(FATAL_ERROR "Failed to install external project: ${srcDir}!\nSee ${binDir}/install.out and ${binDir}/install.err for details.") + file(READ "${binDir}/install.err" cmakeErr) + message(FATAL_ERROR "Failed to configure external project ${name}:\n\n${cmakeErr}") endif () endfunction () diff --git a/ci/alpine/Dockerfile b/ci/alpine/Dockerfile index bbc9f6ed..9db4cfbc 100644 --- a/ci/alpine/Dockerfile +++ b/ci/alpine/Dockerfile @@ -18,6 +18,7 @@ RUN apk add --no-cache \ py3-pip \ py3-websockets \ python3 \ - python3-dev + python3-dev \ + zlib-dev RUN pip3 install --break-system-packages junit2html diff --git a/ci/centos-stream-9/Dockerfile b/ci/centos-stream-9/Dockerfile index 2243f487..70e31b43 100644 --- a/ci/centos-stream-9/Dockerfile +++ b/ci/centos-stream-9/Dockerfile @@ -15,4 +15,5 @@ RUN dnf -y install \ openssl-devel \ python3 \ python3-devel \ + zlib-devel \ && dnf clean all && rm -rf /var/cache/dnf diff --git a/ci/fedora-38/Dockerfile b/ci/fedora-38/Dockerfile index d2368219..c1049582 100644 --- a/ci/fedora-38/Dockerfile +++ b/ci/fedora-38/Dockerfile @@ -15,4 +15,5 @@ RUN dnf -y install \ openssl-devel \ python3 \ python3-devel \ + zlib-devel \ && dnf clean all && rm -rf /var/cache/dnf diff --git a/ci/fedora-39/Dockerfile b/ci/fedora-39/Dockerfile index 1cabc56b..d7c3e4ad 100644 --- a/ci/fedora-39/Dockerfile +++ b/ci/fedora-39/Dockerfile @@ -15,4 +15,5 @@ RUN dnf -y install \ openssl-devel \ python3 \ python3-devel \ + zlib-devel \ && dnf clean all && rm -rf /var/cache/dnf diff --git a/ci/windows/Dockerfile b/ci/windows/Dockerfile index 5827ce0c..f0de3744 100755 --- a/ci/windows/Dockerfile +++ b/ci/windows/Dockerfile @@ -36,7 +36,8 @@ RUN choco install -y --no-progress visualstudio2022-workload-vctools RUN choco install -y --no-progress openssl --version=3.1.1 RUN choco install -y --no-progress python --version=3.10.0 RUN choco install -y --no-progress msysgit +RUN choco install -y --no-progress zstandard # Add git to the global PATH SHELL [ "cmd", "/c" ] -RUN setx /M PATH "%PATH%;C:\\Program Files\\Git\\bin" \ No newline at end of file +RUN setx /M PATH "%PATH%;C:\\Program Files\\Git\\bin"