ANTsX / ANTsRCore

Rcpp bindings for the C++ ANTs library used by the ANTsR package
9 stars 9 forks source link

Installation problems on Apple M1 Chip (MacOS 12.3.1) #144

Closed sromanz closed 2 years ago

sromanz commented 2 years ago

I have managed to install ITKR against the ITK master branch (tag:5.3rc03) separately with devtools::install(), however the installation of ANTsRCore fails (see below), even by changing the C++ std version to 14,17 and 20.

Interestingly, on the same machine I was able to install the command line version of ANTs.

Is there anything I can try?

Sandro ++++++++++++++++++++

devtools::install() These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All 2: CRAN packages only 3: None 4: ITKR (0.5.3.3 -> 186128b01...) [GitHub]

Enter one or more numbers, or an empty line to skip updates: 2 ✔ checking for file ‘/Users/sroman/Downloads/ANTsRCore/DESCRIPTION’ ... ─ preparing ‘ANTsRCore’: ✔ checking DESCRIPTION meta-information ... ─ cleaning src ─ running ‘cleanup’ ─ checking for LF line-endings in source and make files and shell scripts (520ms) ─ checking for empty or unneeded directories ─ building ‘ANTsRCore_0.7.5.tar.gz’

Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \ /var/folders/zq/fl6bqg8s3z74q1m4ctn0q_cm0000gp/T//RtmpAtmAmd/ANTsRCore_0.7.5.tar.gz \ --install-tests

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 2251ca1d Merge pull request #1115 from ANTsX/KKDefaults -- The C compiler identification is AppleClang 13.1.6.13160021 -- The CXX compiler identification is AppleClang 13.1.6.13160021 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Not using CCache -- Performing Test C_HAS_WARNING-Wno-uninitialized -- Performing Test C_HAS_WARNING-Wno-uninitialized - Success -- Performing Test C_HAS_WARNING-Wno-unused-parameter -- Performing Test C_HAS_WARNING-Wno-unused-parameter - Success -- Performing Test C_HAS_WARNING-Wall -- Performing Test C_HAS_WARNING-Wall - Success -- Performing Test C_HAS_WARNING-Wno-long-double -- Performing Test C_HAS_WARNING-Wno-long-double - Failed -- Performing Test C_HAS_WARNING-Wcast-align -- Performing Test C_HAS_WARNING-Wcast-align - Success -- Performing Test C_HAS_WARNING-Wdisabled-optimization -- Performing Test C_HAS_WARNING-Wdisabled-optimization - Success -- Performing Test C_HAS_WARNING-Wextra -- Performing Test C_HAS_WARNING-Wextra - Success -- Performing Test C_HAS_WARNING-Wformat_2 -- Performing Test C_HAS_WARNING-Wformat_2 - Success -- Performing Test C_HAS_WARNING-Winvalid-pch -- Performing Test C_HAS_WARNING-Winvalid-pch - Success -- Performing Test C_HAS_WARNING-Wno-format-nonliteral -- Performing Test C_HAS_WARNING-Wno-format-nonliteral - Success -- Performing Test C_HAS_WARNING-Wpointer-arith -- Performing Test C_HAS_WARNING-Wpointer-arith - Success -- Performing Test C_HAS_WARNING-Wshadow -- Performing Test C_HAS_WARNING-Wshadow - Success -- Performing Test C_HAS_WARNING-Wunused -- Performing Test C_HAS_WARNING-Wunused - Success -- Performing Test C_HAS_WARNING-Wwrite-strings -- Performing Test C_HAS_WARNING-Wwrite-strings - Success -- Performing Test C_HAS_WARNING-funit-at-a-time -- Performing Test C_HAS_WARNING-funit-at-a-time - Success -- Performing Test C_HAS_WARNING-Wno-strict-overflow -- Performing Test C_HAS_WARNING-Wno-strict-overflow - Success -- Performing Test CXX_HAS_WARNING-Wall -- Performing Test CXX_HAS_WARNING-Wall - Success -- Performing Test CXX_HAS_WARNING-Wno-long-double -- Performing Test CXX_HAS_WARNING-Wno-long-double - Failed -- Performing Test CXX_HAS_WARNING-Wcast-align -- Performing Test CXX_HAS_WARNING-Wcast-align - Success -- Performing Test CXX_HAS_WARNING-Wdisabled-optimization -- Performing Test CXX_HAS_WARNING-Wdisabled-optimization - Success -- Performing Test CXX_HAS_WARNING-Wextra -- Performing Test CXX_HAS_WARNING-Wextra - Success -- Performing Test CXX_HAS_WARNING-Wformat_2 -- Performing Test CXX_HAS_WARNING-Wformat_2 - Success -- Performing Test CXX_HAS_WARNING-Winvalid-pch -- Performing Test CXX_HAS_WARNING-Winvalid-pch - Success -- Performing Test CXX_HAS_WARNING-Wno-format-nonliteral -- Performing Test CXX_HAS_WARNING-Wno-format-nonliteral - Success -- Performing Test CXX_HAS_WARNING-Wpointer-arith -- Performing Test CXX_HAS_WARNING-Wpointer-arith - Success -- Performing Test CXX_HAS_WARNING-Wshadow -- Performing Test CXX_HAS_WARNING-Wshadow - Success -- Performing Test CXX_HAS_WARNING-Wunused -- Performing Test CXX_HAS_WARNING-Wunused - Success -- Performing Test CXX_HAS_WARNING-Wwrite-strings -- Performing Test CXX_HAS_WARNING-Wwrite-strings - Success -- Performing Test CXX_HAS_WARNING-funit-at-a-time -- Performing Test CXX_HAS_WARNING-funit-at-a-time - Success -- Performing Test CXX_HAS_WARNING-Wno-strict-overflow -- Performing Test CXX_HAS_WARNING-Wno-strict-overflow - Success -- Performing Test CXX_HAS_WARNING-Wno-deprecated -- Performing Test CXX_HAS_WARNING-Wno-deprecated - Success -- Performing Test CXX_HAS_WARNING-Wno-invalid-offsetof -- Performing Test CXX_HAS_WARNING-Wno-invalid-offsetof - Success -- Performing Test CXX_HAS_WARNING-Wno-undefined-var-template -- Performing Test CXX_HAS_WARNING-Wno-undefined-var-template - Success -- Performing Test CXX_HAS_WARNING-Woverloaded-virtual -- Performing Test CXX_HAS_WARNING-Woverloaded-virtual - Success -- Performing Test CXX_HAS_WARNING-Wstrict-null-sentinel -- Performing Test CXX_HAS_WARNING-Wstrict-null-sentinel - Failed -- Performing Test C_HAS_WARNING-mtune_native -- Performing Test C_HAS_WARNING-mtune_native - Success -- Performing Test C_HAS_WARNING-march_corei7 -- Performing Test C_HAS_WARNING-march_corei7 - Failed -- Performing Test CXX_HAS_WARNING-mtune_native -- Performing Test CXX_HAS_WARNING-mtune_native - Success -- Performing Test CXX_HAS_WARNING-march_corei7 -- Performing Test CXX_HAS_WARNING-march_corei7 - Failed -- Found Git: /usr/bin/git (found version "2.32.0 (Apple Git-132)") -- SuperBuild - ANTS => Requires ITKv5, -- SuperBuild - ITKv5[OK] -- SuperBuild - ANTS[OK] -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

COPY_SCRIPT_FILES_TO_BIN_DIR

-- Build files have been written to: /private/var/folders/zq/fl6bqg8s3z74q1m4ctn0q_cm0000gp/T/Rtmp0rHv8W/R.INSTALL9b28128c7ffc/ANTsRCore/src/antb ** libs clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/ -I/private/var/folders/zq/fl6bqg8s3z74q1m4ctn0q_cm0000gp/T/Rtmp0rHv8W/R.INSTALL9b28128c7ffc/ANTsRCore/src -I/private/var/folders/zq/fl6bqg8s3z74q1m4ctn0q_cm0000gp/T/Rtmp0rHv8W/R.INSTALL9b28128c7ffc/ANTsRCore/src/ants/Examples/include/ -I/private/var/folders/zq/fl6bqg8s3z74q1m4ctn0q_cm0000gp/T/Rtmp0rHv8W/R.INSTALL9b28128c7ffc/ANTsRCore/src/ants/Utilities -I/private/var/folders/zq/fl6bqg8s3z74q1m4ctn0q_cm0000gp/T/Rtmp0rHv8W/R.INSTALL9b28128c7ffc/ANTsRCore/src/ants/Examples/ -I../inst/include/ -I/private/var/folders/zq/fl6bqg8s3z74q1m4ctn0q_cm0000gp/T/Rtmp0rHv8W/R.INSTALL9b28128c7ffc/ANTsRCore/src/ants/Tensor/ -I'/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c ANTSIntegrateVelocityField.cpp -o ANTSIntegrateVelocityField.o In file included from ANTSIntegrateVelocityField.cpp:4: In file included from ../inst/include/RcppANTsR.h:4: In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkMacro.h:42: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkConfigure.h:56:6: warning: "WARNING: The current project is configured to use a C++ standard version older than the C++ standard used for this build of ITK" [-W#warnings]

warning "WARNING: The current project is configured to use a C++ standard version older than the C++ standard used for this build of ITK"

 ^

In file included from ANTSIntegrateVelocityField.cpp:4: In file included from ../inst/include/RcppANTsR.h:4: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkMacro.h:192:6: error: "Apple LLVM < 5.1 (clang < 3.4) or compiling with a standard less than C++14 is not supported under ITKv5.3"

error "Apple LLVM < 5.1 (clang < 3.4) or compiling with a standard less than C++14 is not supported under ITKv5.3"

 ^

In file included from ANTSIntegrateVelocityField.cpp:4: In file included from ../inst/include/RcppANTsR.h:5: In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImage.h:21: In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImageRegion.h:33: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkSize.h:327:23: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const] constexpr reference operator[](size_type pos) { return m_InternalArray[pos]; } ^ const /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkSize.h:329:29: error: functions that differ only in their return type cannot be overloaded constexpr const_reference operator[](size_type pos) const { return m_InternalArray[pos]; }


/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkSize.h:327:23: note: previous definition is here
  constexpr reference operator[](size_type pos) { return m_InternalArray[pos]; }
            ~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkSize.h:397:10: warning: variable declaration in a constexpr function is a C++14 extension [-Wc++14-extensions]
    Self result{};
         ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkSize.h:398:5: error: statement not allowed in constexpr function
    for (SizeValueType & sizeValue : result.m_InternalArray)
    ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkSize.h:480:1: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
auto
^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkSize.h:483:37: error: 'auto' not allowed in lambda parameter
  const auto toValueType = [](const auto value) {
                                    ^~~~
In file included from ANTSIntegrateVelocityField.cpp:4:
In file included from ../inst/include/RcppANTsR.h:5:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImage.h:21:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImageRegion.h:34:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkContinuousIndex.h:21:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkPoint.h:22:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkNumericTraits.h:1986:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkFixedArray.h:265:29: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
  constexpr reference       operator[](unsigned int index) { return m_InternalArray[index]; }
                            ^
                                                           const
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkFixedArray.h:266:29: error: functions that differ only in their return type cannot be overloaded
  constexpr const_reference operator[](unsigned int index) const { return m_InternalArray[index]; }
            ~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkFixedArray.h:265:29: note: previous definition is here
  constexpr reference       operator[](unsigned int index) { return m_InternalArray[index]; }
            ~~~~~~~~~       ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkFixedArray.h:432:16: warning: variable declaration in a constexpr function is a C++14 extension [-Wc++14-extensions]
    FixedArray result{};
               ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkFixedArray.h:433:5: error: statement not allowed in constexpr function
    for (ValueType & element : result.m_InternalArray)
    ^
In file included from ANTSIntegrateVelocityField.cpp:4:
In file included from ../inst/include/RcppANTsR.h:5:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImage.h:21:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImageRegion.h:34:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkContinuousIndex.h:21:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkPoint.h:23:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkVector.h:23:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/vnl/vnl_vector_ref.h:17:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/vnl/vnl_vector.h:18:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/vcl_compiler.h:23:2: warning: "WARNING:  The current project is configured to use a C++ standard version older than the C++ standard used for this build of VXL" [-W#warnings]
#warning "WARNING:  The current project is configured to use a C++ standard version older than the C++ standard used for this build of VXL"
 ^
In file included from ANTSIntegrateVelocityField.cpp:4:
In file included from ../inst/include/RcppANTsR.h:5:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImage.h:21:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImageRegion.h:34:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkContinuousIndex.h:21:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkPoint.h:23:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkVector.h:334:1: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
auto
^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkVector.h:338:40: error: 'auto' not allowed in lambda parameter
  const auto assertSameType = [](const auto value) {
                                       ^~~~
In file included from ANTSIntegrateVelocityField.cpp:4:
In file included from ../inst/include/RcppANTsR.h:5:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImage.h:21:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImageRegion.h:34:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkContinuousIndex.h:21:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkPoint.h:354:1: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
auto
^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkPoint.h:358:40: error: 'auto' not allowed in lambda parameter
  const auto assertSameType = [](const auto value) {
                                       ^~~~
In file included from ANTSIntegrateVelocityField.cpp:4:
In file included from ../inst/include/RcppANTsR.h:5:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImage.h:21:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImageRegion.h:34:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkContinuousIndex.h:22:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkIndex.h:415:23: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
  constexpr reference operator[](size_type pos) { return m_InternalArray[pos]; }
                      ^
                                                const
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkIndex.h:417:29: error: functions that differ only in their return type cannot be overloaded
  constexpr const_reference operator[](size_type pos) const { return m_InternalArray[pos]; }
            ~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkIndex.h:415:23: note: previous definition is here
  constexpr reference operator[](size_type pos) { return m_InternalArray[pos]; }
            ~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkIndex.h:475:10: warning: variable declaration in a constexpr function is a C++14 extension [-Wc++14-extensions]
    Self result{};
         ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkIndex.h:476:5: error: statement not allowed in constexpr function
    for (IndexValueType & indexValue : result.m_InternalArray)
    ^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkIndex.h:578:1: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
auto
^
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkIndex.h:581:37: error: 'auto' not allowed in lambda parameter
  const auto toValueType = [](const auto value) {
                                    ^~~~
In file included from ANTSIntegrateVelocityField.cpp:4:
In file included from ../inst/include/RcppANTsR.h:5:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImage.h:329:15: error: no template named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
  friend std::enable_if_t<std::is_same<TEqualityComparable, TPixel>::value, bool>
         ~~~~~^~~~~~~~~~~
              enable_if
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:546:63: note: 'enable_if' declared here
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
                                                              ^
In file included from ANTSIntegrateVelocityField.cpp:4:
In file included from ../inst/include/RcppANTsR.h:5:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkImage.h:369:15: error: no template named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
  friend std::enable_if_t<std::is_same<TEqualityComparable, TPixel>::value, bool>
         ~~~~~^~~~~~~~~~~
              enable_if
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:546:63: note: 'enable_if' declared here
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
                                                              ^
In file included from ANTSIntegrateVelocityField.cpp:4:
In file included from ../inst/include/RcppANTsR.h:6:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkVectorImage.h:23:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkDefaultVectorPixelAccessor.h:22:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkVariableLengthVector.h:1054:13: error: no template named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
inline std::enable_if_t<mpl::And<mpl::IsArray<TExpr1>, mpl::IsArray<TExpr2>>::Value, unsigned int>
       ~~~~~^~~~~~~~~~~
            enable_if
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:546:63: note: 'enable_if' declared here
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
                                                              ^
In file included from ANTSIntegrateVelocityField.cpp:4:
In file included from ../inst/include/RcppANTsR.h:6:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkVectorImage.h:23:
In file included from /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkDefaultVectorPixelAccessor.h:22:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ITKR/libs/include/ITK-5.3/itkVariableLengthVector.h:1073:13: error: no template named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
inline std::enable_if_t<mpl::And<mpl::IsArray<TExpr1>, mpl::Not<mpl::IsArray<TExpr2>>>::Value, unsigned int>
       ~~~~~^~~~~~~~~~~
            enable_if
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:546:63: note: 'enable_if' declared here
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
                                                              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
8 warnings and 20 errors generated.
make: *** [ANTSIntegrateVelocityField.o] Error 1
ERROR: compilation failed for package ‘ANTsRCore’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ANTsRCore’
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  :
  System command 'R' failed, exit status: 1, stdout & stderr were printed