代码之家  ›  专栏  ›  技术社区  ›  sztal

FreeBSD上的R feather包编译错误(g++)

  •  1
  • sztal  · 技术社区  · 7 年前

    feather FreeBSD机器上的程序包,它因以下错误而崩溃: error: 'snprintf' was not declared in this scope . g++ 用于编译。

    任何关于如何处理这个问题的提示都将不胜感激。

    * installing *source* package ‘feather’ ...
    ** package ‘feather’ successfully unpacked and MD5 sums checked
    Platform is little endian. Good.
    ** libs
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c RcppExports.cpp -o RcppExports.o
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather-read.cpp -o feather-read.o
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather-types.cpp -o feather-types.o
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather-write.cpp -o feather-write.o
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/buffer.cc -o feather/buffer.o
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/feather-c.cc -o feather/feather-c.o
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/io.cc -o feather/io.o
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/metadata.cc -o feather/metadata.o
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/reader.cc -o feather/reader.o
    g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/status.cc -o feather/status.o
    feather/status.cc: In member function 'std::__cxx11::string feather::Status::ToString() const':
    feather/status.cc:52:52: error: 'snprintf' was not declared in this scope
     snprintf(buf, sizeof(buf), " (error %d)", posix);
                                                    ^
    gmake: *** [/usr/local/lib/R/etc/Makeconf:164: feather/status.o] Error 1
    ERROR: compilation failed for package ‘feather’
    * removing ‘/usr/local/lib/R/library/feather’
    
    The downloaded source packages are in
            ‘/tmp/Rtmp26mAsU/downloaded_packages’
    Updating HTML index of packages in '.Library'
    Making 'packages.html' ... done
    Warning message:
    In install.packages("feather") :
    installation of package ‘feather’ had non-zero exit status
    
    1 回复  |  直到 7 年前
        1
  •  1
  •   arrowd    7 年前

    这个问题似乎已归档 feather/status.cc . 尝试打开它并添加 #include <cstdio>