I use R 4.0.3 on my MacBookPro, I tried example and failed on iNextPD function.
data(bird)
bird.abu <- bird$abun
bird.lab <- rownames(bird$abun)
bird.phy <- ade4::newick2phylog(bird$tre)
iNextPD(bird.abu, labels=bird.lab, phy=bird.phy, q=0, datatype="abundance")
the error massages are:
In file included from file7662e9e740f.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/RcppCommon.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/r/headers.h:67:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:304:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/math.h:308:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:724:50: error: use of undeclared identifier 'char8_t'; did you mean 'char32_t'?
template <> struct __libcpp_is_integral<char8_t> : public true_type {};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:724:57: error: expected '(' for function-style cast or type construction
template <> struct __libcpp_is_integral<char8_t> : public true_type {};
~~~~~~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1091:41: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
struct __add_const {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1091:66: error: expected ';' at end of declaration list
struct __add_const {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1094:41: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
struct __add_const<_Tp, false> {typedef _LIBCPP_NODEBUG_TYPE const _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1094:72: error: expected ';' at end of declaration list
struct __add_const<_Tp, false> {typedef _LIBCPP_NODEBUG_TYPE const _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1097:14: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
{typedef _LIBCPP_NODEBUG_TYPE typename __add_const<_Tp>::type type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1114:14: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
{typedef _LIBCPP_NODEBUG_TYPE typename __add_volatile<_Tp>::type type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1123:14: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
{typedef _LIBCPP_NODEBUG_TYPE typename add_const<typename add_volatile<_Tp>::type>::type type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1131:83: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1131:107: error: expected ';' at end of declaration list
template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1132:83: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1132:107: error: expected ';' at end of declaration list
template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1134:83: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1134:107: error: expected ';' at end of declaration list
template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1143:117: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_impl { typedef _LIBCPP_NODEBUG_TYPE _Tp type; };
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1143:141: error: expected ';' at end of declaration list
template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_impl { typedef _LIBCPP_NODEBUG_TYPE _Tp type; };
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1144:117: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template struct __add_lvalue_reference_impl<_Tp, true> { typedef _LIBCPP_NODEBUG_TYPE _Tp& type; };
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1144:141: error: expected ';' at end of declaration list
template struct __add_lvalue_reference_impl<_Tp, true> { typedef _LIBCPP_NODEBUG_TYPE _Tp& type; };
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [file7662e9e740f.o] Error 1
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include" -I"/private/var/folders/ff/g8pb54v90j387z9x_vv8tj7w0000gn/T/RtmpqnROMN/sourceCpp-x86_64-apple-darwin17.0-1.0.5" -I/usr/local/include -fPIC -Wall -g -O2 -c file7662e9e740f.cpp -o file7662e9e740f.o
Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, :
Error 1 occurred building shared library.
I use R 4.0.3 on my MacBookPro, I tried example and failed on iNextPD function.
data(bird)
bird.abu <- bird$abun
bird.lab <- rownames(bird$abun)
bird.phy <- ade4::newick2phylog(bird$tre)
iNextPD(bird.abu, labels=bird.lab, phy=bird.phy, q=0, datatype="abundance")
the error massages are:
In file included from file7662e9e740f.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/RcppCommon.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/r/headers.h:67:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:304:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/math.h:308:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:724:50: error: use of undeclared identifier 'char8_t'; did you mean 'char32_t'?
template <> struct __libcpp_is_integral<char8_t> : public true_type {};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:724:57: error: expected '(' for function-style cast or type construction
template <> struct __libcpp_is_integral<char8_t> : public true_type {};
~~~~~~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1091:41: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
struct __add_const {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1091:66: error: expected ';' at end of declaration list
struct __add_const {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1094:41: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
struct __add_const<_Tp, false> {typedef _LIBCPP_NODEBUG_TYPE const _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1094:72: error: expected ';' at end of declaration list
struct __add_const<_Tp, false> {typedef _LIBCPP_NODEBUG_TYPE const _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1097:14: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
{typedef _LIBCPP_NODEBUG_TYPE typename __add_const<_Tp>::type type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1114:14: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
{typedef _LIBCPP_NODEBUG_TYPE typename __add_volatile<_Tp>::type type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1123:14: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
{typedef _LIBCPP_NODEBUG_TYPE typename add_const<typename add_volatile<_Tp>::type>::type type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1131:83: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1131:107: error: expected ';' at end of declaration list
template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1132:83: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1132:107: error: expected ';' at end of declaration list
template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1134:83: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1134:107: error: expected ';' at end of declaration list
template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;};
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1143:117: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_impl { typedef _LIBCPP_NODEBUG_TYPE _Tp type; };
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1143:141: error: expected ';' at end of declaration list
template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_impl { typedef _LIBCPP_NODEBUG_TYPE _Tp type; };
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1144:117: error: unknown type name '_LIBCPP_NODEBUG_TYPE'
template struct __add_lvalue_reference_impl<_Tp, true> { typedef _LIBCPP_NODEBUG_TYPE _Tp& type; };
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1144:141: error: expected ';' at end of declaration list
template struct __add_lvalue_reference_impl<_Tp, true> { typedef _LIBCPP_NODEBUG_TYPE _Tp& type; };
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [file7662e9e740f.o] Error 1
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include" -I"/private/var/folders/ff/g8pb54v90j387z9x_vv8tj7w0000gn/T/RtmpqnROMN/sourceCpp-x86_64-apple-darwin17.0-1.0.5" -I/usr/local/include -fPIC -Wall -g -O2 -c file7662e9e740f.cpp -o file7662e9e740f.o
Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, :
Error 1 occurred building shared library.