pnlbwh / pnlNipype

PNL pipeline for NIFTI images
Other
10 stars 15 forks source link

cmd/install.py issue UKFTractography on Apple M2 Pro chip #107

Closed kavandeloo closed 11 months ago

kavandeloo commented 1 year ago

Hi Tashrif! I'm trying pnlNipype on an Apple M2 Pro chip, not sure if it can be done. I have Python 3.10.12; Miniconda3 https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh; FSL 6.0.6.5; I built ANTs from source (https://github.com/ANTsX/ANTs/wiki/Compiling-ANTs-on-Linux-and-Mac-OS); FreeSurfer 7.4.1.

Could you provide insight into this problem with the installation of UKFTractography?

(pnlpipe3) katievandeloo@Katies-MacBook-Pro pnlNipype % cmd/install.py UKFTractography Switched to branch 'master' Your branch is up to date with 'origin/master'. Already up to date. Note: switching to 'fcf83e2'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at fcf83e2 Merge pull request #147 from zhangfanmark/Trace-Fix Traceback (most recent call last): File "/Users/katievandeloo/pnlNipype/cmd/install.py", line 31, in SoftwareCommand() File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/plumbum/cli/application.py", line 177, in new return cls.run() File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/plumbum/cli/application.py", line 633, in run retcode = inst.main(*tailargs) File "/Users/katievandeloo/pnlNipype/cmd/install.py", line 28, in main softwareModule.make() File "/Users/katievandeloo/pnlNipype/pnlpipe_software/UKFTractography.py", line 32, in make cmake(repo) File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/plumbum/commands/base.py", line 113, in call return self.run(args, **kwargs)[1] File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/plumbum/commands/base.py", line 252, in run return p.run() File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/plumbum/commands/base.py", line 215, in runner return run_proc(p, retcode, timeout) File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/plumbum/commands/processes.py", line 299, in run_proc return _check_process(proc, retcode, timeout, stdout, stderr) File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/plumbum/commands/processes.py", line 17, in _check_process proc.verify(retcode, timeout, stdout, stderr) File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/plumbum/machines/base.py", line 27, in verify raise ProcessExecutionError( plumbum.commands.processes.ProcessExecutionError: Unexpected exit code: 1 Command line: /Users/katievandeloo/miniconda3/envs/pnlpipe3/bin/cmake /Users/katievandeloo/pnlNipype/pnlpipe_software/ukftractography Stdout: -- Setting C++ standard -- Setting C++ standard - C++11 -- Configuring incomplete, errors occurred! Stderr: CMake Error at CMake/SlicerBlockSetCMakeOSXVariables.cmake:102 (message): The OSX_SYSROOT is set to version 13.3 (>10.8) and OSX_DEPLOYMENT_TARGET is not explicitly set!
Since:
(1) the default runtime associated with >=10.9 deployment target is 'libc++'.[1]
(2) the default runtime associated with <=10.8 deployment target is 'libstdc++'.
(3) Qt support for 'macx-clang-libc++' is listed as 'unsupported' mkspecs.
(4) Qt binaries may be build against 'libstdc++' or 'libc++'.
(5) Mixing the two different runtime in binaries is unstable.
[1]http://stackoverflow.com/questions/19637164/c-linking-error-after-upgrading-to-mac-os-x-10-9-xcode-5-0-1/19637199#19637199
--------------------------------
Run '$otool -L $(which qmake) grep lib.*c++' to check what library Qt is
built against:
(1) if it is libstdc++ then add '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.8' (or older) to the cmake command line.
(2) if it is libc++ then add '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9' (or newer) to the cmake command line.
Call Stack (most recent call first):
CMakeLists.txt:21 (include)
kavandeloo commented 1 year ago

This is the same for the Standalone Superbuild (https://github.com/pnlbwh/ukftractography/blob/master/README.md):

(pnlpipe3) katievandeloo@Katies-MacBook-Pro build % cmake ~/ukftractography -- Setting C++ standard -- Setting C++ standard - C++11 -- Setting OSX_ARCHITECTURES to 'x86_64' as none was specified. -- Setting OSX_SYSROOT to latest '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk' as none was specified. CMake Error at CMake/SlicerBlockSetCMakeOSXVariables.cmake:102 (message): The OSX_SYSROOT is set to version 13.3 (>10.8) and OSX_DEPLOYMENT_TARGET is not explicitly set!

Since:

(1) the default runtime associated with >=10.9 deployment target is 'libc++'.[1] (2) the default runtime associated with <=10.8 deployment target is 'libstdc++'. (3) Qt support for 'macx-clang-libc++' is listed as 'unsupported' mkspecs. (4) Qt binaries may be build against 'libstdc++' or 'libc++'. (5) Mixing the two different runtime in binaries is unstable. [1]http://stackoverflow.com/questions/19637164/c-linking-error-after-upgrading-to-mac-os-x-10-9-xcode-5-0-1/19637199#19637199


Run '$otool -L $(which qmake) |grep lib.*c++' to check what library Qt is built against:

(1) if it is libstdc++ then add '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.8' (or older) to the cmake command line. (2) if it is libc++ then add '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9' (or newer) to the cmake command line.

Call Stack (most recent call first): CMakeLists.txt:21 (include)

-- Configuring incomplete, errors occurred!

tashrifbillah commented 11 months ago

This would be very hard to build by not a computer engineer. Your best bet is to switch to a Linux computer, particularly CentOS 7, and try to build there.