############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL Cardinal ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library’ * installing *source* package ‘Cardinal’ ... ** using staged installation ** libs clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c DIP.cpp -o DIP.o In file included from DIP.cpp:2: In file included from ./Cardinal.h:9: In file included from /Library/Frameworks/R.framework/Resources/include/Rinternals.h:36: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:56:1: error: templates must have C++ linkage template struct __libcpp_is_integral { enum { value = 0 }; }; ^~~~~~~~~~~~~~~~~~~~ ./Cardinal.h:7:1: note: extern "C" language linkage specification begins here extern "C" ^ In file included from DIP.cpp:2: In file included from ./Cardinal.h:9: In file included from /Library/Frameworks/R.framework/Resources/include/Rinternals.h:36: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:57:29: error: explicit specialization of undeclared template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:58:29: error: explicit specialization of non-template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:58:29: error: redefinition of '__libcpp_is_integral' /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:57:29: note: previous definition is here template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:59:29: error: explicit specialization of non-template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:59:29: error: redefinition of '__libcpp_is_integral' /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:57:29: note: previous definition is here template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:60:29: error: explicit specialization of non-template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:60:29: error: redefinition of '__libcpp_is_integral' /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:57:29: note: previous definition is here template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:62:29: error: explicit specialization of non-template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:62:29: error: redefinition of '__libcpp_is_integral' /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:57:29: note: previous definition is here template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:68:29: error: explicit specialization of non-template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:68:29: error: redefinition of '__libcpp_is_integral' /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:57:29: note: previous definition is here template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:69:29: error: explicit specialization of non-template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:69:29: error: redefinition of '__libcpp_is_integral' /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:57:29: note: previous definition is here template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:71:29: error: explicit specialization of non-template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:71:29: error: redefinition of '__libcpp_is_integral' /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:57:29: note: previous definition is here template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:72:29: error: explicit specialization of non-template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:72:29: error: redefinition of '__libcpp_is_integral' /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:57:29: note: previous definition is here template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:73:29: error: explicit specialization of non-template struct '__libcpp_is_integral' template <> struct __libcpp_is_integral { enum { value = 1 }; }; ^ ~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [DIP.o] Error 1 ERROR: compilation failed for package ‘Cardinal’ * removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Cardinal’