From 677fb51a670e02be5a20c80f9f92fac48a42e5a3 Mon Sep 17 00:00:00 2001 From: Stephan D Date: Sat, 8 Nov 2025 03:27:14 +0100 Subject: [PATCH] fx build fix --- ci/scripts/proto/generate.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ci/scripts/proto/generate.sh b/ci/scripts/proto/generate.sh index be6440f..eb178f8 100755 --- a/ci/scripts/proto/generate.sh +++ b/ci/scripts/proto/generate.sh @@ -8,6 +8,18 @@ API_DIR="${REPO_ROOT}/api" PROTO_DIR="./proto" PROTOC_BIN="${PROTOC:-protoc}" PROTOC_INCLUDE="${PROTOC_INCLUDE:-/usr/include}" +if [ ! -f "${PROTOC_INCLUDE}/google/protobuf/timestamp.proto" ]; then + for candidate in /usr/include /usr/local/include /usr/lib/include /usr/local/share/include; do + if [ -f "${candidate}/google/protobuf/timestamp.proto" ]; then + PROTOC_INCLUDE="${candidate}" + break + fi + done +fi +if [ ! -f "${PROTOC_INCLUDE}/google/protobuf/timestamp.proto" ]; then + echo "[proto] failed to locate google/protobuf well-known types; set PROTOC_INCLUDE" >&2 + exit 1 +fi if ! command -v "${PROTOC_BIN}" >/dev/null 2>&1; then echo "[proto] protoc binary not found" >&2