Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ppruc opened this issue Sep 17, 2024 · 1 comment
Open

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

ppruc opened this issue Sep 17, 2024 · 1 comment
Labels

Comments

@ppruc
Copy link

ppruc commented Sep 17, 2024

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:

  • Clone the MRtrix3 dev branch
  • cmake -B build -DCMAKE_INSTALL_PREFIX=path/to/install.
    The error occurs because CMake attempts to use the non-existent SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk.

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

@ppruc ppruc added the bug label Sep 17, 2024
@daljit46
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants