Ошибка компиляции пакета Rfeather (g++) во FreeBSD

Я пытаюсь установить пакет 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

person sztal    schedule 16.09.2017    source источник
comment
Мне пришлось искать snprintf ...на мгновение я подумал, что это просто опечатка. Согласно это, вам может потребоваться изменить Makeconf, чтобы он подходил для компиляции этого пакета.   -  person Kevin Arseneau    schedule 16.09.2017


Ответы (1)


Проблема, похоже, в файле feather/status.cc. Попробуйте открыть его и добавить строку #include <cstdio> в список включений вверху.

person arrowd    schedule 16.09.2017
comment
Хорошо, ваше решение работает, и авторы уже применили заплату к исходному коду для устранения с этой проблемой на FreeBSD. Следовательно, я принимаю ответ. Спасибо! - person sztal; 21.09.2017