Attempting to install from source on an Apple M1 mac gives the error shown below. It works fine under an identical setup using the x86 compiler, so I suspect this is something specific to the arm compiler. I have compiled R from source and all other dependencies are installed without error from source, tested with both R 4.0.3 and 4.1.0. Unfortunately I have no experience with C/C++ to help with this, but wanted to document in case I'm doing something wrong or as others may run into the same issue.
Thanks!
Aalim
`clang++ -I"/Users/aalim/Downloads/R_arm_compile/R-devel/include" -DNDEBUG -I/opt/homebrew/include/ -I/Users/aalim/Downloads/R_arm_compile/R-devel/include -I../inst/include -I/usr/local/include -fPIC -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 /Users/aalim/Downloads/R_arm_compile/R-devel/include/Rinternals.h:36:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstddef:45:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__nullptr:34:5: error: templates must have C++ linkage
template
^~~~~~~~
./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 /Users/aalim/Downloads/R_arm_compile/R-devel/include/Rinternals.h:36:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstddef:45:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__nullptr:38:5: error: templates must have C++ linkage
template <class _Tp, class _Up>
^~~~~~~
./Cardinal.h:7:1: note: extern "C" language linkage specification begins here
extern "C"
^
2 errors generated.
make: *** [DIP.o] Error 1
ERROR: compilation failed for package ‘Cardinal’
Attempting to install from source on an Apple M1 mac gives the error shown below. It works fine under an identical setup using the x86 compiler, so I suspect this is something specific to the arm compiler. I have compiled R from source and all other dependencies are installed without error from source, tested with both R 4.0.3 and 4.1.0. Unfortunately I have no experience with C/C++ to help with this, but wanted to document in case I'm doing something wrong or as others may run into the same issue.
Thanks!
Aalim
`clang++ -I"/Users/aalim/Downloads/R_arm_compile/R-devel/include" -DNDEBUG -I/opt/homebrew/include/ -I/Users/aalim/Downloads/R_arm_compile/R-devel/include -I../inst/include -I/usr/local/include -fPIC -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 /Users/aalim/Downloads/R_arm_compile/R-devel/include/Rinternals.h:36: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstddef:45: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__nullptr:34:5: error: templates must have C++ linkage template
^
~~~~~~~ ./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 /Users/aalim/Downloads/R_arm_compile/R-devel/include/Rinternals.h:36: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstddef:45: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__nullptr:38:5: error: templates must have C++ linkage template <class _Tp, class _Up> ^~~~~~~./Cardinal.h:7:1: note: extern "C" language linkage specification begins here extern "C" ^ 2 errors generated. make: *** [DIP.o] Error 1 ERROR: compilation failed for package ‘Cardinal’