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
294 stars 181 forks source link

CMake SDK Path Issue in MRtrix3 Dev Branch on macOS #3003

Open ppruc opened 2 months ago

ppruc commented 2 months ago

Hi everyone,

just had the issue that CMake fails to build MRtrix3 dev branch on macOS due to an incorrect SDK path. CMake references the outdated macOS SDK MacOSX13.3.sdk on my system, which no longer exists (recently upgraded to OS14), instead of the correct SDK (MacOSX14.5.sdk). This leads to errors regarding the PNG library and other dependencies.

To Reproduce:

I managed to get it running by specfifying

-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk

manually, but thought I'll post in case someone else comes across this issue/bug is not known !

Best, Philip

Platform/Environment/Version OS: macOS 14.6.1 MRtrix3 version: dev

daljit46 commented 2 months ago

Hi, thanks for the bug report. CMake determines the value of CMAKE_OSX_SYSROOT by looking at the SDKROOT environment variable. Perhaps you need to set that to the correct location to avoid specifying CMAKE_OSX_SYSROOT manually. Also, if you have built the project before the OS upgrade, simply deleting the build directory and then rebuilding from scratch may solve the issue.