# Disable LTO — causes undefined references across shared lib boundaries %global _lto_cflags %{nil} %define debug_package %{nil} Name: connectome-workbench Version: 2.2.1 Release: 1%{?dist} Summary: HCP Visualization and Discovery Tool License: GPL-2.0-only URL: https://github.com/Washington-University/workbench Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtsvg-devel BuildRequires: qt5-qtxmlpatterns-devel BuildRequires: mesa-libGL-devel BuildRequires: mesa-libGLU-devel BuildRequires: glm-devel BuildRequires: glib2-devel BuildRequires: zlib-devel BuildRequires: libxml2-devel BuildRequires: git-core BuildRequires: desktop-file-utils # Xvfb is required to run GUI tests in a headless build environment BuildRequires: xorg-x11-server-Xvfb Requires: qt5-qtbase Requires: qt5-qtsvg Requires: qt5-qtxmlpatterns %description Connectome Workbench is an open source visualization and discovery tool used to map neuroimaging data, especially data generated by the Human Connectome Project. %prep %autosetup -n workbench-%{version} # FIX 1: Add missing for GCC 15+. Still required at 2.2.1 -- CaretRgb.h # includes and but never , while using uint8_t. grep -q '#include ' src/Common/CaretRgb.h || exit 1 sed -i '/#include /a #include ' src/Common/CaretRgb.h grep -q '#include ' src/Common/CaretRgb.h || exit 1 # (Former FIX 2 dropped at 2.2.1: WorkbenchInstallationAssistant.cxx no longer # includes , so the substitution was a silent no-op.) # FIX 3: CaretFileDialogExtendable is dead code -- its .cxx is entirely commented # out (no implementation, so no vtable is emitted), it is used by no other source # (only listed in GuiQt/CMakeLists), yet it is still moc'd and compiled, which # links GuiQt against its never-emitted vtable/destructor -> undefined references. # Drop it from the GuiQt build lists. (Keeps the real, used CaretFileDialog.) # Still dead at 2.2.1: verified the .cxx contains no non-comment lines and the # only references are the three in GuiQt/CMakeLists.txt. sed -i '/CaretFileDialogExtendable/d' src/GuiQt/CMakeLists.txt ! grep -q 'CaretFileDialogExtendable' src/GuiQt/CMakeLists.txt || exit 1 # MOC handled by CMAKE_AUTOMOC=ON %build cd src # GCC 15 / Fedora 43 compatibility export CFLAGS="%{optflags} -Wno-error=format-security" export CXXFLAGS="%{optflags} -std=c++17 -include cstdint -fpermissive -Wno-error=format-security" %cmake -GNinja \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DWORKBENCH_USE_QT5=TRUE \ -DWORKBENCH_USE_OPENMP=TRUE \ -DWORKBENCH_CHECK_FOR_UPDATES=FALSE \ -DWORKBENCH_USE_SYSTEM_FTGL=FALSE \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_CXX_STANDARD=17 \ -DWORKBENCH_USE_CMAKE_AUTOMOC=ON \ -DCMAKE_INCLUDE_CURRENT_DIR=ON %cmake_build %install cd src %cmake_install # Install desktop entry (upstream does not provide one via cmake) mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/wb_view.desktop < - 2.2.1-1 - Update to the v2.2.1 release tag (was a 2.1.0-labelled Feb-2026 commit snapshot; upstream 2.1.0 dates from Jun 2025 and 2.2.1 from Jul 2026). Re-verified every downstream fix against the new tree instead of carrying them blind: - FIX 1 ( in CaretRgb.h) STILL required: the header includes and but never while using uint8_t. Now asserts its anchor and its result so a future upstream fix turns into a build error, not a silent no-op. - FIX 2 (QtEnvironmentVariables -> QtCore) DROPPED: upstream no longer includes that header, so the sed had become a silent no-op. - FIX 3 (drop CaretFileDialogExtendable from GuiQt) STILL required: its .cxx still contains no non-comment lines, so no vtable is emitted, yet it is still listed in GuiQt/CMakeLists.txt and moc'd. Now asserts the removal took effect. - CMAKE_POLICY_VERSION_MINIMUM=3.5 STILL required: bundled kloewe/dot still declares cmake_minimum_required(VERSION 3.0), which cmake 4 rejects. (kloewe/cpuinfo was updated upstream to 3.5...4.0, dot was not.) Note: 2.2.1 gains a WORKBENCH_USE_QT6 option. Staying on Qt5 for this bump so a failure is attributable to the version change alone; Qt6 is a separate step. * Wed Jun 17 2026 Morgan Hough - 2.1.0-9.20260203gitf8a1b5a - Fix FTBFS under cmake 4: bundled kloewe/dot/CMakeLists.txt declares cmake_minimum_required < 3.5, which cmake 4 rejects ("Compatibility with CMake < 3.5 has been removed"). Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5. (OpenSSL/qwt "not found" in the log are optional and non-fatal.) - Fix GuiQt link errors (undefined CaretFileDialogExtendable/Private vtable + destructor refs): CaretFileDialogExtendable is dead code -- its .cxx is fully commented out (no impl -> no emitted vtable) and no source uses it, but it was still moc'd/compiled via GuiQt/CMakeLists. Drop it from the build lists in %prep. - Fix %%doc: top-level readme is README, not README.md. - Use workbench's own moc switch -DWORKBENCH_USE_CMAKE_AUTOMOC=ON (single AUTOMOC path) instead of the bare -DCMAKE_AUTOMOC=ON layered on its manual QT5_WRAP_CPP. * Thu Mar 19 2026 Morgan Hough - 2.1.0-4.20260203gitf8a1b5a - Use %%cmake_install instead of manual find+install - Add glib2-devel, ninja-build BuildRequires - GCC 15 CXXFLAGS (-std=c++17 -include cstdint) - Add wb_shortcuts, bash-completion, desktop-file-validate - Fix icon filenames, add 32x32 icon - Git snapshot release versioning * Sun Jan 04 2026 Morgan Hough - 2.1.0-1 - Initial RPM release for Connectome Workbench v2.1.0