From 93f88882542e705323d035d3f5b3fe5ad5cb5f81 Mon Sep 17 00:00:00 2001 From: John McKisson Date: Tue, 10 Nov 2026 11:01:48 -0500 Subject: [PATCH] Fix CI: fall back to Qt's archive, use bundled md4c on Windows Qt moved 6.9.1 from official_releases/ to archive/, so the SCXML source download 404s and the Linux and macOS jobs fail. Try official_releases/ first and fall back to archive/, in both places that download it. On Windows, QT_VERSION follows MSYS2's qt6-base, now 6.12.0, and building that from source against MSYS2's md4c 0.6.0 trips a static_assert in qtextmarkdownimporter.cpp. Build with the bundled md4c instead. Co-Authored-By: Claude Opus 5.5 --- CI/build-qt-statemachine.sh | 22 ++++++++++++++++------ CI/compile-qt-win.sh | 20 +++++++++++++++++--- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/CI/build-qt-statemachine.sh b/CI/build-qt-statemachine.sh index 91726f4..10a5435 100644 --- a/CI/build-qt-statemachine.sh +++ b/CI/build-qt-statemachine.sh @@ -30,14 +30,24 @@ cd "$BUILD_DIR" # Download Qt SCXML source from official Qt releases echo "=== Downloading Qt SCXML source from official releases ===" QT_MINOR="${QT_VERSION%.*}" -SCXML_URL="https://download.qt.io/official_releases/qt/${QT_MINOR}/${QT_VERSION}/submodules/qtscxml-everywhere-src-${QT_VERSION}.tar.xz" - -if [[ ! -f "qtscxml-everywhere-src-${QT_VERSION}.tar.xz" ]]; then - echo "Downloading $SCXML_URL" - wget -q "$SCXML_URL" || { +SCXML_TARBALL="qtscxml-everywhere-src-${QT_VERSION}.tar.xz" +SCXML_PATH="qt/${QT_MINOR}/${QT_VERSION}/submodules/${SCXML_TARBALL}" + +# Qt moves older releases from official_releases/ to archive/ without notice, +# so fall back to the archive rather than breaking when that happens. +if [[ ! -f "${SCXML_TARBALL}" ]]; then + for base in official_releases archive; do + SCXML_URL="https://download.qt.io/${base}/${SCXML_PATH}" + echo "Downloading $SCXML_URL" + if wget -q "$SCXML_URL"; then + break + fi + rm -f "${SCXML_TARBALL}" + done + if [[ ! -f "${SCXML_TARBALL}" ]]; then echo "Failed to download Qt SCXML source" exit 1 - } + fi fi # Extract the source diff --git a/CI/compile-qt-win.sh b/CI/compile-qt-win.sh index d7ffa21..857536d 100644 --- a/CI/compile-qt-win.sh +++ b/CI/compile-qt-win.sh @@ -23,7 +23,13 @@ export CMAKE_SUPPRESS_DEVELOPER_WARNINGS=ON -qt-pcre \ -openssl-linked \ -- \ - -DFEATURE_system_pcre2=OFF + -DFEATURE_system_pcre2=OFF \ + -DFEATURE_system_textmarkdownreader=OFF + +# FEATURE_system_textmarkdownreader=OFF: use Qt's bundled md4c. QT_VERSION +# follows whatever qt6-base MSYS2 ships, and its system md4c can be a release +# whose flag values Qt's qtextmarkdownimporter.cpp static_assert rejects (Qt +# 6.12.0 vs md4c 0.6.0). A static build has no use for the system copy anyway. echo "=== Compiling Qt ===" cmake --build . --parallel @@ -46,9 +52,17 @@ else cd qt-scxml-build # Try downloading from Qt's additional libraries (this may or may not work) + # Qt moves older releases from official_releases/ to archive/ without + # notice, so fall back to the archive rather than breaking when that happens. QT_MINOR="${QT_VERSION%.*}" - wget -q "https://download.qt.io/official_releases/qt/${QT_MINOR}/${QT_VERSION}/submodules/qtscxml-everywhere-src-${QT_VERSION}.tar.xz" || \ - echo "Could not download ScXML from additional libraries" + SCXML_TARBALL="qtscxml-everywhere-src-${QT_VERSION}.tar.xz" + for base in official_releases archive; do + if wget -q "https://download.qt.io/${base}/qt/${QT_MINOR}/${QT_VERSION}/submodules/${SCXML_TARBALL}"; then + break + fi + rm -f "${SCXML_TARBALL}" + done + [[ -f "${SCXML_TARBALL}" ]] || echo "Could not download ScXML from official_releases or archive" if [[ -f "qtscxml-everywhere-src-${QT_VERSION}.tar.xz" ]]; then echo "Found ScXML source, building..."