Skip to content

Seg3D resurrection: umbrella tracking issue (build, CI, Qt6, modernization) #423

Description

@dcwhite

Why this issue

Seg3D has not had continuous maintenance since 2021. master's last commit is 2023-04-07 (a typo fix); the last substantive work was February 2022, and the last release was v2.5.1 in May 2021. In the meantime the toolchain moved and the build rotted out from under the repo.

As of today, Seg3D does not configure at all on a current CMake. It fails on lines 27 and 30 of Superbuild/CMakeLists.txt before doing anything else.

This is an umbrella tracking issue. It is deliberately one giant checklist so we can see the whole shape of the problem in one place; individual items will be spun out into sub-issues as they get picked up. Nothing here needs to be done in one go, and Stage 0 alone is most of the value.

The honest framing: this is volunteer effort, so the plan is optimized for getting to a green build fast and then not rotting again, rather than for doing the most interesting work first.


Reproducing the current state

$ cmake ../Superbuild
CMake Error at CMakeLists.txt:27 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

$ cmake ../Superbuild -DCMAKE_POLICY_VERSION_MINIMUM=3.5
CMake Error at CMakeLists.txt:30 (cmake_policy):
  Policy CMP0053 may not be set to OLD behavior because this version of CMake
  no longer supports it.

(Tested with CMake 4.3.3 / AppleClang 17.)

Inventory of what is stale

Component Pinned at Status
CMake minimum 2.8.12 (CMakeLists.txt:27), CMP0053 OLD (:30) Hard failure on CMake ≥ 4
Tetgen SVN from gforge.sci.utah.edu (TetgenExternal.cmake:51) Host is gone — connection times out
Python 3.4.3 (PythonExternal.cmake:32-34) EOL March 2019
Boost 1.67, 1.58 fallback (BoostExternal.cmake:67-69) 2018
Qt Qt5 only, min 5.9/5.12 (Superbuild.cmake:146-155) Qt5 is EOL
ITK v5.2.0 (ITKExternal.cmake:92) current is v5.4.6
Eigen 3.3.7 tarball from eigenteam/eigen-git-mirror Mirror frozen since 2022
C++ standard -std=c++11 (Superbuild.cmake:185)
macOS minimum 10.12 (Superbuild.cmake:47) No Apple Silicon story
Externals pinned to origin/master Data, Freetype, SQLite, ImplicitFunction, Glew, LibPNG, Zlib, Teem, Python Builds are not reproducible

Note that Tetgen is added unconditionally (Superbuild.cmake:262) — there is no option guarding it. The SVN fetch happens at build time, so this surfaces as a build failure rather than a configure failure.

CI is entirely non-functional

All three workflows fail. The most recent runs (January 2026) are all failure or cancelled.

  • linux.yml — targets ubuntu-18.04, a runner image GitHub retired
  • windows.yml — targets windows-2016, VS 2017 generator, win64_msvc2017_64, and builds with BUILD_WITH_PYTHON=OFF so Python is never exercised on Windows
  • mac.yml — symlinks a macOS 10.14 SDK path that does not exist on current runners
  • All three use actions/checkout@v2, jurplel/install-qt-action@v2, and actions/upload-artifact@v2 (the v2 artifact backend was shut down in January 2025 — this is a hard failure regardless of anything else)
  • A dead .travis.yml is still in the tree

Guiding principle: take it from SCIRun

Seg3D and SCIRun already share most of their external dependency fork set:

CIBC-Internal/{freetype, glew, libpng, python, sqlite, zlib}, SCIInstitute/teem, and CIBC-Internal/Seg3DData.

SCIRun has kept these current and has already been through the CMake 4 wall, the Python bump, and the Qt6 migration. It also carries CIBC-Internal/TetGen.git — a live git repository that directly replaces Seg3D's dead gforge SVN checkout.

So a large fraction of Stage 0 is porting SCIRun's Superbuild external files across, not solving new problems. Where SCIRun has an answer, we should take the answer rather than invent a second one.


Stage 0 — Make it build again

Goal: green CI on all three platforms plus a downloadable installer artifact. This is where nearly all the value is. Until this is done, no other contribution to Seg3D can even be evaluated.

CMake unblocking

  • Raise cmake_minimum_required to a 3.16...3.28-style range in Superbuild/CMakeLists.txt and src/CMakeLists.txt
  • Delete cmake_policy(SET CMP0053 OLD); fix any variable-expansion fallout the NEW behavior exposes
  • Audit remaining cmake_policy(... OLD) calls across the tree
  • Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 shims for externals too old to fix upstream (SCIRun uses exactly this in TnyExternal.cmake and OsprayExternal.cmake)
  • Set CMP0135 (DOWNLOAD_EXTRACT_TIMESTAMP) explicitly for URL-based externals
  • Confirm a clean configure end-to-end with no -DCMAKE_POLICY_VERSION_MINIMUM escape hatch at the top level

Dependency rehabilitation

  • Replace the Tetgen SVN external with CIBC-Internal/TetGen.git, or make Tetgen optional and default it off — decide which
  • Bump Python off 3.4.3 (CIBC-Internal/python has newer; align the version with SCIRun's) — closes Upgrade Python version #315
  • Bump Boost; rebase the existing upgrade-externals branch work (see Salvage below) — closes Upgrade boost #174
  • Repoint Eigen away from the dead eigen-git-mirror to a current upstream release
  • Bump ITK 5.2.0 → 5.4.x — relates to Full ITK5 Upgrade #383
  • Port SCIRun's versions of the shared externals (freetype, glew, libpng, sqlite, zlib, teem)
  • Replace every GIT_TAG "origin/master" with a real tag or SHA — a VERSIONS.cmake single source of truth, mirroring SCIRun's dependency-manifest work
  • Audit src/ThirdParty/ (MRC2000IO, MatlabIO, tinyxml, submodules) — decide keep / replace with upstream / delete
  • Resolve the GDCM build failure in Linux build fails on error in ThirdParty/GDCM #417

CI reconstruction

Housekeeping

  • Add a root LICENSE file — GitHub currently reports the repo as unlicensed because the license only lives at src/License.txt
  • Update README.md with build instructions that actually work
  • Triage the 137 open issues; close what the rebuild fixes, label the rest

Stage 1 — Qt6

Qt5 is end-of-life. SCIRun already supports both; copy its approach rather than inventing one.

  • Adopt SCIRun's dual-version pattern — a QT_MIN_VERSION cache variable with a version list and Qt${QT_VERSION_MAJOR} indirection, so Qt5 and Qt6 can coexist during the migration
  • Replace hardcoded Qt5:: link targets with Qt${QT_VERSION_MAJOR}:: (src/CMakeLists.txt:265-270, src/Resources/CMakeLists.txt:93, src/QtUtils/Utils/CMakeLists.txt:98, and others)
  • QGLWidgetQOpenGLWidget (5 files; Renderer.cc and QtRenderWidget.cc are the load-bearing ones) — closes unlink Qt OpenGL module after converting from QGLWidget to QOpenGLWidget #119, relates to Qt 5 OpenGL updates #150
  • QGLFormatQSurfaceFormat (5 files)
  • QGLContextQOpenGLContext (1 file)
  • QRegExpQRegularExpression (5 files)
  • QDesktopWidgetQScreen (2 files)
  • setMarginsetContentsMargins (1 file)
  • Regenerate/verify the 73 .ui files under uic6
  • Verify the Qt bridge layer (src/QtUtils/Bridge/detail/*) against Qt6 signal/slot changes
  • Fix Qt5_PATH not overriding Linux CMake defaults — closes Linux CMake defaults for QT binaries not overwritten by Qt5_PATH #235
  • Resolve Windows build QT #422 (Windows build Qt)

Stage 2 — Modernization

Not blocking anything; do it opportunistically once CI is green and can actually catch regressions.


Stage 3 — Renderer (do not start yet)

15 files still use fixed-function OpenGL (glBegin, glMatrixMode, glPushMatrix, glVertex3), including Renderer.cc, VolumeRendererOcclusion.cc, and most of src/Application/Tools/.

This is blocked on a decision, not on effort. SCIRun is currently evaluating a VTK-based renderer on its own branch. Seg3D has a parallel vtk_rendering branch from 2021. Whether Seg3D goes to modern core-profile GL or to VTK is the same decision as SCIRun's, and it should be made once and applied to both.

  • Decide: modern GL vs. VTK — jointly with the SCIRun renderer decision
  • Separate rendering/viewers from the Qt UI layer — separate rendering and viewers from QT UI layers #413 (worth doing under either outcome)
  • Port or retire the vtk_rendering branch depending on the outcome

Salvage: work that already exists and was never merged

Three people showed up with patches and they were never landed. This is the cheapest work available.

  • PR Simplify build system and add python as dependency #407Simplify build system and add python as dependency (@jcfr). Open since Feb 2022, still mergeable. +56/−121 across 16 files: removes Travis, bumps all Actions, adds concurrency cancellation, makes QT_MIN_VERSION overridable. Should be the first thing merged.
  • PR Use GrowCut now available in ITK #405Use GrowCut now available in ITK (@dzenanz). Deletes vendored code in favour of upstream ITK.
  • PR Better font rendering on OSX #353Better font rendering on OSX (@allywarner).
  • upgrade-externals branch — Boost + Python bumps and boost::bind namespace fixes. 134 files, +2193/−1990. A large fraction of the Boost migration is already written and just needs rebasing.
  • vtk_rendering branch — see Stage 3.
  • Other unmerged branches to triage: openglwidget, font_rendering, debug-renderer, python, osx_double_click, seed_points_preference, reading-LHS-images, implicit-model-kernel-update, implicit-model-layer-option, docs_build, docs-update

Existing issues this umbrella covers

Build and dependencies: #33, #37, #62, #201, #204, #235, #315, #332, #354, #367, #368, #373, #414, #415, #417, #422
Qt and rendering: #119, #150, #413
Boost and C++: #95, #142, #174
ITK: #383
Python: #102, #103, #105, #177, #351, #411

Several of these are ten years old and describe exactly the problems above. They should be linked as sub-issues rather than duplicated.


Not rotting again

The technical debt above accumulated because maintenance stopped and nothing in the repo noticed. The rebuild should leave behind guardrails that fail loudly:

  • Every dependency pinned to an explicit version in one file, so "what changed?" is always answerable
  • CI that builds all three platforms on every PR, so breakage surfaces in days rather than years
  • A scheduled build so the repo notices rot even during quiet periods with no PRs
  • A build that works from a clean checkout with documented prerequisites, so a new contributor's first hour is not spent on archaeology
  • Shared infrastructure kept genuinely shared with SCIRun, so dependency maintenance is done once rather than twice

Open questions

  • Is Tetgen still needed at all, or can it be dropped?
  • Which Qt6 minimum should we target, and do we keep Qt5 support after the migration or cut it?
  • Do the vendored src/ThirdParty/ components have live upstreams worth tracking?
  • Renderer direction — see Stage 3
  • What is the minimum platform matrix we are willing to commit to supporting?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions