# Disable LTO - causes linker issues with system ITK/VTK on F43 %global _lto_cflags %{nil} # Limit parallelism to prevent OOM on builds %global _smp_mflags -j4 # DO NOT STRIP. CppMicroServices embeds each module's resources (interaction # state machines, config XML, ...) by APPENDING a zip archive after the ELF data # -- usFunctionEmbedResources() runs as a POST_BUILD step on the linked .so. # rpm's install-post strip rewrites the file from its section headers and # silently discards everything trailing, so all 56 libMitk*.so lose their entire # resource archive. Verified with a controlled test: a .so with an appended zip # went 11755 -> 10216 bytes across strip, and the embedded name went from present # to absent. # The visible symptom is not an error at build time but a broken application: # Unable to create editor ID org.mitk.editors.stdmultiwidget: # Resource not valid. State machine pattern not found: DisplayInteraction.xml # i.e. the Workbench's main image viewer never initialises. Also 24 "Could not # read :/..." warnings for icons and stylesheets. # Cost is no -debuginfo/-debugsource subpackages; correctness wins here. %global debug_package %{nil} %global __brp_strip %{nil} %global __brp_strip_static_archive %{nil} %global __brp_strip_comment_note %{nil} # Run MITK's own test suites. OFF by default: the suites need mitk-data (146 MB # of reference images, segmentations and rendering baselines) and add # considerably to build time, so the shipped RPM is built without them. Enable # with "--with testing" for a validation build. # 38 segmentation tests alone live in Modules/{Segmentation,Multilabel, # SurfaceInterpolation,ContourModel}/Testing -- note the capital-T "Testing" # directory name the older modules use. %bcond_with testing Name: mitk Version: 2026.06 Release: 40%{?dist} Summary: Medical Imaging Interaction Toolkit License: BSD-3-Clause URL: https://www.mitk.org/ Source0: https://github.com/MITK/MITK/archive/v%{version}/MITK-%{version}.tar.gz # CMake find modules for system libraries that lack CMake config files Source1: FindANN.cmake Source2: FindQt6Qwt6.cmake Source3: Findlz4.cmake # MITK's superbuild builds CppUnit itself, so upstream ships no find module and # CMakeLists.txt:1021 falls through to CONFIG mode. Fedora's cppunit-devel has # only pkg-config, so BUILD_TESTING=ON cannot configure without this. Source4: FindCppUnit.cmake # MITK parses "Package|Component" PACKAGE_DEPENDS but never verifies the # component exists, so a module is enabled whenever the package is found and # only fails at compile time on missing headers. Affects MitkXNAT, which needs # CTK's CTKXNATCore -- a component CTK cannot currently build for Qt6 (its # ctkXnatAPI.cpp still uses the removed Qt5 QtScript module). Drafted, NOT filed: # docs/upstream/mitk-workbench-packaging.md item A1. (This line said "Sent upstream" until # 2026-10-05; the 2026-08-04 commit only said "Going upstream" and no filed issue or PR is # recorded anywhere.) Patch0: mitk-verify-ctk-components.patch # MITK_CREATE_MODULE_TESTS() lets mitk_create_executable() decline to build a # test driver when a PACKAGE_DEPENDS entry is unmet, then unconditionally calls # set_property() on the target that was never created -- turning a skip into a # hard configure failure for the whole project. Modules/Multilabel/Testing # declares PACKAGE_DEPENDS DCMQI, so any build without DCMQI cannot configure # with BUILD_TESTING=ON. Drafted, NOT filed: docs/upstream/mitk-workbench-packaging.md # item A2 (same correction as the patch above). Patch1: mitk-guard-testdriver-target.patch # mitkEnvironment.cpp calls std::remove(first, last, value) without including # . MITK's precompiled headers pull it in transitively, so it only # surfaces with PCH off (found by 2026.06-28 on aarch64): overload resolution # then finds ::remove(const char*) from and the TU fails. To be sent # upstream. Patch2: mitk-environment-include-algorithm.patch # GCC 16 on aarch64 segfaults compiling mitkTransferFunctionProperty.cpp at # nlohmann's from_json_tuple_impl for std::pair # (adl_serializer.hpp:31:30), reached via json::get_to(std::pair). The gdb # backtrace shows the crash is in the diagnostic printer, while the aarch64 backend # emits a psABI note about returning that std::pair; x86_64 never emits the note. # -Wno-psabi also avoids it. Read the pair element-wise instead: identical result, # and no function returning std::pair is instantiated. This is an # arch-independent source change and more targeted than a global -Wno-psabi. # Report: docs/upstream/gcc16-aarch64-nlohmann-pair-ice.md. Patch3: mitk-transferfunction-gcc16-ice.patch # InsightToolkit5 5.4.7-4 and later build against system Eigen and no longer # install /usr/include/ITK-5.4/itkeigen/. MITK 2026.06 includes that internal # path in 10 places (SurfaceInterpolation, Classification/CLCore, CLUtilities), # so it stops compiling against those ITKs. # # Use ITK's own portable spelling rather than hardcoding : # itk_eigen.h expands ITK_EIGEN(Dense) to Eigen/Dense when ITK_USE_SYSTEM_EIGEN # is defined and to itkeigen/Eigen/Dense when it is not, so one source builds # against both. This matters because the chroots disagree: f44 serves ITK # 5.4.7-6 (system Eigen) while f45 still serves 5.4.7-2 (bundled). A hardcoded # would break the bundled case -- there ITKEigen3_INCLUDE_DIRS is # just /usr/include/ITK-5.4, so /usr/include/eigen3 never reaches the compile # line. The 4 includes of itkeigen/Eigen/src/Core/Array.h become # ITK_EIGEN(Core); Eigen does not support including its src/ headers directly. # Found by neurofedora-t2 rebuilding mitk against ITK 5.4.7-7 (build 10994447). Patch4: mitk-system-eigen-includes.patch # MITK embeds a heavily modified fork of CppMicroServices (v2.99.0) in # Modules/CppMicroServices/. This is NOT the same as the standalone # CppMicroServices 3.x in Fedora; it cannot be unbundled. Provides: bundled(CppMicroServices) = 2.99.0 # Core build tools BuildRequires: cmake >= 3.22 BuildRequires: gcc-c++ BuildRequires: ninja-build BuildRequires: make BuildRequires: git # The Big Two (from mhough/neurofedora COPR) # Fedora's InsightToolkit is stuck at 4.13.3; MITK requires ITK 5.x # Fedora's VTK is 9.2.6; MITK needs 9.3+ BuildRequires: InsightToolkit5-devel >= 5.4 BuildRequires: vtk-devel >= 9.5 # Qt6 (MITK requires >= 6.6) BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qtbase-private-devel BuildRequires: qt6-qtsvg-devel BuildRequires: qt6-qttools-devel BuildRequires: qt6-qt5compat-devel BuildRequires: qt6-qtwebengine-devel BuildRequires: qt6-qtdeclarative-devel BuildRequires: qt6-qtscxml-devel BuildRequires: qt6-linguist # System libraries to unbundle from MITK superbuild BuildRequires: boost-devel BuildRequires: dcmtk-devel >= 3.6.7 BuildRequires: gdcm-devel BuildRequires: hdf5-devel BuildRequires: poco-devel BuildRequires: nlohmann-json-devel BuildRequires: tinyxml2-devel BuildRequires: ann-devel BuildRequires: lz4-devel BuildRequires: zlib-devel BuildRequires: eigen3-devel BuildRequires: cpp-httplib-devel BuildRequires: qwt-qt6-devel # VTK transitive deps (VTK's cmake config requires these at find_package time) BuildRequires: freetype-devel BuildRequires: pugixml-devel BuildRequires: fmt-devel BuildRequires: utf8cpp-devel BuildRequires: PEGTL-devel BuildRequires: jsoncpp-devel BuildRequires: python3-devel BuildRequires: pybind11-devel BuildRequires: python3-numpy # strip the build-tree RUNPATH off the pybind11 extension in %%install BuildRequires: patchelf BuildRequires: json-devel BuildRequires: xz-devel BuildRequires: libogg-devel BuildRequires: libtheora-devel BuildRequires: sqlite-devel BuildRequires: libharu-devel BuildRequires: proj-devel BuildRequires: libxml2-devel # Other build dependencies BuildRequires: openssl-devel >= 3.0 BuildRequires: tbb-devel BuildRequires: pcre2-devel BuildRequires: libXt-devel BuildRequires: libXext-devel BuildRequires: libXrender-devel BuildRequires: mesa-libGL-devel BuildRequires: libglvnd-devel # ITK transitive deps (needed for cmake find_package) BuildRequires: fftw-devel BuildRequires: libjpeg-turbo-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel BuildRequires: expat-devel BuildRequires: double-conversion-devel BuildRequires: openjpeg2-devel BuildRequires: libminc-devel # --- MITK Workbench (BlueBerry) ------------------------------------------ # CTK provides the plugin framework BlueBerry and every org.mitk.* plugin is # built on; 0.19 is the first release that ships libCTKPluginFramework.so. # (qwt-qt6-devel and qt6-qtwebengine-devel are already required above, for the # plotting widgets and the welcome plugin's start page respectively.) BuildRequires: ctk-devel >= 2026.01.26-0.26 # CTKConfig.cmake does an unconditional find_dependency(QtTesting) (CTK is built # with CTK_USE_QTTESTING=ON for Slicer's GUI tests), so every consumer of # ctk-devel must have this present or find_package(CTK) fails outright. # 3dslicer.spec carries the same BuildRequires for the same reason. BuildRequires: qttesting-devel # ACVD backs the remeshing plugin in the Default configuration. BuildRequires: acvd-devel >= 4.0-3 %if %{with testing} # MITK's tests resolve every input relative to MITK_DATA_DIR. Upstream git-clones # this at configure time, which a build root cannot do; the packaged copy is # pointed at instead (CMakeExternals/MITKData.cmake takes the # mitkMacroEmptyExternalProject path whenever MITK_DATA_DIR is already defined). BuildRequires: mitk-data # MITK's test suites are built on CppUnit. BuildRequires: cppunit-devel # The GUI/rendering suites need a display. BuildRequires: xorg-x11-server-Xvfb # mitkPythonBindingsTest runs MITK's pytest suite inside a venv and otherwise # pip-installs these from the network, which a build root does not have. BuildRequires: python3-pytest BuildRequires: python3-jsonschema %endif # Pin the exact VTK ABI this package was built against. VTK freezes its soname at # libvtk*.so.1 across all of 9.x, so rpm cannot tell 9.5 from 9.6 from 9.7: a consumer # built against one installs cleanly against another and fails at LOAD with undefined # symbols. A >= floor does not help -- 9.7.0 satisfies >= 9.6.2 -- so this is an exact # match. %%vtk_abi comes from vtk-devel's macros.vtk, so it re-pins on every rebuild. # # The missing-macro check lives in %%build, deliberately, NOT at parse time. A # parse-time %%error cannot distinguish "COPR is generating the SRPM" from "this is a # real buildroot": rpkg srpm parses the spec with no buildroot and therefore no # vtk-devel, so a parse-time guard killed every SCM build of every guarded package # before any chroot existed (python-simpleitk 10980296 failed in 0 minutes with # "can't parse specfile"). Expanding to UNSET keeps the SRPM parse alive, and the # %%build test still fails loudly in a buildroot lacking vtk-devel, so no RPM carrying # the placeholder can ever be produced. Requires: vtk(abi) = %{?vtk_abi}%{!?vtk_abi:UNSET} # CTK, same disease as VTK but a different mechanism. CTK's sonames are frozen # at .so.0.1 across every snapshot, so the automatic soname dependencies rpm # generates (libCTKCore.so.0.1 and nine siblings) are satisfied by a CTK built # months earlier. dnf therefore has no reason to upgrade CTK, and a host ends up # running this Slicer against a CTK that lacks the symbols it needs -- with no # install-time error. Observed: 206 of 246 Slicer libraries unresolved against # the January snapshot. %%ctk_ver comes from ctk-devel's macros.ctk, so this # floor tracks the CTK actually built against. A floor, not an exact match: a # newer CTK is fine, an older one is not. Requires: ctk%{?_isa} >= %{?ctk_ver}%{!?ctk_ver:UNSET} # Pin the exact DCMTK snapshot this package was built against. dcmtk is packaged from git # HEAD and upstream's DCMTK_ABI_VERSION stays 20 across snapshots, so every snapshot installs # libdcm*.so.20 and rpm cannot tell them apart: a consumer built against one installs cleanly # against another and fails at load with undefined symbols (dcmqi on f45, with OverlapUtil). # %%dcmtk_abi comes from dcmtk-devel's macros.dcmtk, so it re-pins on every rebuild. The # missing-macro check is in %%build, not at parse time, for the reason spelled out at the vtk # pin in 3dslicer.spec: an SRPM parse has no buildroot. Requires: dcmtk(abi) = %{?dcmtk_abi}%{!?dcmtk_abi:UNSET} %description The Medical Imaging Interaction Toolkit (MITK) is a free open-source software system for development of interactive medical image processing software. MITK combines the Insight Toolkit (ITK) and the Visualization Toolkit (VTK) with an application framework for medical imaging. This package provides the core MITK libraries. The end-user application is in the mitk-workbench subpackage, and the Python bindings in python3-mitk. %package devel Summary: Development files for MITK Requires: %{name}%{?_isa} = %{version}-%{release} Requires: InsightToolkit5-devel Requires: vtk-devel Requires: boost-devel Requires: dcmtk-devel %description devel Development files, headers, and CMake config for building applications and plugins that use the MITK libraries. %package workbench Summary: MITK Workbench application Requires: %{name}%{?_isa} = %{version}-%{release} # Was hardcoded at >= 2026.01.26-0.26, which by now permits a CTK far older than # the one the Workbench is built against. Track ctk-devel's macros.ctk instead. Requires: ctk-plugin-framework%{?_isa} >= %{?ctk_ver}%{!?ctk_ver:UNSET} Requires: hicolor-icon-theme %description workbench The MITK Workbench is the end-user application built on MITK's BlueBerry plugin framework. It provides the data manager, multi-widget image viewer, DICOM browser, segmentation, measurement, volume visualization, movie maker and remeshing tools. %package -n python3-mitk Summary: Python bindings for MITK (built against system Python 3.14) Requires: mitk%{?_isa} = %{version}-%{release} %description -n python3-mitk pybind11-based Python bindings for the Medical Imaging Interaction Toolkit, built against the system Python and ITK/VTK/DCMTK (no bundled libraries). %prep %autosetup -n MITK-%{version} -p1 # UPSTREAM WORKAROUND: Wrapping/Python/mitk/CMakeLists.txt sets # mitk_PACKAGE_DIR = ${Python3_SITEARCH}/mitk # which writes the module into the live interpreter site-packages at build # time (outside the buildroot) and desyncs from the install rule. Stage it in # the build tree instead, where install(DIRECTORY ${MITK_BINARY_DIR}/python/) # picks it up. (Not verified as reported: no issue is recorded; treat as unfiled.) sed -i 's|set(mitk_PACKAGE_DIR "${Python3_SITEARCH}/mitk")|set(mitk_PACKAGE_DIR "${MITK_BINARY_DIR}/python/mitk")|' Wrapping/Python/mitk/CMakeLists.txt # Install CMake find modules for system libs without CMake configs cp %{SOURCE1} CMake/FindANN.cmake cp %{SOURCE2} CMake/FindQt6Qwt6.cmake cp %{SOURCE3} CMake/Findlz4.cmake cp %{SOURCE4} CMake/FindCppUnit.cmake # Fix ZLIB config mode failure on Fedora (zlib-ng-compat ships a broken config # that references ZLIB::ZLIBSTATIC which doesn't exist without static libs). # Pre-find ZLIB via module mode and mark as found before the EP loop runs. sed -i '/^get_property(MITK_EXTERNAL_PROJECTS GLOBAL PROPERTY MITK_EXTERNAL_PROJECTS)/i \ find_package(ZLIB REQUIRED MODULE)\ set(ZLIB_FOUND TRUE)' CMakeLists.txt # Also prevent the EP loop from re-finding ZLIB in CONFIG mode by removing ZLIB # from the external projects list. sed -i '/^get_property(MITK_EXTERNAL_PROJECTS GLOBAL PROPERTY MITK_EXTERNAL_PROJECTS)/a \ list(REMOVE_ITEM MITK_EXTERNAL_PROJECTS ZLIB)' CMakeLists.txt # Fix ITK PhilipsREC IO factory: MITK defines ITK_IO_FACTORY_REGISTER_MANAGER # which triggers auto-registration of ALL IO factories including PhilipsREC. # But MitkCore doesn't list IOPhilipsREC in PACKAGE_DEPENDS, so the factory # registration symbol is unresolved. Add it to the IO modules list. sed -i 's|IOBioRad+IOBMP|IOBioRad+IOBMP+IOPhilipsREC|' Modules/Core/CMakeLists.txt # Fix cpp-httplib API break: Fedora ships 0.30+ which renamed # MultipartFormDataItems → UploadFormDataItems (same struct, just renamed) # (2026.06: mitkMonaiLabelTool.cpp was refactored away and the httplib # MultipartFormDataItems->UploadFormDataItems rename landed upstream — sed dropped.) # Fix LZ4 target name: VTK's FindLZ4 creates LZ4::LZ4 but MITK # expects LZ4::lz4_shared from its superbuild sed -i 's/LZ4::lz4_shared/LZ4::LZ4/g' Modules/DataTypesExt/CMakeLists.txt # Do not run Qt's deploy tool. mitkInstallRules.cmake:89 calls # mitkFunctionDeployQt() for every executable carrying the MITK_DEPLOY_QT # property, which mitkFunctionCreateBlueBerryApplication.cmake:92 sets on the # Workbench. That path exists to build a RELOCATABLE BUNDLE: it copies Qt's own # plugins into bin/plugins/ and rewrites their RPATH to $ORIGIN/../../ so the # tree can be moved anywhere. Wrong for a distro package, which links the system # Qt, and it hard-fails on it: # CMake Error at Qt6CoreDeploySupport.cmake:139 (file): # file RPATH_SET could not write new RPATH: $ORIGIN/../../ # to .../usr/bin/plugins/sqldrivers/libqsqlite.so # No valid ELF RPATH or RUNPATH entry exists in the file # because Fedora's libqsqlite.so correctly has no RPATH to rewrite. Disabling it # at the property is cleaner than deleting the bundled copies afterwards -- and # note %%install's bin/plugins cleanup only removes Qt's per-category SUBdirs, # never the flat liborg_*.so files, which are MITK's own plugins. sed -i 's|set_target_properties(${_APP_NAME} PROPERTIES MITK_DEPLOY_QT TRUE)|set_target_properties(${_APP_NAME} PROPERTIES MITK_DEPLOY_QT FALSE)|' \ CMake/mitkFunctionCreateBlueBerryApplication.cmake grep -q 'MITK_DEPLOY_QT FALSE' CMake/mitkFunctionCreateBlueBerryApplication.cmake \ || { echo "ERROR: MITK_DEPLOY_QT disable did not apply"; exit 1; } # MITK 2026.06 upstream bug: Modules/PET/CMakeLists.txt adds its test/ subdir # UNCONDITIONALLY (Modules/Core correctly wraps it in if(BUILD_TESTING)). That test # dir includes cmake/PETIBSIData.cmake, which FetchContent-git-clones an IBSI PET # dataset (oncoray/suv_computation.git) at CONFIGURE time. In mock/COPR there is no # network, so configure dies -- and downloading sources at build time violates Fedora # policy regardless. Guard it exactly like Core so BUILD_TESTING=OFF really skips it. sed -i 's|^add_subdirectory(test)$|if(BUILD_TESTING)\n add_subdirectory(test)\nendif()|' \ Modules/PET/CMakeLists.txt # MITK 2026.06 calls OFTime::hasTimeZone() (Modules/DICOM/src/mitkDICOMTimeUtil.cpp). # Decide by FEATURE TEST against the DCMTK actually in the buildroot, not by version. # # Measured 2026-09-27, and this replaces a version test that never worked: # # * The old guard emitted "#if defined(DCMTK_VERSION_NUMBER) && ... > 369". # dcmtk does not define DCMTK_VERSION_NUMBER AT ALL -- 0 definitions across # 1044 headers in dcmtk-devel. So the #if was always false, the block was # permanently disabled, and every green build got the right outcome from dead # reasoning. The names that DO exist, both needed to find this: # dcmdata/dcuid.h:351 #define OFFIS_DCMTK_VERSION_NUMBER PACKAGE_VERSION_NUMBER # config/osconfig.h #define PACKAGE_VERSION_NUMBER 370 # OFFIS_DCMTK_VERSION_NUMBER is the spelling a consumer would write; # PACKAGE_VERSION_NUMBER is only what it expands to. Grepping for the latter # alone does not lead you to dcuid.h. (Refinement from rpi-the-great.) # # * Do NOT "fix" that by renaming the macro. This repo's own dcmtk 3.7.0-4 -- # which SHADOWS Fedora's 3.6.9 on f44 and on both rawhide arches -- reports # PACKAGE_VERSION_NUMBER 370, yet its ofstd/oftime.h declares no hasTimeZone # (only getTimeZone(), line 276). hasTimeZone exists solely in DCMTK git # master. A renamed macro would therefore ENABLE a call to a method that does # not exist and break the build on every chroot we ship. # # Testing for the method itself is correct on all of them, and self-correcting if # DCMTK ever releases it. When absent, drop the block -- upstream's documented # fallback ("leave the value as-is ... keeps the common single-timezone path # bit-identical"). if grep -q 'hasTimeZone' %{_includedir}/dcmtk/ofstd/oftime.h; then echo "DCMTK provides OFTime::hasTimeZone() -- leaving the UTC block intact" else echo "DCMTK lacks OFTime::hasTimeZone() -- removing the UTC-normalization block" python3 - Modules/DICOM/src/mitkDICOMTimeUtil.cpp <<'PYFIX' import sys p = sys.argv[1] src = open(p).read() old = """ if (time.getTime().hasTimeZone()) { const double tzHours = time.getTime().getTimeZone(); tp -= milliseconds{std::llround(tzHours * 3600.0 * 1000.0)}; }""" new = """ // Removed by the Fedora package: this DCMTK has no OFTime::hasTimeZone(). // Upstream's fallback is to leave the value as-is, which keeps the common // single-timezone path bit-identical.""" assert old in src, "hasTimeZone block not found -- upstream changed it" open(p, "w").write(src.replace(old, new, 1)) print("hasTimeZone UTC block removed") PYFIX fi %if %{with testing} # Validation-build-only test adjustments. None of these change the shipped binaries. # # mitkIOUtilTest::TestUtf8 opens the data file with std::fstream::open(path), whose # default mode is in|out. The packaged data under %%{_datadir}/mitk-data is root-owned # and read-only, so open() fails with EACCES and is_open() asserts. (strace: # openat(".../UTF-8/\303\204.nrrd", O_RDWR) = -1 EACCES.) The test only reads it. grep -c '^ file.open(path);$' Modules/Core/test/mitkIOUtilTest.cpp | grep -qx 1 || \ { echo "mitkIOUtilTest fstream open line not found -- upstream changed it"; exit 1; } sed -i 's|^ file.open(path);$| file.open(path, std::ios::in);|' Modules/Core/test/mitkIOUtilTest.cpp # Without OFTime::hasTimeZone() the UTC block above is removed, so the two subtests # that assert UTC normalisation cannot pass; drop exactly those two. if ! grep -q 'hasTimeZone' %{_includedir}/dcmtk/ofstd/oftime.h; then sed -i -e '/MITK_TEST(Duration_MixedTimeZone_NormalizedToUTC);/d' \ -e '/MITK_TEST(Duration_FractionalTimeZone_NormalizedToUTC);/d' \ Modules/DICOM/test/mitkDICOMTimeUtilTest.cpp ! grep -q 'MixedTimeZone_NormalizedToUTC);\|FractionalTimeZone_NormalizedToUTC);' \ Modules/DICOM/test/mitkDICOMTimeUtilTest.cpp fi %endif # Boost 1.87+ removed boost::detail::lcast_get_precision(). # It always returned std::numeric_limits::max_digits10; substitute that. sed -i 's|boost::detail::lcast_get_precision<\([A-Za-z_][A-Za-z0-9_]*\)>()|std::numeric_limits<\1>::max_digits10|g' \ Modules/Core/include/mitkLexicalCast.h grep -q '^#include ' Modules/Core/include/mitkLexicalCast.h || \ sed -i '0,/^#include/{s|^#include|#include \n#include|}' Modules/Core/include/mitkLexicalCast.h # Remove bundled libraries that we use from system # (Keep CppMicroServices - it's a modified fork we must bundle) # VTK 9.6 (F44 system VTK overrides our COPR 9.5.2): removed # vtkCutter::GetCellTypeDimensions(unsigned char*) — deprecated in 9.4 # with replacement hint "Use vtkCellTypes::GetDimension(type) instead." # Replace the static buffer-fill with an inline loop using the new API, # and pull in for the declaration. # (2026.06: Modules/MapperExt/src/vtkPointSetSlicer.cxx was removed upstream — # the vtkCutter::GetCellTypeDimensions VTK9 workaround is no longer needed.) # MitkCore enables ITK_IO_FACTORY_REGISTER_MANAGER, which generates a # header listing every IO factory in ITK_MODULES_ENABLED. Our COPR # InsightToolkit5 ships MGHIO, IOScanco and ITKIODCMTK (needed by # 3D Slicer), so mitkCoreActivator.cpp references e.g. # itk::MGHImageIOFactoryRegister__Private() # But MITK's PACKAGE_DEPENDS parser auto-prefixes "ITK" onto component # names, turning "MGHIO" into "ITKMGHIO" which isn't a real ITK # component — so the libraries don't end up on the link line. Add them # directly, bypassing the parser. (Surfaced by build 10525253.) cat >> Modules/Core/CMakeLists.txt <<'EOF' # Fedora packaging patch: link IO factories autoinited by # ITK_IO_FACTORY_REGISTER_MANAGER but missing from MitkCore's # PACKAGE_DEPENDS due to the ITK-prefix parser limitation. target_link_libraries(MitkCore PRIVATE MGHIO IOScanco ITKIODCMTK) EOF # VTK 9.6: vtkVectorOperators.h was removed; the operators were merged # into vtkVector.h. Two MITK gizmo sources still include the old header. # Surfaced by build 10525366 (-9 advanced past the link error). sed -i 's|#include |#include |' \ Modules/Gizmo/src/mitkGizmoInteractor.cpp \ Modules/Gizmo/src/mitkGizmoMapper2D.cpp # MITK 2025.12.2's CMake has NO install(TARGETS ...) for module libraries. # Upstream only installs the Workbench bundle via MITK_INSTALL_TARGETS # (EXECUTABLES Workbench GLOB_PLUGINS), but we build with BUILD_WORKBENCH # off (BlueBerry/CTK aren't available for Qt6 on Fedora), so cmake_install # produces only stray Qt6 WebEngine bundles — no libMitk*.so are copied. # Append a bulk install at the end of root CMakeLists.txt using the # MITK_MODULE_TARGETS global property that mitk_create_module already # populates. Surfaced by build 10525956: compile OK, %%files saw empty # buildroot. cat >> CMakeLists.txt <<'EOF' # ---- Fedora packaging: install module libraries + headers ---- # No install(EXPORT) — MITK's mitk_create_module uses raw paths in # target_include_directories (no BUILD_INTERFACE/INSTALL_INTERFACE # generator expressions), which cmake rejects in an export set. # find_package(MITK) support would require patching every module's # include declaration; defer that. For now, just install the libs # and headers so packages downstream can link via -lMitkCore etc. get_property(_mitk_install_targets GLOBAL PROPERTY MITK_MODULE_TARGETS) if(_mitk_install_targets) install(TARGETS ${_mitk_install_targets} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) foreach(_t ${_mitk_install_targets}) get_target_property(_src ${_t} SOURCE_DIR) if(_src AND EXISTS ${_src}/include) install(DIRECTORY ${_src}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mitk) endif() endforeach() endif() EOF %build # dcmtk_abi comes from dcmtk-devel's macros.dcmtk. Absent means the buildroot has a dcmtk-devel # that predates the snapshot, and the Requires above would carry the UNSET placeholder. test -n "%{?dcmtk_abi}" || { echo "ERROR: dcmtk_abi undefined - needs the dcmtk-devel that ships macros.dcmtk" >&2; exit 1; } # vtk_abi comes from vtk-devel's macros.vtk. Absent means BuildRequires: vtk-devel is # missing, and the Requires above would ship as the vacuous "vtk(abi) = UNSET". test -n "%{?vtk_abi}" || { echo "ERROR: vtk_abi undefined - add 'BuildRequires: vtk-devel'" >&2; exit 1; } # Same for ctk_ver, from ctk-devel's macros.ctk. Absent means the floor above # would ship as ">= UNSET", which rpm happily satisfies with anything. test -n "%{?ctk_ver}" || { echo "ERROR: ctk_ver undefined - add 'BuildRequires: ctk-devel'" >&2; exit 1; } # --- GCC 15 / Fedora 43 Fixes --- # Strip -g/-grecord-gcc-switches along with -flto=auto. We cannot let rpm strip # these binaries (it would destroy the appended CppMicroServices resource # archives -- see the note at the top of this spec), so DWARF that -g emits would # otherwise stay in the shipped libraries forever: 2026.06-17 built that way came # to 347 MB for the main package against 21 MB stripped. With no -debuginfo # subpackage there is nothing to consume the debug info anyway. %global mitk_cflags %(echo "%{optflags}" | sed -e 's/-flto=auto//' -e 's/-grecord-gcc-switches//' -e 's/ -g / /g' -e 's/ -g$//') export CXXFLAGS="%{mitk_cflags} -include cstdint -Wno-error=template-id-cdtor -Wno-error=unused-but-set-variable -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=deprecated-declarations" export CFLAGS="%{mitk_cflags} -std=gnu17" # Unset env vars to prevent Conda/system tool interference unset CC CXX LDFLAGS CONDA_PREFIX CONDA_DEFAULT_ENV CMAKE_PREFIX_PATH PYTHONPATH LD_LIBRARY_PATH %cmake -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_CXX_STANDARD_REQUIRED=ON \ %ifarch aarch64 `# gcc 16 on aarch64 ICEs (cc1plus segfault) while running CMake's C++` \ `# module dependency scan over Modules/Core/src/DataManagement/` \ `# mitkTransferFunctionProperty.cpp, instantiating nlohmann's from_json` \ `# for std::pair -- crash point is` \ `# /usr/include/nlohmann/adl_serializer.hpp:31:30 in the` \ `# -fmodules -fdeps-format=p1689r5 invocation. Turning the scan off` \ `# skips that pass entirely; MITK does not use C++20 modules.` \ `# (Not the fix: the ICE is in printing the aarch64 psABI note; see Patch3.)` \ -DCMAKE_CXX_SCAN_FOR_MODULES=OFF \ %endif -DBUILD_SHARED_LIBS=ON \ `# MITK bundles qtsingleapplication as a STATIC lib. With BlueBerry ON,` \ `# libMitkAppUtil.so links it -- the first shared consumer it has ever had --` \ `# and ld rejects it: "relocation R_X86_64_PC32 against symbol` \ `# QByteArray::_empty can not be used when making a shared object".` \ `# Its objects are compiled without PIC and BUILD_SHARED_LIBS does not apply` \ `# to a target declared STATIC. Harmless before the Workbench, since nothing` \ `# linked it into a .so; %{_libdir}/libqtsingleapplication.a in -devel is` \ `# unaffected either way.` \ -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \ %if %{with testing} -DBUILD_TESTING=ON \ -DMITK_DATA_DIR=%{_datadir}/mitk-data \ `# Modules/PET's test suite FetchContent-git-clones an IBSI DRO dataset at` \ `# CONFIGURE time. No network in a build root, and downloading sources at` \ `# build time is against policy regardless. Upstream provides the switch;` \ `# the affected test skips itself at runtime when the data is absent.` \ -DMITK_PET_DOWNLOAD_IBSI_DATA=OFF \ %else -DBUILD_TESTING=OFF \ %endif -DMITK_BUILD_EXAMPLES=OFF \ \ -DCMAKE_MODULE_PATH=%{_builddir}/MITK-%{version}/CMake \ -DMITK_USE_SUPERBUILD=OFF \ `# Default = the plain MITK Workbench: BlueBerry + ACVD + Qt6 and the 17` \ `# core GUI plugins (datamanager, segmentation, dicombrowser, imagenavigator,` \ `# measurementtoolbox, volumevisualization, moviemaker, remeshing, ...).` \ `# NOT WorkbenchRelease, which additionally needs MatchPoint (unpackaged)` \ `# and DCMQI (packaged as 3dslicer-dcmqi but not yet building).` \ -DMITK_BUILD_CONFIGURATION=Default \ -DMITK_CUSTOM_REVISION_DESC:STRING=v%{version} \ \ -DMITK_USE_Qt6=ON \ \ -DMITK_USE_SYSTEM_Boost=ON \ \ `# BlueBerry is MITK's plugin framework and the basis of the Workbench` \ `# application; it forces MITK_USE_CTK=ON and needs CTK built with` \ `# CTK_ENABLE_PluginFramework (ctk >= 2026.01.26-0.19 ships it as the` \ `# ctk-plugin-framework subpackage).` \ -DMITK_USE_BLUEBERRY=ON \ -DMITK_USE_CTK=ON \ \ -DMITK_USE_DCMQI=OFF \ -DMITK_USE_MatchPoint=OFF \ `# ACVD provides the remeshing plugin required by the Default config` \ -DMITK_USE_ACVD=ON \ \ -DMITK_USE_Python3=ON \ -DMITK_USE_pybind11=ON \ -DPython3_EXECUTABLE=%{python3} \ -DPython3_ROOT_DIR=%{_prefix} \ -DMITK_USE_SWIG=OFF \ -DMITK_USE_CppUnit=OFF \ \ -DMITK_USE_OpenMP=ON \ -DMITK_USE_DCMTK=ON \ -DMITK_USE_httplib=ON \ \ `# InsightToolkit5-devel installs /usr/lib/cmake/ITK-5.4, not the libdir.` \ -DITK_DIR=%{_prefix}/lib/cmake/ITK-5.4 \ -DVTK_DIR=%{_libdir}/cmake/vtk \ -DDCMTK_DIR=%{_libdir}/cmake/dcmtk \ %cmake_build %check %if %{with testing} # ctest needs a display for the Qt/rendering suites. Xvfb on a private server # number so parallel builds on the same host do not collide. export DISPLAY=:97 Xvfb :97 -screen 0 1280x1024x24 >/dev/null 2>&1 & _xvfb=$! trap "kill $_xvfb 2>/dev/null || :" EXIT sleep 3 export QT_QPA_PLATFORM=xcb # MITK's Python helper wants an interpreter bundled at /python/bin/python3 # (upstream builds its own Python there). A system-Python build has only the mitk # package in /python, so GetExecutablePath() is empty and the venv for # mitkPythonBindingsTest cannot be created. Provide the interpreter as a shim that # also gives the test venv the system site-packages (pytest, jsonschema, numpy). mkdir -p %{_vpath_builddir}/python/bin cat > %{_vpath_builddir}/python/bin/python3 <<'PYSHIM' #!/bin/sh case " $* " in *" -m venv "*) exec %{__python3} "$@" --system-site-packages ;; esac exec %{__python3} "$@" PYSHIM chmod +x %{_vpath_builddir}/python/bin/python3 # PythonContext::Activate() puts only the executable's directory (/bin) on # sys.path, so "import mitk" finds nothing in a build root (it only worked on a host # that already had python3-mitk installed). PYTHONPATH cannot help: the PreloadPython # autoload module unsets PYTHONPATH and VIRTUAL_ENV at startup. Expose the build-tree # package next to the test drivers instead; its RUNPATH already points at the build libs. ln -sfn ../python/mitk %{_vpath_builddir}/bin/mitk # Not fatal yet: this is the first run of MITK's suites against a Fedora # system-libs build and the baseline is unknown. Report, do not gate, until we # know which failures are real and which are environmental (GPU-less rendering # in particular). Tighten once a clean baseline exists. # %%ctest expands to a multi-line command with backslash continuations, so an # appended "|| echo" mangles into a bogus command and fails %%check regardless of # the test result -- which is what happened in -23 (the tests were fine; the # shell was not). Wrap it in a subshell so the continuations stay contained. if ! ( %ctest --output-on-failure --timeout 300 ); then echo "WARNING: ctest reported failures -- see the log above (non-fatal for now)" fi %endif %install %cmake_install %if %{with testing} # BUILD_TESTING installs the Mitk*TestDriver binaries into %%{_bindir}; they are # validation tooling, not part of the package. rm -f %{buildroot}%{_bindir}/Mitk*TestDriver %endif # mitkInstallRules.cmake (loaded unconditionally) drops a Qt6 runtime bundle # into %%{_bindir}: plugins/, translations/, resources/, QtWebEngineProcess. # These duplicate the system qt6-* packages, which the Workbench finds on the # normal Qt plugin path anyway. # # CAREFUL: with MITK_USE_BLUEBERRY=ON, %%{_bindir}/plugins is ALSO where MITK's # own BlueBerry plugins land (mitkFunctionCreatePlugin.cmake: install_directories # = bin/plugins) as flat liborg_{mitk,blueberry}_*.so files. Qt's bundle instead # uses per-category SUBdirectories (platforms/, imageformats/, sqldrivers/, ...). # So delete only the subdirectories and keep the flat .so files -- a blanket # `rm -rf %%{_bindir}/plugins` would silently remove every MITK plugin and leave # an unusable Workbench. if [ -d %{buildroot}%{_bindir}/plugins ]; then find %{buildroot}%{_bindir}/plugins -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} + fi rm -rf %{buildroot}%{_bindir}/translations rm -rf %{buildroot}%{_bindir}/resources rm -f %{buildroot}%{_bindir}/QtWebEngineProcess # mitkFunctionCreateBlueBerryApplication installs a relocatable-bundle launcher # (CMake/RunInstalledApp.sh) to the install prefix ROOT, i.e. %%{_prefix}/*.sh. # It only exists to set LD_LIBRARY_PATH for a self-contained tarball; in an FHS # install the loader already finds everything. Drop it -- %%{_prefix}/*.sh is not # a legal location for a shipped file. rm -f %{buildroot}%{_prefix}/*.sh # MITK installs every module TWICE -- once as a RUNTIME artifact into %%{_bindir} # (with the per-module CppMicroServices autoload subdirectories beside it) and # once flattened into %%{_libdir}. The two copies are byte-identical, so RPM's # debuginfo pass aborts with "Duplicate build-ids ... /usr/bin/libMitkX.so and # /usr/lib64/libMitkX.so" for ~56 libraries. # The %%{_bindir} copy is the functional one -- it is what every RUNPATH resolves # to, verified with objdump on the built tree: # MitkWorkbench $ORIGIN:$ORIGIN/plugins # libMitkCore.so $ORIGIN:$ORIGIN/plugins # liborg_*.so $ORIGIN/.. # Nothing anywhere points at %%{_libdir}, and CppMicroServices resolves autoload # modules relative to the DIRECTORY OF THE LOADING LIBRARY, so the subdirs only # work next to the %%{_bindir} copies. Keeping the %%{_libdir} set would also put a # second copy of every SONAME on the default loader path -- two libMitkCore.so in # one process is a real hazard, not just lint. # The %%{_libdir} set is a superset (70 vs 56): the extra 14 are the autoload # modules, flattened out of their subdirectories, where autoload would never find # them anyway. Every file removed here exists under %%{_bindir}. rm -f %{buildroot}%{_libdir}/libMitk*.so test ! -e %{buildroot}%{_libdir}/libMitkCore.so \ || { echo "ERROR: duplicate %{_libdir} MITK libraries not removed"; exit 1; } test -e %{buildroot}%{_bindir}/libMitkCore.so \ || { echo "ERROR: %{_bindir} MITK libraries missing after cleanup"; exit 1; } # BlueBerry plugins link SIBLING plugins in their own directory, but upstream # gives them RUNPATH=$ORIGIN/.. only -- which resolves to %%{_bindir}, where the # MITK core libraries live, and NOT to %%{_bindir}/plugins where the siblings # are. Upstream gets away with it because its relocatable tarball ships # RunInstalledApp.sh to set LD_LIBRARY_PATH; that launcher is illegal here (it # installs to %%{_prefix} root) and is removed above. %%{_bindir}/plugins is on no # loader path, so 27 of the 29 plugins had unresolved sibling libraries and CTK # aborted the whole application at startup: # ctkPluginException: The plugin "liborg_blueberry_core_expressions.so" could # not be loaded: liborg_blueberry_core_runtime.so: cannot open shared object # file # -> Startup error: Application Exception: No application id has been found. # Prepending $ORIGIN takes it from 27/29 broken to 0/29, verified by launching # the Workbench under Xvfb. for _p in %{buildroot}%{_bindir}/plugins/liborg_*.so; do patchelf --set-rpath '$ORIGIN:$ORIGIN/..' "$_p" done patchelf --print-rpath %{buildroot}%{_bindir}/plugins/liborg_blueberry_core_runtime.so \ | grep -q '^\$ORIGIN:\$ORIGIN/\.\.$' \ || { echo "ERROR: plugin RUNPATH fix did not apply"; exit 1; } # Desktop integration for the Workbench if [ -f %{buildroot}%{_bindir}/MitkWorkbench ]; then mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/org.mitk.MitkWorkbench.desktop <<'EOF' [Desktop Entry] Type=Application Name=MITK Workbench GenericName=Medical Image Viewer Comment=Interactive medical image processing and visualization Exec=MitkWorkbench %F Icon=org.mitk.MitkWorkbench Terminal=false Categories=Science;MedicalSoftware;Graphics;Viewer; MimeType=application/dicom;image/x-nifti; EOF for sz in 48 64 128; do icon=$(find %{_builddir}/MITK-%{version} -name "icon.png" -path "*Workbench*" | head -1) if [ -n "$icon" ]; then mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${sz}x${sz}/apps cp "$icon" %{buildroot}%{_datadir}/icons/hicolor/${sz}x${sz}/apps/org.mitk.MitkWorkbench.png fi done fi # Reveal the Workbench layout so %%files can be tuned from the build log rather # than another 3-hour round trip. echo "=== bindir top level ==="; ls %{buildroot}%{_bindir}/ 2>/dev/null | head -30 echo "=== bin/plugins (MITK BlueBerry plugins) ==="; ls %{buildroot}%{_bindir}/plugins/ 2>/dev/null | head -40 echo "=== provisioning / config files ==="; find %{buildroot} -name "*.provisioning" -o -name "*.ini" 2>/dev/null | head echo "=== anything left directly under %{_prefix} ==="; find %{buildroot}%{_prefix} -maxdepth 1 -type f 2>/dev/null | head # --- Python bindings ------------------------------------------------------ # The pybind11 'mitk' package needs relocating + de-rpath'ing. Two upstream # quirks are in play: # * In a non-wheel (Custom) build, Wrapping/Python/mitk/CMakeLists.txt installs # the extension only under -DMITK_BUILD_CONFIGURATION=PythonWheel (the # install(TARGETS mitk_python_bindings)/install(FILES __init__.py) calls are # guarded by `if(MITK_BUILD_CONFIGURATION STREQUAL "PythonWheel")`). What # DOES install it is mitkInstallRules.cmake, which copies the staged # build-tree python/ dir to %%{_prefix}/python -- so the package lands at # %%{_prefix}/python/mitk (the %%prep sed redirected mitk_PACKAGE_DIR into the # build tree so this staging dir exists). Relocate it to the interpreter # sitearch, the canonical location. # * The extension is linked against the not-yet-installed MitkCore/… via # build-tree paths, so it carries a build-dir RUNPATH (+ a trailing empty # entry) that RPM's check-rpaths rejects. Upstream applies a $ORIGIN # INSTALL_RPATH, but only in the PythonWheel config. (Both reported upstream.) # # RELEASE 6 STRIPPED THE RUNPATH OUTRIGHT, on the stated grounds that "the # libMitk*.so install to %%{_libdir}, on the default loader path". That was # TRUE WHEN WRITTEN -- -6 packaged the %%{_libdir} copies. Release 8 then # deleted them as duplicates (see the note above %%{_bindir} cleanup), which # was also right on its own terms, and silently invalidated this one. Nobody # re-read this comment. Result: `import mitk` has been dead ever since -- # # ImportError: libMitkMultilabel.so: cannot open shared object file # # with 4 unresolved DT_NEEDED (libMitkMultilabel, libMitkDICOM, libMitkCore, # libMitkCppMicroServices), measured with `ldd` under a clean environment. # It resolves only with LD_LIBRARY_PATH=%%{_bindir}, which nothing sets. # Note this is invisible to a depsolve check: the libraries ARE shipped, so # RPM's auto-Provides satisfy the auto-Requires. Only the loader disagrees. # # So point the RUNPATH at where the libraries actually are. Relative to # $ORIGIN rather than a literal %%{_bindir} for one concrete reason: # check-rpaths scores an absolute '/usr/bin' as badness=2, "invalid rpath", # and fails the build; suppressing that needs QA_RPATHS, which is per-package # and would also mask genuinely bad rpaths in the plugins. $ORIGIN/... is # badness=0 on its own merits, so the exemption stays scoped to this file. # The relative path is computed, not hardcoded, so a python3.15 sitearch # cannot silently change the depth -- and asserted afterwards. if [ -d %{buildroot}%{_prefix}/python/mitk ]; then mkdir -p %{buildroot}%{python3_sitearch} cp -a %{buildroot}%{_prefix}/python/mitk %{buildroot}%{python3_sitearch}/ rm -rf %{buildroot}%{_prefix}/python _mitk_ext=$(ls %{buildroot}%{python3_sitearch}/mitk/mitk.cpython-*.so) test -n "$_mitk_ext" || { echo "ERROR: python extension not found" >&2; exit 1; } _mitk_rel=$(realpath -m --relative-to="%{python3_sitearch}/mitk" "%{_bindir}") patchelf --set-rpath "\$ORIGIN/${_mitk_rel}" "$_mitk_ext" # Guard 1: the RUNPATH must actually be set (a --set-rpath that silently did # nothing is exactly how release 6's mistake would come back). _mitk_got=$(patchelf --print-rpath "$_mitk_ext") test "$_mitk_got" = "\$ORIGIN/${_mitk_rel}" || { echo "ERROR: RUNPATH is [$_mitk_got], expected [\$ORIGIN/${_mitk_rel}]" >&2; exit 1; } # Guard 2: and it must resolve to %%{_bindir} once $ORIGIN is substituted. _mitk_res=$(realpath -m "%{python3_sitearch}/mitk/${_mitk_rel}") test "$_mitk_res" = "%{_bindir}" || { echo "ERROR: RUNPATH resolves to $_mitk_res, not %{_bindir}" >&2; exit 1; } # Guard 3: every libMitk the extension needs must be there. This is the # condition that was actually violated; assert it rather than the proxy. _mitk_missing=0 for _n in $(patchelf --print-needed "$_mitk_ext" | grep '^libMitk'); do test -e "%{buildroot}%{_bindir}/$_n" || { echo "ERROR: $_n needed by the python extension is not in %{_bindir}" >&2 _mitk_missing=1; } done test "$_mitk_missing" -eq 0 || exit 1 echo "python3-mitk: RUNPATH [$_mitk_got] -> $_mitk_res, all libMitk deps present" fi # reveal the resulting layout for %%files tuning on the first NUC build echo "=== python3-mitk install tree ==="; find %{buildroot}%{python3_sitearch}/mitk 2>/dev/null | head -40 || echo "NO mitk module" %files %license LICENSE %doc README.md # MITK 2026.06 installs its shared libraries as RUNTIME artifacts, so they land in # %%{_bindir} (+ per-module micro-service subdirs), NOT %%{_libdir}. The old # %%{_libdir}/libMitk*.so glob matched nothing -> 196 unpackaged files. MITK modules # ship without SOVERSION (only libMitk*.so, no .so. chain). %{_bindir}/libMitk*.so %dir %{_bindir}/MitkCore %{_bindir}/MitkCore/libMitk*.so %dir %{_bindir}/MitkDICOM %{_bindir}/MitkDICOM/libMitk*.so %dir %{_bindir}/MitkModelFit %{_bindir}/MitkModelFit/libMitk*.so %dir %{_bindir}/MitkQtWidgets %{_bindir}/MitkQtWidgets/libMitk*.so # The duplicate %%{_libdir} copies are deleted in %%install -- see the note there. # Nothing's RUNPATH resolves to %%{_libdir}, and shipping them would put a second # copy of every SONAME on the default loader path. %files workbench # The BlueBerry application and its plugin set. MITK installs plugins as flat # liborg_{mitk,blueberry}_*.so under %%{_bindir}/plugins (bin/plugins upstream); # Qt's bundled per-category subdirectories are stripped in %%install. %{_bindir}/MitkWorkbench %dir %{_bindir}/plugins %{_bindir}/plugins/liborg_*.so # BlueBerry reads this at startup to decide which plugins to provision. %{_bindir}/*.provisioning %{_datadir}/applications/org.mitk.MitkWorkbench.desktop %{_datadir}/icons/hicolor/*/apps/org.mitk.MitkWorkbench.png %files devel %{_includedir}/mitk/ %{_libdir}/libqtsingleapplication.a %files -n python3-mitk %license LICENSE %{python3_sitearch}/mitk/ %changelog * Mon Oct 05 2026 Morgan Hough - 2026.06-40 - "--with testing" only: fix the three failures the CTest/CDash farm reported on MITK (389 tests, 3 failing). The shipped binaries are unchanged. * mitkIOUtilTest::TestUtf8 -- not a UTF-8 problem. The test opens the data file with std::fstream::open(path), default mode in|out, and the packaged mitk-data is root-owned read-only: openat(O_RDWR) = EACCES. Open it std::ios::in. * mitkPythonBindingsTest -- "Could not create virtual environment". MITK's PythonHelper::GetExecutablePath() requires /python/bin/python3 (a bundled interpreter); a system-Python build has none, so venv creation was never attempted. Add a shim there that delegates to the system python and passes --system-site-packages to "-m venv", plus BuildRequires python3-pytest and python3-jsonschema, because the test otherwise pip-installs them. Also link /bin/mitk -> ../python/mitk: "import mitk" otherwise only succeeds on a host with python3-mitk installed (the first mock runs failed mitkPythonContextTest for that reason; the farm hid it). PYTHONPATH does not work -- the PreloadPython autoload unsets it. Verified in a kept mock chroot: both Python tests pass. * Remove the installed Mitk*TestDriver binaries under "--with testing"; they made rpmbuild fail with unpackaged files. * mitkDICOMTimeUtilTest -- when DCMTK lacks OFTime::hasTimeZone() (3.7.0) the UTC block is already removed, so drop the two subtests that assert UTC normalisation (MixedTimeZone, FractionalTimeZone). Restored automatically on a DCMTK that provides hasTimeZone(). * Mon Oct 05 2026 Morgan Hough - 2026.06-39 - Pin the exact DCMTK snapshot: Requires: dcmtk(abi) = %%{dcmtk_abi}, from dcmtk-devel's macros.dcmtk, plus a %%build guard against the UNSET placeholder. dcmtk is now packaged from git HEAD (policy in dcmtk.spec) and upstream's DCMTK_ABI_VERSION stays 20 across snapshots, so rpm cannot tell snapshots apart by soname. Without a rebuild against the snapshot this package would install cleanly and fail at load. * Mon Sep 28 2026 Morgan Hough - 2026.06-38 - Fix python3-mitk, which has been unimportable since release 8. The extension carried NO RUNPATH -- release 6 stripped it because "the libMitk*.so install to %%{_libdir}, on the default loader path", which was true at the time; release 8 then deleted the %%{_libdir} duplicates in favour of the %%{_bindir} copies and invalidated that premise without anyone re-reading the comment. ImportError: libMitkMultilabel.so: cannot open shared object file 4 unresolved DT_NEEDED under a clean environment; works only with LD_LIBRARY_PATH=%%{_bindir}. Set RUNPATH to $ORIGIN/ -- relative because check-rpaths scores a literal /usr/bin as an invalid rpath and the QA_RPATHS escape would be package-wide. Verified on the host: 4 unresolved libraries -> 0. - Guard it three ways: the RUNPATH must be set to the expected value, it must resolve to %%{_bindir}, and every libMitk* the extension needs must exist there. The third is the condition release 6 actually broke. - NB this class of bug is invisible to the installability sweep: the libraries are shipped, so RPM's auto-Provides satisfy the auto-Requires; only the runtime loader disagrees. The underlying cause is that MITK's libraries live in %%{_bindir} at all, which is a Fedora guideline violation and the real fix; see docs/reports/mitk-libdir-relocation.md. * Sun Sep 27 2026 Morgan Hough - 2026.06-37 - Replace the DCMTK hasTimeZone version guard with a FEATURE TEST against the DCMTK actually in the buildroot. The old guard emitted "#if defined(DCMTK_VERSION_NUMBER) && DCMTK_VERSION_NUMBER > 369", but dcmtk defines no DCMTK_VERSION_NUMBER at all -- 0 definitions across 1044 dcmtk-devel headers. The real names are OFFIS_DCMTK_VERSION_NUMBER (dcmdata/dcuid.h:351), which is what a consumer would write, expanding to PACKAGE_VERSION_NUMBER (config/osconfig.h, value 370). So the #if was always false, the block was permanently disabled, and every green build got the right outcome from dead reasoning. - Renaming that macro would have broken the build on every chroot we ship: this repo's dcmtk 3.7.0-4, which shadows Fedora's 3.6.9 on f44 and on both rawhide arches, reports PACKAGE_VERSION_NUMBER 370 while its ofstd/oftime.h declares no hasTimeZone (only getTimeZone(), line 276) -- that method exists solely in DCMTK git master. Testing for the method itself is correct everywhere and self-corrects if DCMTK ever releases it. - Verified against the f44 build log (11004653): the %%prep substitution ran, mitkDICOMTimeUtil.cpp compiled and linked into libMitkDICOM.so, zero hasTimeZone errors. Note the old %%prep message printed unconditionally, so it never evidenced that the guard worked -- the compile against a header lacking the method is the actual evidence. - Fix three bogus changelog weekdays: Jul 17 2026 is a Friday, Jul 15 a Wednesday, Mar 03 a Tuesday. * Wed Sep 16 2026 Morgan Hough - 2026.06-36 - Add Patch4: reach Eigen through ITK's portable ITK_EIGEN() macro instead of ITK's internal itkeigen/ path, in 10 places across SurfaceInterpolation, Classification/CLCore and CLUtilities. InsightToolkit5 5.4.7-4 and later use system Eigen and no longer install /usr/include/ITK-5.4/itkeigen/, so mitk fails to compile against them (itkeigen/Eigen/Dense: No such file). - The macro form is deliberate. itk_eigen.h expands ITK_EIGEN(Dense) to Eigen/Dense with system Eigen and to itkeigen/Eigen/Dense with the bundled copy, so the same source builds against either. Hardcoding would have broken f45, which still serves ITK 5.4.7-2 with bundled Eigen: its ITKEigen3_INCLUDE_DIRS is only /usr/include/ITK-5.4, so /usr/include/ eigen3 is never on the compile line. Both forms verified by compiling against 5.4.7-2 and 5.4.7-7 headers; the hardcoded form fails on the former. - No dependency change needed: mitk-devel ships 8 of the 10 as public headers under /usr/include/mitk/, and eigen3-devel arrives transitively because InsightToolkit5-devel requires it. eigen3-devel is already a BuildRequires. - Patch found and prepared by neurofedora-t2 (ITK consumer test rebuild, build 10994447 in mhough/neurofedora-itk5-test); re-cut in the portable form. * Wed Sep 16 2026 Morgan Hough - 2026.06-35 - Rebuild against InsightToolkit5 5.4.7-2. aarch64 -34 was built 22:24 on 2026-09-15 and ITK 5.4.7-2 published there at 23:44, so the aarch64 binaries link 5.4.7-1. Invisible to rpm: ITK's soname is libITKCommon-5.4.so.1 and encodes only the series, which is the same frozen-soname trap as VTK and CTK. x86_64 -34 already had 5.4.7-2; it is rebuilt too so both arches match. - First build for Fedora 45, where vtk 9.7.0-5 and ctk 0.3 are now published with macros.vtk and macros.ctk, so both guards resolve. f45 has been serving mitk 2026.06-7 with no mitk-workbench at all. * Tue Sep 15 2026 Morgan Hough - 2026.06-34 - Add a real CTK floor: Requires ctk >= %%{ctk_ver}, from ctk-devel's new macros.ctk, guarded in %%build so it can never ship as ">= UNSET". - Why: CTK's sonames are frozen at .so.0.1 across every snapshot, so the automatic soname deps rpm generates are satisfied by a CTK built months earlier and dnf never upgrades it. A peer session found a host running 3dslicer-5.12.3-8 against the January fd37b874 CTK with 206 of 246 Slicer libraries carrying unresolved symbols -- ctkErrorLog*MessageHandler ctors that exist only in the June snapshot, plus vtkImplicitArray instantiations from a ctk-vtk built against VTK 9.6. Nothing failed at install time. - mitk-workbench's ctk-plugin-framework floor was hardcoded at the January 2026.01.26-0.26 and now tracks %%{ctk_ver} too. * Tue Sep 15 2026 Morgan Hough - 2026.06-33 - Point ITK_DIR at %%{_prefix}/lib/cmake/ITK-5.4, where InsightToolkit5-devel installs ITKConfig.cmake. The old %%{_libdir} path has never existed, so find_package searched and, on any host with InsightToolkit6-devel also installed, resolved ITK 6.0. COPR -32 was unaffected (no ITK6 in the buildroot), but local and farm builds were not. Reported on COORDINATION by fedora-skullcandy-display. * Sun Sep 13 2026 Morgan Hough - 2026.06-32 - Rebuild on both arches for a consistent buildroot. No source or packaging changes. - aarch64 -31 (COPR 10982521) resolved InsightToolkit5-devel 5.4.6-8, per its builder-live.log. That ITK was built against VTK 9.6.2, and 5.4.7-1 landed on aarch64 minutes later (10982519). The vtk(abi) = 9.7 pin was correct, but the ITK link underneath was stale. aarch64 ctk has since been rebuilt too (0.2, 10982616). - x86_64 was still at -29, so both arches now match at -32. * Sun Sep 13 2026 Morgan Hough - 2026.06-31 - Add Patch3: read the transfer-function control-point pairs element-wise instead of json::get_to(std::pair). This avoids the GCC 16 aarch64 segfault in nlohmann's from_json_tuple_impl (adl_serializer.hpp:31:30). - Drop the -30 per-TU SKIP_PRECOMPILE_HEADERS block. -30 (COPR 10981812) disproved the PCH hypothesis: that TU compiled without cmake_pch.hxx (its neighbours still had it) and still segfaulted at the same instantiation. The crash is in front-end template instantiation, so optimisation flags would not help either. * Sun Sep 13 2026 Morgan Hough - 2026.06-30 - aarch64: turn precompiled headers back ON and skip the PCH only for mitkTransferFunctionProperty.cpp, the TU gcc 16 ICEs on. Drop the -29 force-includes. - Why: -29 (COPR 10981728) got past Patch2 to object 132/2371, then failed on mitkBaseProperty.cpp, which sees only nlohmann/json_fwd.hpp and none of the Int/Float/Bool/StringProperty headers without the PCH. MitkCore's PCH is mitkBaseRenderer.h + mitkImage.h, which drag in most of MITK, so PCH-off would mean one missing-include failure per multi-hour aarch64 build. - The -27 log confirms the crashing command did use cmake_pch.hxx, so a per-TU PCH skip is the targeted test of that hypothesis. Keep Patch2, a real upstream bug. * Sun Sep 13 2026 Morgan Hough - 2026.06-29 - Add Patch2: #include in Modules/Core/src/mitkEnvironment.cpp. -28 on aarch64 (COPR 10980991) failed at object 75/2371: with PCH off, std::remove resolved to ::remove(const char*) from . The PCH had been masking the missing include. - aarch64: force-include , and to cover other TUs that may have relied on the PCH the same way. - The ICE TU (mitkTransferFunctionProperty.cpp, ~object 270) was never reached in -28, so whether PCH off avoids the gcc 16 ICE is still untested. * Sat Sep 12 2026 Morgan Hough - 2026.06-28 - aarch64: also set -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON. The -27 workaround (-DCMAKE_CXX_SCAN_FOR_MODULES=OFF) was applied and was NOT sufficient. COPR 10980230's log shows the flag present and zero -fmodules on the command line, yet cc1plus still segfaults at the same point -- object 270/2383, Modules/Core/src/DataManagement/mitkTransferFunctionProperty.cpp, in nlohmann's from_json_tuple_impl for std::pair (/usr/include/nlohmann/adl_serializer.hpp:31:30). The module scan was not the trigger. What is in the crashing include chain is the precompiled header (redhat-linux-build/Modules/Core/CMakeFiles/MitkCore.dir/cmake_pch.hxx), which -27's own changelog named as the next candidate. Module scan stays OFF: harmless, and MITK does not use C++20 modules. - Still a gcc 16 aarch64 compiler bug, not a MITK or packaging defect. Untested locally: the ICE is aarch64-only and this host is x86_64. * Sat Sep 12 2026 Morgan Hough - 2026.06-27 - Set -DCMAKE_CXX_SCAN_FOR_MODULES=OFF on aarch64. gcc 16 segfaults (internal compiler error) during CMake's C++ module dependency scan of mitkTransferFunctionProperty.cpp at nlohmann adl_serializer.hpp:31:30, which is what has been failing the fedora-44-aarch64 build. MITK does not use C++20 modules, so skipping the scan is harmless. Compiler bug, not a packaging one; worth a Red Hat bugzilla. * Tue Sep 08 2026 Morgan Hough - 2026.06-26 - Set MITK_CUSTOM_REVISION_DESC=v%%{version}, which fixes two things at once. mitkFunctionGetVersionDescription() derives the revision description with "git describe" and falls back to the literal "unknown_version" when the source is not a git working tree -- which a tarball build never is. That string is what QmitkExtWorkbenchWindowAdvisor.cpp:1427 puts in the Workbench title bar, so the shipped application has been calling itself "unknown_version". The variable is upstream's own documented override (CMakeLists.txt:257). Second effect: QmitkAboutDialog matches MITK_REVISION_DESC against ^v(\d\d\d\d\.\d\d)$ and, on a match, repoints the About dialog's documentation links from "nightly" to the matching release. "v2026.06" matches exactly, so the links now go to the 2026.06 documentation rather than nightly. - Drop -std=c++17 from CXXFLAGS. It never took effect: MITK sets CMAKE_CXX_STANDARD 20 with CMAKE_CXX_STANDARD_REQUIRED (CMakeLists.txt:119-123) and CMake appends -std=c++20 after the flags from the environment, so every translation unit was already compiling as C++20 -- the observed command line carried both, C++20 last. Removing it is inert at the compiler level and stops the spec claiming a standard the build does not use. It was also a latent hazard: MITK genuinely requires C++20, so if the flag ordering ever reversed the build would break. - No functional change to the VTK 9.7.0 fix in -25. When this was written -25 had not been built (expired COPR token here), but legion submitted it meanwhile as COPR 10961805, so -26 is an increment on a real build rather than a supersession that avoids one. * Mon Sep 07 2026 Morgan Hough - 2026.06-25 - Build against VTK 9.7.0. VTK 9.7 deprecates vtkTransformPolyDataFilter ("Replaced by vtkTransformFilter."), and MITK compiles with -Werror that it adds itself (CMake/mitkFunctionCreateModule.cmake:343 and mitkFunctionCreatePlugin.cmake:256, not a Fedora flag), so the deprecation is fatal: the build stopped at object 474/4454 in MitkCore on mitkPlaneGeometryDataToSurfaceFilter.cpp:47. Since the VTK 9.7.0 promotion into the repo on 2026-09-03/04 this package has not built at all. - Add -Wno-error=deprecated-declarations, the fifth flag of this kind here and the same class of concession as -Wno-error=array-bounds and -Wno-error=free-nonheap-object. The class still exists and works in 9.7 -- deprecated is not removed -- so the cost is warning hygiene only. - Deliberately NOT porting to vtkTransformFilter in this package. Measured against the installed 9.7 headers: VTK 9.7 deprecates 43 classes, MITK uses exactly one, across 13 instantiations and 6 header member declarations. The port is not mechanical -- vtkTransformFilter derives from vtkPointSetAlgorithm, so GetOutput() returns vtkPointSet* where the old class returned vtkPolyData*, and mitkSurfaceStampImageFilter.cpp:133 assigns it directly -- and six of the affected files are rendering mappers, where a subtle behavioural difference is silently wrong output rather than a build failure. That port belongs upstream, and downstream should not carry it untested. Reported to MITK upstream. - The 4214 deprecation warnings in the resulting build are inclusion amplification of those same sites, re-warned in every translation unit that transitively includes the affected headers. Not 4214 distinct sites. * Tue Aug 04 2026 Morgan Hough - 2026.06-24 - Fix %%check so a ctest failure really is non-fatal. %%ctest expands to a multi-line command with backslash continuations; the appended "|| echo" turned into a bogus "' ' echo" and failed %%check no matter what the tests did. -23 produced no RPMs despite 385 of 389 tests passing. Wrap in a subshell. - FIRST FULL TEST RUN: 5436/5436 objects (982 of them test drivers) compiled with zero failures, and 385 of 389 tests pass. All segmentation suites are green -- Modules/{Segmentation,Multilabel,SurfaceInterpolation,ContourModel}. The four failures are mitkIOUtilTest, mitkDICOMTimeUtilTest, mitkPythonContextTest and mitkPythonBindingsTest; none is a rendering test, so none is explained away by the headless builder, and all four want investigating. * Tue Aug 04 2026 Morgan Hough - 2026.06-23 - Regenerate mitk-guard-testdriver-target.patch against the real source. The -22 version was hand-written with guessed hunk context and did not apply, failing %%prep. Verified with a dry-run against the release tarball this time. * Tue Aug 04 2026 Morgan Hough - 2026.06-22 - Add mitk-guard-testdriver-target.patch. MITK_CREATE_MODULE_TESTS() lets mitk_create_executable() decline to build a test driver when a PACKAGE_DEPENDS entry is unmet -- a legitimate skip -- and then calls set_property() on the target that was never created. Modules/Multilabel/Testing declares PACKAGE_DEPENDS DCMQI, so a build without DCMQI does not merely lose the Multilabel tests, it fails to configure at all. Guard on the target existing. Going upstream; same class as the PACKAGE_DEPENDS component bug in Patch0. - Set MITK_PET_DOWNLOAD_IBSI_DATA=OFF for "--with testing". Modules/PET's test suite FetchContent-git-clones an IBSI DRO dataset at configure time, which a build root cannot do. Upstream provides the switch and the affected test skips itself at runtime. This supersedes the %%prep BUILD_TESTING guard for that subdirectory, which only helped while testing was off. * Tue Aug 04 2026 Morgan Hough - 2026.06-21 - Add FindCppUnit.cmake (Source4) and cppunit-devel, so "--with testing" can configure. MITK's superbuild builds CppUnit as an external project and passes the inner build a CppUnit_DIR, so upstream ships no find module and CMakeLists.txt:1021 calls find_package(CppUnit REQUIRED) -- which with no module falls through to CONFIG mode. Fedora's cppunit-devel ships only pkg-config, so the search failed outright and 2026.06-20 could not configure with BUILD_TESTING=ON. Same idiom as the existing FindANN/FindQt6Qwt6/Findlz4 sources; variable names match what MITK_CppUnit_Config.cmake consumes. * Tue Aug 04 2026 Morgan Hough - 2026.06-20 - Add a "--with testing" bcond that turns on MITK's own test suites, pointing MITK_DATA_DIR at the new mitk-data package. CMakeExternals/MITKData.cmake already supports this: when MITK_DATA_DIR is defined it takes the mitkMacroEmptyExternalProject path instead of git-cloning the data, which a build root cannot do anyway. This makes 38 segmentation tests runnable -- Modules/{Segmentation,Multilabel, SurfaceInterpolation,ContourModel}/Testing -- plus the other 27 test directories. Note the older modules name the directory "Testing" with a capital T, not "test"; searching for the latter finds none of them. OFF by default: mitk-data is 146 MB and the suites add substantially to build time, so the shipped RPM is unaffected. %%check runs ctest under Xvfb and currently reports rather than gates, since there is no known-good baseline for a Fedora system-libs build yet. * Mon Aug 03 2026 Morgan Hough - 2026.06-19 - Require ctk >= 0.26, which stops ctkMacroBuildPlugin discarding the RESOURCES argument. The macro parsed the caller's .qrc files into MY_RESOURCES and then cleared the variable, so every plugin shipped with its generated plugin.xml and none of its own Qt resources. mitkFunctionCreatePlugin.cmake:196 passes them correctly; they were dropped on the CTK side. 2026.06-18 ran with 23 "Could not read :/..." warnings -- missing icons, the dark stylesheet and the welcome page. * Mon Aug 03 2026 Morgan Hough - 2026.06-18 - Drop -g and -grecord-gcc-switches from the build flags. Since stripping has to stay disabled (it destroys the appended CppMicroServices resource archives), any DWARF emitted stays in the shipped libraries permanently: 2026.06-17 came to 347 MB for the main package and 98 MB for mitk-workbench, against 21 MB and 3.4 MB when stripped in -16. With no -debuginfo subpackage there is nothing to consume the debug info. Functionality is unchanged; this is purely size. * Mon Aug 03 2026 Morgan Hough - 2026.06-17 - Two runtime fixes found by actually launching the Workbench under Xvfb; -16 built and packaged cleanly but the application did not work. - Give the BlueBerry plugins RUNPATH $ORIGIN:$ORIGIN/.. . They link sibling plugins in their own directory but upstream sets only $ORIGIN/.., which points at %%{_bindir} (the core libraries) and not %%{_bindir}/plugins. Upstream relies on RunInstalledApp.sh setting LD_LIBRARY_PATH; that launcher installs to the prefix root and is dropped here. Result was 27 of 29 plugins with unresolved siblings and CTK aborting at startup with "Application Exception: No application id has been found". With $ORIGIN prepended: 0 of 29 unresolved, and the Workbench window opens (verified via xwininfo under Xvfb). - Disable stripping (%%global debug_package %%{nil} + __brp_strip). CppMicroServices embeds module resources by APPENDING a zip archive after the ELF data, and rpm's install-post strip discards trailing data, so every libMitk*.so lost its resources. Confirmed with a controlled test: an .so with an appended zip went 11755 -> 10216 bytes across strip and the embedded name disappeared. Symptom was the Workbench's main viewer failing -- "Unable to create editor ID org.mitk.editors.stdmultiwidget: Resource not valid. State machine pattern not found: DisplayInteraction.xml" -- plus 24 missing icon/stylesheet warnings. Costs the -debuginfo/-debugsource subpackages. * Mon Aug 03 2026 Morgan Hough - 2026.06-16 - Delete the duplicate %%{_libdir} copies of the MITK modules. MITK installs every module twice -- RUNTIME into %%{_bindir} (with the CppMicroServices autoload subdirectories beside it) and flattened into %%{_libdir} -- and the two are byte-identical, so rpm's debuginfo pass aborted with "Duplicate build-ids" for ~56 libraries. Verified with objdump that %%{_bindir} is the functional copy: MitkWorkbench and libMitkCore.so carry RUNPATH $ORIGIN:$ORIGIN/plugins and the BlueBerry plugins carry $ORIGIN/.., so nothing resolves to %%{_libdir} at all. Autoload modules are found relative to the loading library's directory, which only works beside the %%{_bindir} copies. Shipping both would also place a second copy of every SONAME on the default loader path. - Package the MitkQtWidgets autoload subdirectory (libMitkRESTAPIAutoload.so), the one unpackaged-file error left once %%install completed. It is a fourth per-module subdir alongside MitkCore, MitkDICOM and MitkModelFit. * Mon Aug 03 2026 Morgan Hough - 2026.06-15 - Disable Qt's deploy tool (MITK_DEPLOY_QT FALSE). mitkInstallRules.cmake:89 runs mitkFunctionDeployQt() on every executable with that property, set on the Workbench by mitkFunctionCreateBlueBerryApplication.cmake:92. It builds a RELOCATABLE BUNDLE -- copying Qt's plugins into bin/plugins/ and rewriting their RPATH to $ORIGIN/../../ -- which is wrong for a distro package linking system Qt, and hard-fails on Fedora because libqsqlite.so correctly has no RPATH to rewrite ("file RPATH_SET could not write new RPATH ... No valid ELF RPATH or RUNPATH entry exists"). - MILESTONE: 2026.06-14 compiled the ENTIRE Workbench, 4406/4406 objects with zero failures -- the first time MITK's Workbench source has ever built here. All six blockers to that point were packaging defects in dependencies, not MITK code: ctk 0.24 (service/ headers), ctk 0.25 (MOC_SRCS discarded), acvd 4.0-2 (build-tree include paths), acvd 4.0-3 (unqualified cout in installed headers), plus a Poco -Werror false positive and qtsingleapplication needing PIC. * Mon Aug 03 2026 Morgan Hough - 2026.06-14 - Require acvd >= 4.0-3, which qualifies cout/cerr/cin/endl with std:: in ACVD's installed headers and adds the missing . ACVD's %%build force-includes a prelude supplying both, but that is a compiler flag for its own sources -- the headers ship unchanged. Modules/Remeshing instantiates those templates and so produced 35 "'cout' was not declared in this scope [-Wtemplate-body]" errors; a plain #include never triggers it, which is why it stayed hidden until 4.0-2 fixed the include path and made the headers reachable at all. 2026.06-13 reached object 3439 of 4406. * Mon Aug 03 2026 Morgan Hough - 2026.06-13 - Require acvd >= 4.0-2, which fixes ACVD_INCLUDE_DIRS in the installed ACVDConfig.cmake. ACVD ships one config for both its build and install trees, so it exported the build machine's absolute source paths and every consumer of find_package(ACVD) got include directories pointing at nothing. Modules/ Remeshing failed on "vtkIsotropicDiscreteRemeshing.h: No such file or directory" even though acvd-devel installs that header. 2026.06-12 reached object 3279 of 4406 before this. * Sun Aug 02 2026 Morgan Hough - 2026.06-12 - Require ctk >= 0.25, which makes ctkMacroBuildPlugin actually use its MOC_SRCS argument. The macro parsed MOC_SRCS and then dropped it, and since it sets AUTOMOC ON, a Q_OBJECT header with no same-named .cpp was never moc'd. org.mitk.gui.qt.ext failed to link with "undefined reference to `vtable for QmitkExtWorkbenchWindowAdvisorHack'" -- its header is listed under MOC_H_FILES with the class implemented inside QmitkExtWorkbenchWindowAdvisor.cpp. 2026.06-11 reached object 3238 of 4406 before this; confirmed identically on COPR (10806188, object 3237) and in a local mock build on the NUC, which is now the primary build environment for this package. * Sun Aug 02 2026 Morgan Hough - 2026.06-11 - Add -DCMAKE_POSITION_INDEPENDENT_CODE=ON. MITK bundles qtsingleapplication as a STATIC library whose objects are compiled without PIC. With BlueBerry ON, libMitkAppUtil.so links it -- its first shared-library consumer -- and ld fails: "relocation R_X86_64_PC32 against symbol QByteArray::_empty can not be used when making a shared object; recompile with -fPIC". BUILD_SHARED_LIBS=ON does not help because the target is declared STATIC explicitly. Latent until now: nothing linked the archive into a .so before the Workbench, which is why 2026.06-7 shipped it in -devel without trouble. 2026.06-10 hit this at object 2995 of 4406 (COPR 10806031) -- the first failure that was a link error rather than a compile or configure error. * Sun Aug 02 2026 Morgan Hough - 2026.06-10 - Add -Wno-error=free-nonheap-object. Same class as the -Wno-error=array-bounds added in -3 and for the same header: GCC inlines Poco::ActiveResultHolder's destructor through RefCountedObject::release() and AutoPtr's destructor, loses track of the pointer, and reports a false "operator delete called on pointer with nonzero offset 8" at /usr/include/Poco/ActiveResult.h:226. The -Warray-bounds false positive on the same inlining chain is two lines above it in the same diagnostic. Third-party header, MITK builds with -Werror. 2026.06-9 hit this at object 2484 of 4406 on org.blueberry.ui.qt (COPR 10805947). * Sun Aug 02 2026 Morgan Hough - 2026.06-9 - Add mitk-verify-ctk-components.patch: MITK parses the "Package|Component" PACKAGE_DEPENDS syntax but never verifies the component exists, testing only MITK_USE_. Modules/XNAT declares "CTK|CTKXNATCore" and was therefore enabled against a CTK that does not build XNAT, configuring with an empty include path and failing at compile time on 20 missing ctkXnat*.h headers. Verify the component targets during the dependency check so MitkXNAT is disabled like any other unmet dependency. Restricted to CTK, whose components are its exported target names; Qt6 components are not (Widgets vs Qt6::Widgets) and the same test there disables MitkCore. Verified: MitkXNAT moves enabled -> disabled, CTK plugins 29 -> 29, enabled features 145 -> 144, ninja edges 7352 -> 7318. To be sent upstream. - CTK's XNAT libraries cannot simply be enabled to fix this the other way: Libs/XNAT/Core/ctkXnatAPI.cpp uses QScriptEngine/QScriptValue from QtScript, removed in Qt6. Enabling XNAT needs that ported to QJsonDocument first. - Require ctk >= 0.24, which ships the PluginFramework service/ header subtree with its directory structure intact. MITK includes those by source-relative path ( and 14 more); flattened as upstream CTK installs them, moc fails with "Undefined interface" on Q_INTERFACES. This is what stopped 2026.06-8 at object 1198 of 4432 (COPR 10805185). * Fri Jul 31 2026 Morgan Hough - 2026.06-8 - Build the MITK Workbench: MITK_USE_BLUEBERRY=ON, MITK_USE_CTK=ON, MITK_USE_ACVD=ON and MITK_BUILD_CONFIGURATION=Default. Until now this was a library-only package -- 108 libraries but zero of upstream's 65 plugins and neither application -- so nearly everything in the 2026.06 release notes (segmentation tools, PET SUV, screenshot maker) was unreachable. - New mitk-workbench subpackage: the MitkWorkbench binary, the BlueBerry plugins, the provisioning file, plus a desktop entry and icons. - Requires ctk >= 2026.01.26-0.19, the first build shipping libCTKPluginFramework.so; MITK's plugin system uses ctkPluginContext / ctkPluginActivator across 160 files and cannot build without it. - %%install: strip ONLY the per-category subdirectories of %%{_bindir}/plugins (Qt's bundled runtime) instead of the whole directory. With BlueBerry enabled that directory is also where MITK's own liborg_*.so plugins install, so the previous blanket rm would have removed every plugin. - %%install: drop the RunInstalledApp.sh launcher that upstream installs to the prefix root (%%{_prefix}/*.sh); it only sets LD_LIBRARY_PATH for relocatable tarballs and is not a legal location for a shipped file. - Chose Default over WorkbenchRelease: the latter additionally needs MatchPoint (not packaged) and DCMQI (packaged as 3dslicer-dcmqi, not yet building). - BuildRequires qttesting-devel: CTKConfig.cmake does an unconditional find_dependency(QtTesting), so find_package(CTK) fails without it. - Requires ctk >= 2026.01.26-0.20, which packages the DGraph utility and exports CTK_DGRAPH_EXECUTABLE; ctkMacroSetupPlugins aborts with "Executable doesn't exist!" without it, so no MITK plugin can configure against an installed CTK. * Sun Jul 26 2026 Morgan Hough - 2026.06-7 - Add python3-mitk subpackage (pybind11 bindings against system Python 3.14). MITK_USE_Python3=ON + MITK_USE_pybind11=ON. Upstream only installs the 'mitk' Python package under MITK_BUILD_CONFIGURATION=PythonWheel; in our Custom build cmake_install ships nothing, so %%prep redirects mitk_PACKAGE_DIR into the build tree and %%install copies the staged package (extension + __init__.py + mxn/ DSL) into %%{python3_sitearch}. Strip the build-dir RUNPATH off the extension (check-rpaths rejects it; libMitk*.so are on the default path). * Fri Jul 17 2026 Morgan Hough - 2026.06-6 - Complete the %%files fix: MITK 2026.06 installs its shared libs to BOTH %%{_bindir} AND %%{_libdir} (dual RUNTIME+LIBRARY destinations). -5 packaged only %%{_bindir}, leaving 98 %%{_libdir}/libMitk*.so unpackaged. Add the %%{_libdir} glob. * Wed Jul 15 2026 Morgan Hough - 2026.06-5 - Fix %%files: MITK 2026.06 compiled 100%% (2079/2079) but failed packaging with 196 unpackaged files. It installs shared libs as RUNTIME artifacts under %%{_bindir} (+ MitkCore/MitkDICOM/MitkModelFit micro-service subdirs), not %%{_libdir}, so the old %%{_libdir}/libMitk*.so glob matched nothing. Package the real locations. * Tue Jul 14 2026 Morgan Hough - 2026.06-4 - Add -Wno-error=array-bounds. MITK builds with -Werror, and GCC's -Warray-bounds fires a false positive inside ITK's own header (itkIndex.h:430, on itk::Index<2>), which killed MitkSegmentation (mitkCorrectorAlgorithm, mitkImageLiveWireContourModelFilter) at step 1784/2079. Same treatment already applied to template-id-cdtor and unused-but-set-variable. * Sun Jul 12 2026 Morgan Hough - 2026.06-3 - Fix compile against Fedora's DCMTK 3.6.9: MITK 2026.06's mitkDICOMTimeUtil.cpp calls OFTime::hasTimeZone(), which 3.6.9 does not provide (only get/setTimeZone). Version-guard the UTC-normalization block on DCMTK_VERSION_NUMBER > 369 -- the feature stays on newer DCMTK, and on 3.6.9 it degrades to upstream's own documented fallback (leave as-is; the single-timezone path is bit-identical). * Sun Jul 12 2026 Morgan Hough - 2026.06-2 - Fix configure FTBFS in mock/COPR: MITK 2026.06's Modules/PET/CMakeLists.txt adds its test/ subdir unconditionally (Modules/Core correctly guards with if(BUILD_TESTING)). That subdir FetchContent-git-clones an IBSI PET dataset at CONFIGURE time, which fails with no network and violates Fedora's no-downloads policy. Guard the PET test subdir on BUILD_TESTING so -DBUILD_TESTING=OFF honors it. * Sun Jul 12 2026 Morgan Hough - 2026.06-1 - Update to upstream MITK v2026.06 (released 2026-07-07; was 2025.12.2, which was also FTBFS on F44). Two %%prep seds dropped as upstream fixes landed: * mitkMonaiLabelTool.cpp refactored away + the httplib MultipartFormDataItems->UploadFormDataItems rename is upstream. * Modules/MapperExt/src/vtkPointSetSlicer.cxx removed upstream, so the vtkCutter::GetCellTypeDimensions VTK9 workaround is obsolete. Still required and verified against the 2026.06 tree: system-ZLIB external-project removal, IOPhilipsREC reader, LZ4::lz4_shared->LZ4::LZ4, Gizmo vtkVectorOperators ->vtkVector include. %%prep verified clean. * Sat May 30 2026 Morgan Hough - 2025.12.2-13 - Realign %%files to what actually lands. -12's cmake patch installed 49 MITK module libraries but they're unversioned (MITK doesn't set SOVERSION); spec was still requesting %%{_libdir}/libMitk*.so.* which doesn't exist. Ship the unversioned %%{_libdir}/libMitk*.so in main, headers + libqtsingleapplication.a in -devel. - Strip Qt6 WebEngine bundle that mitkInstallRules.cmake drops in %%{_bindir} (plugins/, translations/, resources/, QtWebEngineProcess) — these collide with system qt6-qtwebengine packages. * Fri May 29 2026 Morgan Hough - 2025.12.2-12 - Drop install(EXPORT) — MITK's mitk_create_module uses raw paths in target_include_directories without BUILD_INTERFACE / INSTALL_INTERFACE generator expressions, which cmake rejects in an export set (-11 failed with "INTERFACE_INCLUDE_DIRECTORIES contains path ... which is prefixed in the build directory"). Install libs and headers unconditionally; find_package(MITK) support deferred until a follow-up patch upgrades every module's include declaration. - Update %%files to match what actually lands: drop %%{_libdir}/mitk/ and %%{_libdir}/cmake/MITK*/ (neither produced without EXPORT and Workbench), keep libraries and headers. * Fri May 29 2026 Morgan Hough - 2025.12.2-11 - Add bulk install rules for module libraries + headers + export set. MITK 2025.12.2 has no install(TARGETS ...) for its module libraries — only the Workbench bundle gets installed via MITK_INSTALL_TARGETS, which we don't use (BUILD_WORKBENCH=OFF; BlueBerry/CTK unavailable for Qt6 on Fedora). Append a CMakeLists.txt snippet that iterates the MITK_MODULE_TARGETS global property (populated by mitk_create_module) and installs each library, its include/ tree, and a unified MITKTargets.cmake export set. Surfaced by build 10525956: compile + cmake_install ran clean but %files saw an empty buildroot. * Fri May 29 2026 Morgan Hough - 2025.12.2-10 - Fix VTK 9.6 FTBFS in Modules/Gizmo/src/mitkGizmo{Interactor,Mapper2D}.cpp: vtkVectorOperators.h was removed in VTK 9.6 (the operator overloads were merged into vtkVector.h). Replace the include. Surfaced by build 10525366 (mitk-9 cleared link errors and reached step 1012/1149 before this hit). * Fri May 29 2026 Morgan Hough - 2025.12.2-9 - Link MGHIO, IOScanco and ITKIODCMTK into MitkCore. Build 10525253 cleared the vtkCutter::GetCellTypeDimensions error from -8 but then hit undefined references to itk::{MGH,Scanco,DCMTK}ImageIOFactoryRegister __Private(). MITK's ITK_IO_FACTORY_REGISTER_MANAGER autoinit pulls these from ITK_MODULES_ENABLED, but MITK's PACKAGE_DEPENDS parser auto-prefixes "ITK" onto component names — so MGHIO/IOScanco get rewritten as ITKMGHIO/ITKIOScanco (which don't exist) and never reach the link line. Add the link directly after mitk_create_module(). * Fri May 29 2026 Morgan Hough - 2025.12.2-8 - Fix VTK 9.6 FTBFS in Modules/MapperExt/src/vtkPointSetSlicer.cxx:280 ("'GetCellTypeDimensions' is not a member of 'vtkCutter'"). F44's system VTK 9.6.2 outranks COPR's 9.5.2, so MITK now compiles against 9.6 which removed the static helper. Replace with the documented successor: vtkCellTypes::GetDimension(type) in an inline loop, and include vtkCellTypes.h. Surfaced by build 10506601. * Sat May 23 2026 Morgan Hough - 2025.12.2-6 - Fix Boost 1.87+ FTBFS in Modules/Core/include/mitkLexicalCast.h:37 — boost::detail::lcast_get_precision() was removed. Replace with std::numeric_limits::max_digits10 (its historical implementation). * Thu Mar 19 2026 Morgan Hough - 2025.12.2-3 - Remove incorrect eigen3-devel Requires from -devel subpackage (MITK gets Eigen through ITK5 which bundles it) * Thu Mar 19 2026 Morgan Hough - 2025.12.2-2 - Fix ITK PhilipsREC IO factory linkage (add IOPhilipsREC to MitkCore deps) * Tue Mar 03 2026 Morgan Hough - 2025.12.2-1 - Major rewrite: disable superbuild, use system libraries - Use InsightToolkit5 5.4.5 and VTK 9.5.2 from COPR - Disable BlueBerry/CTK (Fedora CTK is Qt5-only) - Phase 1: core libraries only, no MitkWorkbench - GCC 15 / Fedora 43 compatibility fixes