微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

R软件包安装给出一个`:: std :: isxdigit'声明为致命错误` Rcpp的错误消息:安装脚本 R会话 Hombrew版本

如何解决R软件包安装给出一个`:: std :: isxdigit'声明为致命错误` Rcpp的错误消息:安装脚本 R会话 Hombrew版本

我最近在Mac(10.14.6(18G6020))上更新了 Homebrew ,并继续重新编译R的开发版本。我构建了一个安装脚本,以确保执行相同的步骤。每次拍摄(见下文)。 R成功编译并通过所有检查。但是,当我开始安装Rcppdevtoolsapelme4等软件包时,在编译过程中会得到::std::isxdigit declared here ,并且安装失败。

在这里发布Rcpp,安装脚本,sessionInfo()和brew版本的错误消息。解决该问题的任何帮助将不胜感激,

谢谢!

Rcpp的错误消息:

  * installing *source* package ‘Rcpp’ ...
  ** package ‘Rcpp’ successfully unpacked and MD5 sums checked
  ** using staged installation
  ** libs
  clang++ -std=gnu++11 -I"/Library/Frameworks//R.framework/Resources/include" -DNDEBUG -I../inst/include/  -isysroot /Library/Developer/CommandLinetools/SDKs/MacOSX.sdk -I/usr\
    /local/opt/icu4c/include -I/usr/local/opt/gettext/include -I/usr/local/opt/curl/include -I/usr/local/include -I/usr/local/opt/cairo/include -I/usr/local/opt/pango/include/pa\
    ngo-1.0/pango -I/usr/local/opt/tcl-tk/include   -fPIC  -Wall -g -O3  -c api.cpp -o api.o
  In file included from api.cpp:24:
  In file included from ../inst/include/Rcpp.h:27:
  In file included from ../inst/include/RcppCommon.h:51:
  In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/iostream:38:
 In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/ios:216:
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:116:20: error: use
       of undeclared identifier 'LC_COLLATE_MASK'
         collate  = LC_COLLATE_MASK,^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:117:20: error: use
       of undeclared identifier 'LC_CTYPE_MASK'
         ctype    = LC_CTYPE_MASK,^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:118:20: error: use
       of undeclared identifier 'LC_MONETARY_MASK'
         monetary = LC_MONETARY_MASK,^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:119:20: error: use
       of undeclared identifier 'LC_NUMERIC_MASK'
         numeric  = LC_NUMERIC_MASK,^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:120:20: error: use
       of undeclared identifier 'LC_TIME_MASK'
         time     = LC_TIME_MASK,^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:121:20: error: use
       of undeclared identifier 'LC_MESSAGES_MASK'
         messages = LC_MESSAGES_MASK,^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:330:5: error:
       unkNown type name 'locale_t'; did you mean 'locale'?                                                                                                                    
     locale_t __l;                                                                                                                                                             
     ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:105:24: note:
       'locale' declared here
 class _LIBCPP_TYPE_VIS locale
                        ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:349:5: error:
       unkNown type name 'locale_t'; did you mean 'locale'?       
     locale_t __l;                                                                                                                                                             
     ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:105:24: note:
       'locale' declared here
 class _LIBCPP_TYPE_VIS locale
                        ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:708:5: error:
       unkNown type name 'locale_t'; did you mean 'locale'?                                                                                                                    
     locale_t __l;                                                                                                                                                             
     ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:105:24: note:
       'locale' declared here
 class _LIBCPP_TYPE_VIS locale
                        ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:726:5: error:
       unkNown type name 'locale_t'; did you mean 'locale'?                                                                                                                    
     locale_t __l;                                                                                                                                                             
     ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:105:24: note:
       'locale' declared here
 class _LIBCPP_TYPE_VIS locale
                        ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:958:5: error:
       unkNown type name 'locale_t'; did you mean 'locale'?                                                                                                                    
     locale_t __l;                                                                                                                                                             
     ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/__locale:105:24: note:
       'locale' declared here
 class _LIBCPP_TYPE_VIS locale
                        ^
 In file included from api.cpp:24:
 In file included from ../inst/include/Rcpp.h:27:
 In file included from ../inst/include/RcppCommon.h:51:
 In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/iostream:40:
 In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/istream:163:
 In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/ostream:140:
 /Library/Developer/CommandLinetools/usr/include/c++/v1/locale:739:26: error: use of
       undeclared identifier 'strtoll_l'
         long long __ll = strtoll_l(__a,&__p2,__base,_LIBCPP_GET_C_LOCALE);                                                                                                 
                          ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/locale:779:35: error: use of
       undeclared identifier 'strtoull_l'
         unsigned long long __ll = strtoull_l(__a,_LIBCPP_GET...
                                   ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/locale:808:12: error: use of
       undeclared identifier 'strtof_l'
     return strtof_l(__a,__p2,_LIBCPP_GET_C_LOCALE);                                                                                                                         
            ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/locale:814:12: error: use of
       undeclared identifier 'strtod_l'
     return strtod_l(__a,_LIBCPP_GET_C_LOCALE);                                                                                                                         
            ^
 /Library/Developer/CommandLinetools/usr/include/c++/v1/locale:820:12: error: use of
       undeclared identifier 'strtold_l'; did you mean 'strtoll'?                                                                                                              
     return strtold_l(__a,_LIBCPP_GET_C_LOCALE);                                                                                                                        
           ^
/Library/Developer/CommandLinetools/usr/include/c++/v1/cstdlib:117:9: note:
      'strtoll' declared here
using ::strtoll;                                                                                                                                                              
        ^
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:51:
In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/iostream:40:
In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/istream:163:
In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/ostream:140:
/Library/Developer/CommandLinetools/usr/include/c++/v1/locale:1094:9: error: use of
      undeclared identifier 'sscanf_l'
    if (__libcpp_sscanf_l(__buf.c_str(),_LIBCPP_GET_C_LOCALE,"%p",&__v) != 1)
        ^
/Library/Developer/CommandLinetools/usr/include/c++/v1/__bsd_locale_defaults.h:35:61: note:
      expanded from macro '__libcpp_sscanf_l'
#define __libcpp_sscanf_l(...)                              sscanf_l(__VA_ARGS__)
                                                            ^
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:51:
In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/iostream:40:
In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/istream:163:
In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/ostream:140:
/Library/Developer/CommandLinetools/usr/include/c++/v1/locale:1199:18: error: use of
      undeclared identifier 'isxdigit_l'; did you mean 'isxdigit'?                                                                                                            
            if (!isxdigit_l(*__ns,_LIBCPP_GET_C_LOCALE))
                 ^
/Library/Developer/CommandLinetools/usr/include/c++/v1/cctype:115:9: note:
      'isxdigit' declared here
using ::isxdigit;                                                                                                                                                             
        ^
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:51:
In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/iostream:40:
In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/istream:163:
In file included from /Library/Developer/CommandLinetools/usr/include/c++/v1/ostream:140:
/Library/Developer/CommandLinetools/usr/include/c++/v1/locale:1199:18: error: too
      many arguments to function call,expected 1,have 2; did you mean                                                                                                       
      '::std::isxdigit'?
            if (!isxdigit_l(*__ns,_LIBCPP_GET_C_LOCALE))
                 ^~~~~~~~~~
/Library/Developer/CommandLinetools/usr/include/c++/v1/cctype:115:9: note:
      '::std::isxdigit' declared here
using ::isxdigit;                                                                                                                                                             
        ^
Fatal error: too many errors emitted,stopping Now [-ferror-limit=]
20 errors generated.
make: *** [api.o] Error 1
ERROR: compilation Failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp’
ERROR: dependency ‘Rcpp’ is not available for package ‘minqa’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/minqa’
ERROR: dependency ‘Rcpp’ is not available for package ‘RcppEigen’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppEigen’
ERROR: dependencies ‘minqa’,‘nloptr’,‘Rcpp’,‘RcppEigen’ are not available for package ‘lme4’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/lme4’

The downloaded source packages are in
        ‘/private/var/folders/f7/v_vt_5bn07z9tljnh56n9crnrzdbg9/T/RtmpuouQQU/downloaded_packages’
Warning messages:
1: In install.packages("lme4") :
  installation of package ‘nloptr’ had non-zero exit status
2: In install.packages("lme4") :
  installation of package ‘Rcpp’ had non-zero exit status
3: In install.packages("lme4") :
  installation of package ‘minqa’ had non-zero exit status
4: In install.packages("lme4") :
  installation of package ‘RcppEigen’ had non-zero exit status
5: In install.packages("lme4") :
  installation of package ‘lme4’ had non-zero exit status

安装脚本

## remove binaries,etc                                                                                                                                                        
make distclean
## update                                                                                                                                                                      
svn update
## get recommended tools                                                                                                                                                       
./tools/rsync-recommended

## other variables                                                                                                                                                             
PKG_CONfig_PATH=/opt/X11/lib/pkgconfig:/usr/local/opt/curl/lib/pkgconfig
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-15.jdk/Contents/Home/
JAVA_CPPFLAGS="-I/${JAVA_HOME}/include -I/${JAVA_HOME}/include/darwin"
JAVA_LD_LIBRARY_PATH="${JAVA_HOME}/jre/lib/server"
JAVA_LIBS="-L/${JAVA_HOME}/jre/lib/server -ljvm"

export LDFLAGS="-L/usr/local/opt/curl/lib -L/usr/local/opt/tcl-tk/lib"
export CPPFLAGS="-isysroot /Library/Developer/CommandLinetools/SDKs/MacOSX.sdk -I/usr/local/opt/icu4c/include -I/usr/local/opt/gettext/include -I/usr/local/opt/curl/include -\
   I/usr/local/include -I/usr/local/opt/cairo/include -I/usr/local/opt/pango/include/pango-1.0/pango -I/usr/local/opt/tcl-tk/include"
export PKG_CONfig_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig:/usr/local/opt/curl/lib/pkgconfig:$PKG_CONfig_PATH"

export CC=clang
export CXX=clang++
export FC=/usr/local/bin/gfortran
export OBJC=clang
export CFLAGS='-Wall -g -O3'
export CXXFLAGS='-Wall -g -O3'
export OBJCFLAGS='-Wall -g -O3'
export FFLAGS='-Wall -g -O3 -mtune=generic'
export LC_ALL='C'

./configure --enable-R-framework=/Library/Frameworks/ \
            --with-blas="-framework Accelerate" --with-lapack \
            --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib \
            --with-internal-tzcode --with-cairo=yes

make

make install

R会话

> sessionInfo()
R Under development (unstable) (2020-09-29 r79274)
Platform: x86_64-apple-darwin18.7.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  Grdevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0    tcltk_4.1.0

Hombrew版本

bash-3.2$ brew --version
Homebrew 2.5.2
Homebrew/homebrew-core (git revision f5bfb; last commit 2020-09-25)
Homebrew/homebrew-cask (git revision a5844b; last commit 2020-09-25)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。