Skip to content

Refactor: modernize cmake, boost, qt, and others to the latest or near latest#2463

Open
basisunus wants to merge 148 commits into
masterfrom
refactor
Open

Refactor: modernize cmake, boost, qt, and others to the latest or near latest#2463
basisunus wants to merge 148 commits into
masterfrom
refactor

Conversation

@basisunus
Copy link
Copy Markdown
Contributor

Built on Windows 10 with Visual Studio 2022.
Runs on Windows.
Some issues with vector out of bound, possibly initialization issues and qt related.

@basisunus
Copy link
Copy Markdown
Contributor Author

looks like the windows failures are from a misconfiguration of qwt path for packaging. since it's built as static, there is no need to add it to packaging.

@basisunus basisunus marked this pull request as ready for review May 4, 2026 18:48
Copy link
Copy Markdown
Member

@dcwhite dcwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it's OK, we'll need to enable testing before it gets merged to master though. I requested several easy clean-up-style changes. I'll try to run this through AI review as well. @basisunus @jessdtate

Comment thread scripts/clean-boost-only.ps1 Outdated
@@ -0,0 +1,16 @@
$BuildDir = "C:\Users\Yong\Documents\SCIRun\build"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix hard-coded path, or don't check this in

Comment thread scripts/clean-build.ps1 Outdated
# Safe SCIRun build directory cleanup
# ============================================================

$ExpectedBuildDir = "C:\Users\Yong\Documents\SCIRun\build"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

TARGET_LINK_LIBRARIES(Core_CommandLine
${SCI_BOOST_LIBRARY}
Boost::filesystem
Boost::program_options
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this because it shows exactly what we're using in Boost and where. Will make replacement easier down the road


#include <gtest/gtest.h>

/// @todo: this won't link in debug mode due to Logging::Instance impl
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@basisunus Make a github issue to fix this later

Comment thread src/Core/Python/PythonInterpreter.cc Outdated
// Remove intermediate python variables
PyRun_SimpleString( "del (interpreter, __internal_compiler, __term_io, __term_err)\n" );
PRINT_PY_INIT_DEBUG(12);
PyRun_SimpleString("del (interpreter, __internal_compiler, __term_io, __term_err)\n");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole file is a mess (it was already a mess), it will need heavy testing on all three platforms. I'll make a new issue

# ------------------------------------------------------------
IF(IS_DIRECTORY "${Qt_PATH}")
if (QT_VERSION_MAJOR STREQUAL "6")
FIND_PACKAGE(Qt${QT_VERSION_MAJOR} ${SCIRUN_QT_MIN_VERSION}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, here is an example so you don't litter cmakes with IF 5 ELSE 6 stuff

Comment thread Superbuild/Superbuild.cmake Outdated

IF(WITH_OSPRAY)
ADD_EXTERNAL( ${SUPERBUILD_DIR}/OsprayExternal.cmake Ospray_external )
INCLUDE(${SUPERBUILD_DIR}/TBBExternal.cmake)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this section or just comment it out

Comment thread Superbuild/TBBExternal.cmake Outdated
@@ -0,0 +1,47 @@
# For more information, please see: http://software.sci.utah.edu
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete

# DEALINGS IN THE SOFTWARE.

SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})
# -------------------------------------------------------
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an improvement, but still should've been done separately.

Comment thread Superbuild/TnyWriteConfig.cmake Outdated
@@ -0,0 +1,4 @@

set(_cfg_dir "C:/Users/Yong/Documents/SCIRun/build/Externals/Install/Tny_external/lib/cmake/Tny")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded paths, please fix

@dcwhite
Copy link
Copy Markdown
Member

dcwhite commented May 6, 2026

Python crashes on Mac:

Thread 18 Crashed:
0 Python 0x106ff759c _PyErr_SetRaisedException + 0 (errors.c:27) [inlined]
1 Python 0x106ff759c _PyErr_Restore + 0 (errors.c:65) [inlined]
2 Python 0x106ff759c _PyErr_Clear + 0 (errors.c:524) [inlined]
3 Python 0x106ff759c PyErr_Clear + 28 (errors.c:532)
4 libCore_Python.dylib 0x105e572cc SCIRun::Core::PythonInterpreter::run_string(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&) + 76
5 libModules_Python.dylib 0x105935354 SCIRun::Modules::Python::InterfaceWithPython::runTopLevelCode() const + 364
6 libModules_Python.dylib 0x105933c0c SCIRun::Modules::Python::InterfaceWithPython::execute() + 184
7 libDataflow_Network.dylib 0x1060dda68 SCIRun::Dataflow::Networks::Module::executeWithSignals() + 552
8 libInterface_Application.dylib 0x102dcbb00 SCIRun::Gui::ModuleWidget::executeWithSignals() + 112
9 libEngine_Scheduler.dylib 0x103ea6e0c SCIRun::Dataflow::Engine::DynamicExecutor::ModuleExecutor::run() const + 404
10 libEngine_Scheduler.dylib 0x103ea6c30 void* std::__1::__thread_proxy[abi:ne200100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct>, SCIRun::Dataflow::Engine::DynamicExecutor::ExecutionThreadGroup::startExecution(SCIRun::Dataflow::Engine::DynamicExecutor::ModuleExecutor const&)::'lambda'()>>(void*) + 56
11 libsystem_pthread.dylib 0x1952c7bc8 _pthread_start + 136
12 libsystem_pthread.dylib 0x1952c2b80 thread_start + 8

)
endif()
TARGET_LINK_LIBRARIES(Interface_Modules_Math
Qt::Svg
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dcwhite
Copy link
Copy Markdown
Member

dcwhite commented May 6, 2026

To smoke test Python, add an InterfaceWithPython module then type "print(1)" in the code editor. Click Execute, and it should print the number 1 to the console.
Screenshot 2026-05-05 at 10 55 16 PM

@basisunus
Copy link
Copy Markdown
Contributor Author

python runs without crash on mac

@dcwhite
Copy link
Copy Markdown
Member

dcwhite commented May 14, 2026

python runs without crash on mac

Confirmed on my Macbook Air M4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants