SuperElastix / SimpleElastix

Multi-lingual medical image registration library
http://simpleelastix.github.io
Apache License 2.0
509 stars 149 forks source link

Compiling error MacOS 11.2 M1 MacBook Pro #413

Open vkyprmr opened 3 years ago

vkyprmr commented 3 years ago

I tried installing SimpleElastix as mentioned here, but I am having the following error:

In file included from /Users/vickyparmar/collection/git/simelastix/build/ITK/Modules/Core/Common/src/itkFloatingPointExceptions.cxx:127:
/Users/vickyparmar/collection/git/simelastix/build/ITK/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx:140:3: error:
      use of undeclared identifier 'itk_feenableexcept'
  itk_feenableexcept(FE_DIVBYZERO);
  ^
/Users/vickyparmar/collection/git/simelastix/build/ITK/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx:141:3: error:
      use of undeclared identifier 'itk_feenableexcept'
  itk_feenableexcept(FE_INVALID);
  ^
/Users/vickyparmar/collection/git/simelastix/build/ITK/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx:162:3: error:
      use of undeclared identifier 'itk_fedisableexcept'
  itk_fedisableexcept(FE_DIVBYZERO);
  ^
/Users/vickyparmar/collection/git/simelastix/build/ITK/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx:163:3: error:
      use of undeclared identifier 'itk_fedisableexcept'
  itk_fedisableexcept(FE_INVALID);
  ^
4 errors generated.
make[5]: *** [Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/itkFloatingPointExceptions.cxx.o] Error 1
make[4]: *** [Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [ITK-prefix/src/ITK-stamp/ITK-build] Error 2
make[1]: *** [CMakeFiles/ITK.dir/all] Error 2
make: *** [all] Error 2

Can anyone help me?

dd119-ic commented 3 years ago

I've been having the same problem too.

AntoineRibault commented 3 years ago

Same problem here!

Any thoughts?

Pedro-Filipe commented 3 years ago

Same problem on my Mac mini M1. Any solutions?

Pedro-Filipe commented 3 years ago

I've changed to the develop branch today, and I was able to compile OK! Natively on my Mac mini M1.

I have tested my registration code and it worked.

Potentially important note:

Only installed the Python wrap: WRAP_PYTHON:BOOL=ON All other wraps OFF.

I have also turned OFF testing: BUILD_TESTING:BOOL=OFF

Joeycho commented 2 years ago

I've changed to the develop branch today, and I was able to compile OK! Natively on my Mac mini M1.

I have tested my registration code and it worked.

Potentially important note:

Only installed the Python wrap: WRAP_PYTHON:BOOL=ON All other wraps OFF.

I have also turned OFF testing: BUILD_TESTING:BOOL=OFF

This helped me! Although I had to process more errors after that for Python wrapping. https://github.com/SuperElastix/SimpleElastix/issues/438#issuecomment-1221599390

JiahaoHuang99 commented 1 year ago

Seems this happen when using main branch.

When switch to develop branch, it failed to generate /SimpleITK-build/Wrapping/Python/Packaging/setup.py, only setup.py.in.

Info: MacOS M2 Version 13.0.1 (22A400)