MRtrix3 / mrtrix3

MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
http://www.mrtrix.org
Mozilla Public License 2.0
281 stars 176 forks source link

Unable to build debug preset on Windows #2896

Closed Lestropie closed 1 month ago

Lestropie commented 1 month ago

On the current dev branch, in an MSYS2 environment, I am unable to compile using the debug cmake preset (I had hoped to use this to diagnose mrview segfaulting when trying to evaluate #2887). Multiple compilation objects fail with the message "too many sections". I'm confident we've had this before: I believe it's what triggered the reduction of tckmap template utilisation in #252, and I mentioned it in #1267.

It might be worth considering in the context of #2877. Splitting compilation across a greater number of objects and reducing compilation of the same code multiple times is used to speed up compilation there, whereas here the same logic largely applies but in the goal of making computation tractable.

daljit46 commented 1 month ago

On master we are compiling with -Wa,-mbig-obj. The same works with CMake (tested on my Windows laptop):

cmake --preset debug -DCMAKE_CXX_FLAGS="-Wa,-mbig-obj"
cmake --build ../build-mrtrix3-debug

Maybe it's worth adding this to the debug preset or create a separate "debug-windows" preset? We could also add this in the top level CMakeLists.txt using add_compile_options.

daljit46 commented 1 month ago

Closed by #2897